Giter VIP home page Giter VIP logo

Comments (7)

gibrown avatar gibrown commented on August 20, 2024

Short text is pretty hard to detect the language of. For instance, Google translate also detects your text as Dutch:

http://translate.google.com/#auto/en/je%20vend%20ma%20chemise%20verte

Generally I've found that anything shorter than 300 bytes (about 60 words) does not seem very reliable. I unfortunately haven't gathered any statistical data to find a good cutoff.

from elasticsearch-langdetect.

adrienschuler-zz avatar adrienschuler-zz commented on August 20, 2024

Hi,

Do you intend to support the short-text profiles for this purpose ?
(Distributed since 03/03/2014 https://code.google.com/p/language-detection/)

from elasticsearch-langdetect.

gibrown avatar gibrown commented on August 20, 2024

That looks promising. Training data based on twitter corpus.

from elasticsearch-langdetect.

jprante avatar jprante commented on August 20, 2024

1.4.0.1 released, with the setting "profile": "/langdetect/short-text/"

from elasticsearch-langdetect.

adrienschuler-zz avatar adrienschuler-zz commented on August 20, 2024

Thanks for the quick answer and patch!
It would be awesome if the "short-text" profile setting could be reachable from the REST API as well :)

from elasticsearch-langdetect.

jprante avatar jprante commented on August 20, 2024

1.4.0.2 just released, it has another REST API command for switching profiles.

from elasticsearch-langdetect.

adrienschuler-zz avatar adrienschuler-zz commented on August 20, 2024

Thanks a lot, a quick review already shows good improvements, such as:

curl -XPOST 'localhost:9200/_langdetect?pretty' -d  'je vend ma chemise verte'
{
    "profile" : "/langdetect/short-text/",
    "languages" : [ {
        "language" : "fr",
        "probability" : 0.5714283159213042
    }, {
        "language" : "nl",
        "probability" : 0.42857000187571836
    } ]
}

from elasticsearch-langdetect.

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.