Skip to content

Latest commit

 

History

History
51 lines (32 loc) · 1.94 KB

README.md

File metadata and controls

51 lines (32 loc) · 1.94 KB

LANGUAGE DETECTOR

Type In a Phrase - and It Detects the Language

Use

  1. Clone the repository
  2. Run npm install to download all the required dependencies

Some Examples:

  • $ node index.js "bonjour, je suis Charle"
    #c5f015 Our Best Language Guess is French

  • $ node index.js "lakgdts"
    #f03c15 Sorry, Couldn't guess its language

  • $ node index.js 'Alle menslike wesens word vry'
    #c5f015 Our Best Language Guess is Afrikaans

  • $ node index.js "এটি একটি ভাষা একক IBM স্ক্রিপ্ট"
    #c5f015 Our Best Language Guess is Bengali

  • $ node index.js "Alle menneske er fødde til fridom"
    #c5f015 Our Best Language Guess is Norwegian Nynorsk

  • $ node index.js "This is the best language"
    #c5f015 Our Best Language Guess is English

  • $ node index.js "यह टमाटर मीठा है"
    #c5f015 Our Best Language Guess is Hindi

  • $ node index.js "Mango is king of fruits"
    #c5f015 Our Best Language Guess is English

  • $ node index.js "fhwjedfkw cvah zzzzz"
    #f03c15Sorry, Couldn't guess its language


It also has color coding (green and red) for ease of understanding whether the language could be guessed or not.

Modules Used :
https://github.com/wooorm/franc
https://github.com/adlawson/nodejs-langs
https://www.npmjs.com/package/colors