UNPKG

which-lang

Version:

the best option for predicting a language

15 lines (13 loc) 860 B
import LanguageDetection from './index.js'; async function run(){ const lid = new LanguageDetection() console.log(await lid.predict('FastText-LID provides a great language identification')) console.log(await lid.predict('FastText-LID bietet eine hervorragende Sprachidentifikation')) console.log(await lid.predict('FastText-LID fornisce un ottimo linguaggio di identificazione')) console.log(await lid.predict('FastText-LID fournit une excellente identification de la langue')) console.log(await lid.predict('FastText-LID proporciona una gran identificación de idioma')) console.log(await lid.predict('FastText-LID обеспечивает отличную идентификацию языка')) console.log(await lid.predict('这个case我想close.')) console.log(await lid.predict('FastText-LID提供了很好的語言識別')) } run()