Skip to content

gcqmkm02/nltk-langued

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nltk-language-detection

English below

la code ajouté et modifie par: Dung Ali Hafez

Verrez la cette site:

N|Solid

maintenant on lit le texte de stdin

ce pendenant

elinks -dump site | python3 ./app.py

cat app.py | python3 ./app.py

sont possible

Bug: texte_dans une langue pas supporte

17/03/2020

nltk package reconnaître pas les langues comme Japonais, Chinois, Vietnamienne...

comme vous pouvez voir avec index.nginx-japonais dans le dossier exemples il détecte langue anglais même

si le fichier était écrit en Japonais.

example: cat examples/texte_coreen.txt | python3 ./app.py

détecte que le texte est écrite en langue anglais et pas en coréen

comment détecter que le texte est écrite dans une langue pas supporté

Automatic detection of text language with Python and NLTK. This script uses a very simple approach based on stopwords comparaison. The stopwords list with the most commun words wins the association.

Dependencies

you have to install NLTK package for Python to run this script.

How it works

just give the script a brunch of text to analyse and the script will :

  • Parse and tokenize you text
  • Compare the tokens with all stopwords lists contained in NLTK corpus in all available languages
  • Select the most relevant language
  • Calculate the relevancy level of the selected language

Documentation

If you want to know how this script works, just have a look at this blog post titled Detection de langue en NLP i wrote (in french) on my personnal blog le-geek.com

About

Detection de une langue NLP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 75.8%
  • HTML 24.2%