Skip to content

Commit 0efebae

Browse files
Added the Language detection automation
1 parent 4d3ad1d commit 0efebae

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

language detection/langdetect.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from langdetect import detect
2+
3+
text = input("Enter Any text in any language:- ")
4+
print(detect(text))

language detection/readme.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Language Detection Tool
2+
# Language Detection Tool
3+
4+
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.
5+
6+
## Features
7+
8+
- Detects the language of any given text input.
9+
- Supports multiple languages.
10+
- Simple and easy to use.
11+
12+
## Prerequisites
13+
14+
Before running the project, you need to have Python installed on your machine. Additionally, you need to install the `langdetect` library.
15+
16+
## Installation
17+
18+
```bash
19+
pip install langdetect
20+
```
21+
22+
## Usage
23+
24+
```python
25+
from langdetect import detect
26+
27+
text = "Your text here"
28+
language = detect(text)
29+
print(f"The detected language is: {language}")
30+
```
31+
32+
## License
33+
34+
This project is licensed under the MIT License.

0 commit comments

Comments
 (0)