Code Monkey home page Code Monkey logo

fasttext-lid's People

Contributors

bittlingmayer avatar rse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fasttext-lid's Issues

The URL of the pretrained model is no longer valid

FAIR updated the URL, which broke this lib.

For those searching:

♕ resource: FastText LID-176 model
★ location: https://s3-us-west-1.amazonaws.com/fasttext-vectors/supervised_models/lid.176.bin
⚙ download: 278 bytes received with 279B/s... npm-install-fetch: ERROR: download failed: HTTP response: 403

The fix is in #1. For a temporary workaround you can do npm install git+https://[email protected]/modelfront/fasttext-lid.git instead.

Pre-processing

fastText did some pre-processing before training, so it's safest to do the same, especially lowercasing:

> (async () => { console.log(await lid.predict("Ótimo")) })()
> [ { lang: 'hu', prob: 0.3540060520172119 } ]
> (async () => { console.log(await lid.predict("ótimo")) })()
> [ { lang: 'pt', prob: 0.9964836835861206 } ]
> (async () => { console.log(await lid.predict("Uma boa experiencia")) })()
> [ { lang: 'en', prob: 0.5653783679008484 } ]
> (async () => { console.log(await lid.predict("uma boa experiencia")) })()
> [ { lang: 'pt', prob: 0.9949126839637756 } ]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.