Profanity & Toxicity Detection for User-Generated Content

फ्रीमियम
द्वारा CognitiveAPIs | अपडेट किया गया 3 days ago | Text Analysis
लोकप्रियता

8.7 / 10

लेटेंसी

394ms

सेवा का स्तर

100%

Health Check

N/A

सभी चर्चाओं पर वापस जाएं

Cannot get it to work

Rapid account: Travbrad
travbrad
3 years ago

Hello,

I’m really not able to get this API to work. I’ve copied the request from the example and I always seem to get this result:

error: “INPUT POST text, title, positives, negatives are empty”

I’m running a basic type script http post:

`let data = new FormData();
data.append(
‘text’,
‘You idiot! I will find where you live and kick you ass!’
);

let headers = new HttpHeaders({
  'content-type': 'application/x-www-form-urlencoded',
  'x-rapidapi-key': '42ccdd7f41msh80a38d28062bbc9p163f70jsn4cabbf4a5744',
  'x-rapidapi-host':
    'profanity-toxicity-detection-for-user-generated-content.p.rapidapi.com',
});


return this.http.post('https://profanity-toxicity-detection-for-user-generated-content.p.rapidapi.com/', data, { headers: headers})

}`

Rapid account: Unicorn NLP
unicornNLP Commented 3 years ago

another thought: is x-rapidapi-key valid?

Rapid account: Unicorn NLP
unicornNLP Commented 3 years ago

Hello,
the problem is that API is giving back message that all the input fields are empty. So I am guessing there is some problem with defining or sending the ‘text’ variable.
I do not know what is the exact syntax of the code that you pasted but shouldn’t there be ‘text‘:‘You idiot! I will find where you live and kick you ass!’ (so : instead of coma) or some other definition of the ‘text’ variable?
I am online for the next 8 hours so please write how it goes and did it resolve anything.
Best,
Tom

चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:

नई टिप्पणियाँ पोस्ट करने के लिए लॉग इन / साइनअप करें