Predict
Predict the language of a text
Predict the language of a text using a neural model. Use this POST version for long texts, as the GET version has a limit on the length of the text that can be provided in the query string.
post/predict/lang
Request
- Base URLhttps://robotoff.openfoodfacts.org/api/v1
- URLhttps://robotoff.openfoodfacts.org/api/v1/predict/lang
- Authnone declared
Request body
Example request
{
"text": "hello world"
}Response
the predicted languages
Example response
{
"predictions": [
{
"lang": "en",
"confidence": 0.9
}
]
}Changes
No recorded changes to this operation across all 4 revisions of this API.