From 0efebae2b125beac254213c2ae6d1f3e41dcfedf Mon Sep 17 00:00:00 2001 From: tusharmishra069 Date: Fri, 11 Oct 2024 13:02:45 +0530 Subject: [PATCH 1/5] Added the Language detection automation --- language detection/langdetect.py | 4 ++++ language detection/readme.md | 34 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 language detection/langdetect.py create mode 100644 language detection/readme.md diff --git a/language detection/langdetect.py b/language detection/langdetect.py new file mode 100644 index 000000000..514929604 --- /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 000000000..f3cd25365 --- /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 From ce1e9959fa8be0ea5f05f99f5a7b19b2ed6b902f Mon Sep 17 00:00:00 2001 From: tusharmishra069 Date: Fri, 11 Oct 2024 13:12:01 +0530 Subject: [PATCH 2/5] Addede the Langdetect Script --- language_detection/langdetect.py | 4 +++ language_detection/readme.md | 44 +++++++++++++++++++++++++++++ language_detection/requirements.txt | 2 ++ 3 files changed, 50 insertions(+) create mode 100644 language_detection/langdetect.py create mode 100644 language_detection/readme.md create mode 100644 language_detection/requirements.txt diff --git a/language_detection/langdetect.py b/language_detection/langdetect.py new file mode 100644 index 000000000..514929604 --- /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 000000000..fb99d7904 --- /dev/null +++ b/language_detection/readme.md @@ -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. \ No newline at end of file diff --git a/language_detection/requirements.txt b/language_detection/requirements.txt new file mode 100644 index 000000000..658a179f1 --- /dev/null +++ b/language_detection/requirements.txt @@ -0,0 +1,2 @@ +langdetect==1.0.9 +python_version >= "3.6" \ No newline at end of file From 47366e160b23f1e2cb38f16097ae49c0250cabc7 Mon Sep 17 00:00:00 2001 From: tusharmishra069 Date: Fri, 11 Oct 2024 13:14:41 +0530 Subject: [PATCH 3/5] Addede the new Script langdetect --- language detection/langdetect.py | 4 ---- language detection/readme.md | 34 -------------------------------- 2 files changed, 38 deletions(-) delete mode 100644 language detection/langdetect.py delete mode 100644 language detection/readme.md diff --git a/language detection/langdetect.py b/language detection/langdetect.py deleted file mode 100644 index 514929604..000000000 --- a/language detection/langdetect.py +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index f3cd25365..000000000 --- a/language detection/readme.md +++ /dev/null @@ -1,34 +0,0 @@ -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 From 49b004ae671028a7c98d085dcbacf71e63bbb0d3 Mon Sep 17 00:00:00 2001 From: tusharmishra069 Date: Fri, 11 Oct 2024 13:20:27 +0530 Subject: [PATCH 4/5] reslove the issue --- language_detection/langdetect.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/language_detection/langdetect.py b/language_detection/langdetect.py index 514929604..4a85955bb 100644 --- a/language_detection/langdetect.py +++ b/language_detection/langdetect.py @@ -1,4 +1,5 @@ -from langdetect import detect +from langdetect import detect + +text = input("Enter Any text in any language: ") +print(detect(text)) -text = input("Enter Any text in any language:- ") -print(detect(text)) \ No newline at end of file From bb9a54db3840c7a7b13830836665e484a68b2629 Mon Sep 17 00:00:00 2001 From: tusharmishra069 Date: Fri, 11 Oct 2024 13:23:14 +0530 Subject: [PATCH 5/5] resolve another issue --- language_detection/requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/language_detection/requirements.txt b/language_detection/requirements.txt index 658a179f1..084b89b2e 100644 --- a/language_detection/requirements.txt +++ b/language_detection/requirements.txt @@ -1,2 +1 @@ langdetect==1.0.9 -python_version >= "3.6" \ No newline at end of file