0

I have been working on a language detection system. However, in Python, I could not find a package to detect British vs American English.

I use langdetect library to detect all other options. I also know that langdetect has a possibility to add new languages. However, I also could not make it work too.

I followed to documentation instructions from https://code.google.com/archive/p/language-detection/wikis/Tools.wiki

while trying this command java -jar lib/langdetect.jar --genprofile-text -l gb-en english.txt

I am getting the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: net/arnx/jsonic/JSONException

I have a jsonic-1.2.0.jar , langdetect.jar, and english.txt inside the same folder of lib. (Downloaded from the original source from the above link)

Am I doing something wrong? The documentation seems quite straightforward. (This approach would be my strongest preference, if possible)

I have also checked other libraries like TextBlob, pycld2, SpaCy, etc. They detect everything as English generic.

Another approach I tried is this: https://stackoverflow.com/a/42373173/7698983

However, this does not seem to be the best option. Does anyone have a solution to this problem?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.