Giter Club home page Giter Club logo

Comments (6)

zeke avatar zeke commented on May 16, 2024 1

Thanks for following up. I ended up using https://github.com/dachev/node-cld which has a binary dependency but the results are very accurate.

from franc.

wooorm avatar wooorm commented on May 16, 2024

Hey sorry about that @zeke. I don't have much time now, so I'll try to respond more extensively later.
Essentially: franc is good at many languages, which means it needs bigger input to get better results! 😞😐

from franc.

zeke avatar zeke commented on May 16, 2024

No worries! Unfortunately these short strings are all I have.

I'm really just trying to answer the question, "Is this string in English?"

Do you know of any alternatives?

I guess I could look for each word in https://github.com/zeke/an-array-of-english-words, and if most of them are found, call it English. ¯\_(ツ)_/¯

from franc.

wooorm avatar wooorm commented on May 16, 2024

Could you use franc.all and, when the English score is bigger than .95 (for example), call it English? Maybe that'll work?

from franc.

wooorm avatar wooorm commented on May 16, 2024

This is a problem inherent to the algorithm: more languages means you need bigger documents for better guessing. I’ve noted that in the readme.

You could use franc-min, this supports less languages, making the guessing better, if you’re only dealing with top-languages.

Finally, this problem sounds more like asserting that something is English. Franc solves a slightly different problem: out of all languages, which one is the most likely? To assert that something is probably English, I suggest using franc.all and checking of eng has a certainty of 0.9 or higher.

from franc.

wooorm avatar wooorm commented on May 16, 2024

Cool project! Yeah, there‘s definitely other algorithms better at smaller input!

from franc.

Related Issues (20)

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.