Profanity & Toxicity Detection for User-Generated Content

부분 유료
분류별 CognitiveAPIs | 업데이트됨 לפני שנה | Text Analysis
인기

8 / 10

지연 시간

394ms

서비스 수준

100%

Health Check

N/A

모든 토론으로 돌아가기

Cannot get it to work

Rapid account: Travbrad
travbrad
לפני 3 שנים

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 שנים

another thought: is x-rapidapi-key valid?

Rapid account: Unicorn NLP
unicornNLP Commented לפני 3 שנים

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

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입