Git Product home page Git Product logo

languageidentifier-app's Introduction

Language Identifier Project

This project is a language identifier that can classify text into one of 17 languages: Arabic, Danish, Dutch, English, French, German, Greek, Hindi, Italian, Kannada, Malayalam, Portuguese, Russian, Spanish, Swedish, Tamil, and Turkish. The classifier uses a bag-of-words representation and Naive Bayes classification to make predictions.

Dataset

The dataset used for this project consists of texts in the 17 different languages mentioned above. The dataset was collected from various sources, including news articles, Wikipedia pages, and social media posts.

Text Preprocessing

Before extracting the bag-of-words representation, we used the re library to preprocess the text. Specifically, we performed the following steps: 1-Removed any non-alphabetic characters from the text, such as punctuation and numbers, using regular expressions.

2-Converted all text to lowercase using the lower() function.

Bag-of-words Representation

To represent the preprocessed texts in a format that can be used for classification, we used a bag-of-words representation. In this approach, each text is represented as a vector of word frequencies, where each element in the vector corresponds to a unique word in the dataset. I used the scikit-learn library to implement the Bag-of-words Representation

Naive Bayes Classification

I used a Naive Bayes classifier to train a model on the bag-of-words representation of the dataset. The classifier is a probabilistic model that calculates the probability of a text belonging to each of the 17 languages, based on its bag-of-words representation. I used the scikit-learn library to implement the Naive Bayes classifier.

Deploy model using streamlit library

The project is deployed using Streamlit, a Python library that allows you to create interactive web apps. Users can input text and the model will predict the language of the text. The web app is easy to use and provides a user-friendly interface for language identification.

Usage

Website :https://bozekry-languageidentifier-app-languageidentifier-eaprjx.streamlit.app/

Conclusion

Overall, this language identifier project demonstrates how bag-of-words representation and Naive Bayes classification can be used to classify text into multiple languages. The project also shows how the re library can be used for text preprocessing (removing non-alphabetic characters and converting text to lowercase). The project can be extended to include more languages and more advanced text processing techniques.

The shape of the app

Deployment

languageidentifier-app's People

Contributors

bozekry avatar

Stargazers

ziad mostafa avatar

Watchers

 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.