Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language detection error #123

Open
marialani opened this issue Aug 17, 2020 · 1 comment
Open

Language detection error #123

marialani opened this issue Aug 17, 2020 · 1 comment

Comments

@marialani
Copy link

When the language is not automatically detected the perspective-api-client will throw the error:
response error unable to detect language

The easiest workaround to this issue would be making sure to add a default option as suggested by the official documentation. I'd propose adding this following code example to the readme
const result = await perspective.analyze({ comment: { text }, languages: ["en"], })

@DevGorilla
Copy link

DevGorilla commented Jul 19, 2021

There also needs to be something in getAnalyzeCommentPayload to the effect of if (opts.languages) resource.languages = opts.languages; I created a branch, but there are not push permissions aside from @sloria

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants