{"id":15135976,"url":"https://github.com/vivekkdagar/naivebayesclassifier","last_synced_at":"2026-01-19T13:02:05.003Z","repository":{"id":219887146,"uuid":"750177462","full_name":"vivekkdagar/NaiveBayesClassifier","owner":"vivekkdagar","description":"Multinomial Naive Bayes Language Classification model","archived":false,"fork":false,"pushed_at":"2024-01-30T06:55:44.000Z","size":1087,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T02:31:49.140Z","etag":null,"topics":["artificial-intelligence","beautifulsoup4","college-project","github","joblib","kaggle","kaggle-dataset","linux","machine-learning","multinomial-naive-bayes","naive-bayes","naive-bayes-classifier","natural-language-processing","popos","pycharm","python3","scikit-learn","simple-project"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vivekkdagar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-30T06:08:26.000Z","updated_at":"2024-01-30T06:54:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"10d66dd4-d890-4a90-a9f1-3698cf0ed15e","html_url":"https://github.com/vivekkdagar/NaiveBayesClassifier","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"ec0798d2057f04543df45e275e4e465eac234702"},"previous_names":["vivekkdagar/naivebayesclassifier"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vivekkdagar/NaiveBayesClassifier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivekkdagar%2FNaiveBayesClassifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivekkdagar%2FNaiveBayesClassifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivekkdagar%2FNaiveBayesClassifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivekkdagar%2FNaiveBayesClassifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vivekkdagar","download_url":"https://codeload.github.com/vivekkdagar/NaiveBayesClassifier/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivekkdagar%2FNaiveBayesClassifier/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28568833,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T12:50:50.164Z","status":"ssl_error","status_checked_at":"2026-01-19T12:50:42.704Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-intelligence","beautifulsoup4","college-project","github","joblib","kaggle","kaggle-dataset","linux","machine-learning","multinomial-naive-bayes","naive-bayes","naive-bayes-classifier","natural-language-processing","popos","pycharm","python3","scikit-learn","simple-project"],"created_at":"2024-09-26T06:02:49.826Z","updated_at":"2026-01-19T13:02:04.967Z","avatar_url":"https://github.com/vivekkdagar.png","language":"Python","readme":"# Multinomial Naive Bayes Language Classification Model\n\nThis repository provides a tutorial on implementing language classification using the Multinomial Naive Bayes algorithm. The tutorial includes a Python implementation to detect the language of a given text. The code consists of two main files: `main.py` for user interaction and `detector.py` containing the `LanguageClassifier` class.\n\n## Overview\n\nThe Multinomial Naive Bayes algorithm is widely used for text classification tasks, including language identification. This tutorial demonstrates how to train a language classifier using a provided dataset and then use the trained model to predict the language of input text.\n\n## Prerequisites\n\nBefore running the code, ensure you have the following dependencies installed:\n\n- Python\n- Required libraries: `requests`, `bs4`, `pandas`, `scikit-learn`, `joblib`\n\nInstall the necessary dependencies using the following command:\n\n```bash\npip install requests bs4 pandas scikit-learn joblib\n```\n\n## Usage\n\n1. **Clone the Repository:**\n   ```bash\n   git clone https://github.com/vivekkdagar/NaiveBayesClassifier.git\n   cd NaiveBayesClassifier\n   ```\n\n2. **Run the Main Script:**\n   ```bash\n   python3 main.py\n   ```\n\n3. **Select Data Source and input data:**\n   - Choose the mode ('raw', 'file', or 'website') to input text data.\n\n4. **Results:**\n   - The predicted language for the provided text will be displayed.\n\n## Code Structure\n\n- `main.py`: Handles user interaction and data input.\n- `detector.py`: Contains the `LanguageClassifier` class responsible for training and predicting languages.\n\n## Data Preprocessing\n\nThe `LanguageClassifier` class preprocesses the training data by removing special characters and transforming the text into a bag-of-words representation using the `CountVectorizer` from scikit-learn.\n\n## Training the Model\n\nThe tutorial uses a provided dataset, \"Language Detection.csv,\" to train the Multinomial Naive Bayes model. The model is then serialized using the `joblib` library for future use.\n\n## Additional Notes\n\n- To modify or extend the training dataset, edit the \"Language Detection.csv\" file.\n- Adjust the HTML tag in the `scrape_website` function within `main.py` based on your specific use case.\n\n## References\n\n- [Language Detection Dataset on Kaggle](https://www.kaggle.com/datasets/basilb2s/language-detection)\n- [Beautiful Soup documentation](https://www.crummy.com/software/BeautifulSoup/bs4)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvivekkdagar%2Fnaivebayesclassifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvivekkdagar%2Fnaivebayesclassifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvivekkdagar%2Fnaivebayesclassifier/lists"}