Skip to main content

Language Detection

Language detection can be called separately or as part of other functions.

Recognized languages

Our default mode distinguishes 31 languages:

ar - Arabicel - Greekhe - Hebrewit - Italiannl - Dutchsk - Slovakzh - Chinese
bg - Bulgarianen - Englishhi - Hindija - Japanesepa - Punjabisv - Swedish
cs - Czeches - Spanishhr - Croatianko - Koreanpl - Polishtr - Turkish
da - Danishfi - Finnishhu - Hungarianlt - Lithuanianpt - Portugueseuk - Ukrainian
de - Germanfr - Frenchid - Indonesiannl - Dutchru - Russianvi - Vietnamese

Sample call

curl -X POST https://api.geneea.com/v3/analysis \
-H 'Authorization: user_key <YOUR USER KEY>' \
-H 'Content-Type: application/json' \
-d '{
"id": "1",
"text": "The trip to Innsbruck was great.",
"analyses": ["language"]
}'

## On Windows, use \" instead of " and " instead of '

Priors

If you know your texts can be only in certain languages, you can specify a prior: a single language or a combination of several languages. Currently, the supported priors are:

cs,decs,en,skcs,de,es,nl,plde,en,es,nles,nl,pl
cs,encs,es,nlcs,en,es,nl,plde,en,es,plnl,pl
cs,escs,es,plcs,de,en,es,nl,plde,en,nl,plen,zh
cs,nlcs,nl,plde,ende,es,nl,pl
cs,plcs,de,en,esde,esen,es
cs,skcs,de,en,nlde,nlen,nl
cs,de,encs,de,en,plde,plen,pl
cs,de,escs,de,en,skde,en,esen,es,nl
cs,de,nlcs,en,es,nlde,en,nlen,es,pl
cs,de,plcs,en,es,plde,en,plen,nl,pl
cs,en,escs,es,nl,plde,es,nlen,es,nl,pl
cs,en,nlcs,de,en,es,nlde,es,ples,nl
cs,en,plcs,de,en,es,plde,nl,ples,plEU

Use the prior exactly as written above (the same order, no spaces) and pass it via the options parameter:

curl -X POST https://api.geneea.com/v3/analysis \
-H 'Authorization: user_key <YOUR USER KEY>' \
-H 'Content-Type: application/json' \
-d '{
"id": "1",
"text": "The trip to Innsbruck was great.",
"options": {"lang_prior":"en,nl"}',
"analyses": ["language"]
}'

## On Windows, use \" instead of " and " instead of '

Customization

We can customize our language detection to your needs. Maybe your emails contain error messages in English, or product names sounding French, etc.