diff --git a/language detection/langdetect.py b/language detection/langdetect.py new file mode 100644 index 00000000..51492960 --- /dev/null +++ b/language detection/langdetect.py @@ -0,0 +1,4 @@ +from langdetect import detect + +text = input("Enter Any text in any language:- ") +print(detect(text)) \ No newline at end of file diff --git a/language detection/readme.md b/language detection/readme.md new file mode 100644 index 00000000..f3cd2536 --- /dev/null +++ b/language detection/readme.md @@ -0,0 +1,34 @@ +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 + +```bash +pip install langdetect +``` + +## 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. \ No newline at end of file