https://github.com/kumar-shridhar/detect-language
Detect the language from the given sentence
https://github.com/kumar-shridhar/detect-language
chatbot detect-language detect-languages langdetect language machine-learning polyglot python
Last synced: about 2 months ago
JSON representation
Detect the language from the given sentence
- Host: GitHub
- URL: https://github.com/kumar-shridhar/detect-language
- Owner: kumar-shridhar
- Created: 2018-07-20T12:59:27.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-21T16:36:12.000Z (almost 7 years ago)
- Last Synced: 2025-01-28T17:17:15.542Z (4 months ago)
- Topics: chatbot, detect-language, detect-languages, langdetect, language, machine-learning, polyglot, python
- Language: Python
- Size: 22.5 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Detect the languages present in the given sentence
This work detects the given language/languages present in the given sentence.
### Requirements
```
* python >=3.4
* lang_detect
* polyglot
* flask (only if you want to host using flask)
* docker (only if you want to host it using docker)```
### Installation
* git clone https://github.com/kumar-shridhar/Detect-Language.git
* cd Detect-Language
* pip install -r requirements.txt### Usage
```
detect_language.py [-h] [--str String]
[--supported_language, --sl]** required arguements:
--str string to detect language** optional arguments:
-h, --help help message
--sl, --supported_language supported languages```
### Host using Flask```
python flask_hosted/app.py```
Default port used is localhost:8082
### Host using Flask
```
docker build Dockerfile```
NOTE: Docker needs to be installed before using it with docker. Install docker from here for Ubuntu: https://docs.docker.com/install/linux/docker-ce/ubuntu/
### Run tests
```
python tests/test.py```