{"id":22819950,"url":"https://github.com/devdhera/guide-to-nlp-with-python","last_synced_at":"2026-05-08T13:40:18.772Z","repository":{"id":101417336,"uuid":"169204044","full_name":"DevDHera/Guide-to-NLP-with-Python","owner":"DevDHera","description":"A Simple NLP starter with the help of beautiful Python ","archived":false,"fork":false,"pushed_at":"2019-02-07T18:02:17.000Z","size":254,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-06T04:43:54.426Z","etag":null,"topics":["natural-language-processing","nltk","python","sklearn"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/DevDHera.png","metadata":{"files":{"readme":"README.md","changelog":"News-Classifier.ipynb","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2019-02-05T07:23:01.000Z","updated_at":"2019-02-07T18:02:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"95e40bee-5d80-46e3-9584-b9a8ccb14a08","html_url":"https://github.com/DevDHera/Guide-to-NLP-with-Python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevDHera%2FGuide-to-NLP-with-Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevDHera%2FGuide-to-NLP-with-Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevDHera%2FGuide-to-NLP-with-Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevDHera%2FGuide-to-NLP-with-Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DevDHera","download_url":"https://codeload.github.com/DevDHera/Guide-to-NLP-with-Python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246390859,"owners_count":20769478,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["natural-language-processing","nltk","python","sklearn"],"created_at":"2024-12-12T15:15:10.613Z","updated_at":"2026-05-08T13:40:13.739Z","avatar_url":"https://github.com/DevDHera.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Guide to NLP using Python :sunglasses:\n\nThis repository focuses on **NLP (Natural Language Processing)** using the Python Language.\n\n## Contents\n\n`News-Classifier` notebook focus on categorizing news articles by processing the body of the content. \n\nYou can tweak the code a bit to improve the accuracy of the predictions by combining both Body and Title for processing. \n\n## Steps to Run\n\nFirst clone the repository.\n\n```sh\ngit clone https://github.com/DevDHera/Guide-to-NLP-with-Python.git\n```\n\nNow open the juputer notebook and classify news articles to your choice.\n\nAll the data sets are included inside `dataset` directory.\n\n\n## Tech Stack\n\nFollowing are some of the packages we use to build our classifier.\n\n* nltk - Stopwords, Stemming\n* pandas - To read TSV, create dataframes\n* matplotlib, seaborn - Data visualizations\n* string - To remove punctuations\n* sklearn - CountVectorizer, TfidfTransformer, MultinomialNB, Pipeline\n\n## Code Samples\n\nWe import the data into notebook like below.\n\n``` python\nnews = pd.read_csv('dataset/trainset.txt', sep='\\t', names=['CLASS', 'TITLE', 'DATE', 'BODY'])\n```\n\nAlso, we use pipelines to make our life easier :sleeping:.\n\n``` python\npipeline = Pipeline([\n    ('bow', CountVectorizer(analyzer=text_process)),\n    ('tfidf', TfidfTransformer()),\n    ('classifier', MultinomialNB())\n])\n```\n\nImprove the classifier and :heart: share the knowledge :bouquet: :blush: ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevdhera%2Fguide-to-nlp-with-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevdhera%2Fguide-to-nlp-with-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevdhera%2Fguide-to-nlp-with-python/lists"}