Skip to content

Langdetect #981

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions language_detection/langdetect.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from langdetect import detect

text = input("Enter Any text in any language: ")
print(detect(text))
44 changes: 44 additions & 0 deletions language_detection/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Language Detection Tool
# Language Detection Tool

This is a simple Python tool that detects the language of the input text using the `langdetect` library. You can enter any text in any language, and the program will automatically detect and display the language code.

## Features

- Detects the language of any given text input.
- Supports multiple languages.
- Simple and easy to use.

## Prerequisites

Before running the project, you need to have Python installed on your machine. Additionally, you need to install the `langdetect` library.

## Installation

## Installation

To install the required library, you can use the following command:

```bash
pip install langdetect
```

Alternatively, you can install it from the `requirements.txt` file:

```bash
pip install -r requirements.txt
```

## Usage

```python
from langdetect import detect

text = "Your text here"
language = detect(text)
print(f"The detected language is: {language}")
```

## License

This project is licensed under the MIT License.
1 change: 1 addition & 0 deletions language_detection/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
langdetect==1.0.9