...
Tip |
---|
It can detect 103 languages outputting ISO 639-3 language codes. (https://opennlp.apache.org/news/model-langdetect-183.html) |
Note |
---|
It is important to note that the The model works better with longer texts that have containing at least 2 two sentences. So it It is important to configure this stage earlier in the pipeline and before tokenizing the text. |
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "type":"LangDetectorStage", } |
As you can see, the first sentence is tagged with "LANG_ENG" and the second sentence with "LANG_SPA". For
In this case, a sentence breaker stage was configured before the language detector stage. This way As a result, language identification could happen can occur at the sentence level.
...
...