Giter Club home page Giter Club logo

python_language_detector's Introduction

[pyp-w1] Language Detector

You will need to build a program that is able to detect the language of certain piece of text given by the user. For that you will need to respect the following interface:

>>> from .languages import LANGUAGES

>>> user_text = """
Lionel Andrés Messi Cuccittini (Rosario, 24 de junio de 1987), conocido como
Leo Messi, es un futbolista argentino11 que juega como delantero en el Fútbol
Club Barcelona y en la selección argentina, de la que es capitán. Considerado
con frecuencia el mejor jugador del mundo y calificado en el ámbito deportivo
como el más grande de todos los tiempos, Messi es el único futbolista en la
historia que ha ganado cinco veces el FIFA Balón de Oro –cuatro de ellos en
forma consecutiva– y el primero en recibir tres Botas de Oro.
Con el Barcelona ha ganado siete títulos de La Liga y cuatro de la Liga de
Campeones de la UEFA, así como tres títulos de la Copa del Rey. Goleador
prolífico, ostenta los récords por más goles en la historia de La Liga (308),
en una temporada de La Liga (50), en un año calendario (91), en un partido de
la Liga de Campeones (cinco) y en más temporadas de la Liga de Campeones (cinco).
"""

>>> detect_language(user_text, LANGUAGES)
'Spanish'

Language detection is not magic. It's just a matter of counting how many of the most common words in a language are included in certain text. If given text contains words of different languages, the detector should return the language that contain most words in given text.

You are responsible of defining the set of the most used words in each of the languages you want to support. As a requirement of this group work, we ask you to support at least 3 languages, including: english, spanish and german.

Get extra credit for +95% code coverage

This is a test.

python_language_detector's People

Contributors

jon003 avatar santiagobasulto avatar martinzugnoni avatar

Watchers

James Cloos avatar Nick Van Kuren avatar

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.