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 your input is limited to specific languages, you can specify a language prior—either a single language or a set.

Supported priors include:

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 listed above (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 tailor language detection to your specific content. For example, if your emails contain Endlish error messages, or French-sounding product names, we can adjust detection accordingly.