{"id":22873713,"url":"https://github.com/vaasudevans/natural-language-processing-assignments","last_synced_at":"2025-03-31T12:40:29.616Z","repository":{"id":111647270,"uuid":"160414389","full_name":"VaasuDevanS/Natural-Language-Processing-Assignments","owner":"VaasuDevanS","description":"UNB Fall-2018 NLP Assignments 💬","archived":false,"fork":false,"pushed_at":"2019-02-25T14:07:02.000Z","size":24628,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-06T18:45:47.595Z","etag":null,"topics":["baseline","bigrams","hidden-markov-model","information-retrieval-based-chatbot","language-models","nlp","python27","sentiment-analysis","unb","unigram"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VaasuDevanS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-12-04T20:23:58.000Z","updated_at":"2024-03-30T01:17:08.000Z","dependencies_parsed_at":"2023-03-17T00:30:17.221Z","dependency_job_id":null,"html_url":"https://github.com/VaasuDevanS/Natural-Language-Processing-Assignments","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/VaasuDevanS%2FNatural-Language-Processing-Assignments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VaasuDevanS%2FNatural-Language-Processing-Assignments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VaasuDevanS%2FNatural-Language-Processing-Assignments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VaasuDevanS%2FNatural-Language-Processing-Assignments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VaasuDevanS","download_url":"https://codeload.github.com/VaasuDevanS/Natural-Language-Processing-Assignments/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246472513,"owners_count":20783224,"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":["baseline","bigrams","hidden-markov-model","information-retrieval-based-chatbot","language-models","nlp","python27","sentiment-analysis","unb","unigram"],"created_at":"2024-12-13T14:29:57.890Z","updated_at":"2025-03-31T12:40:29.590Z","avatar_url":"https://github.com/VaasuDevanS.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Natural-Language-Processing-Assignments\nUniversity of New Brunswick Fall-2018 CS6765: Natural Language Processing\n\nThis Repository contains the python code for the Fall Term Assignments.  \nNo usage of numpy/nltk in any of the code and developed using Python2.7 (built-in modules)  \nsklearn is used only in Assignment3 for Logistic Regression\n\n## Getting started\n\n| No  | Python-file  | Usage\n|:-:|:-:|:-:|\n| 1  | tokenize.py\u003cbr\u003e count.py  | python tokenize.py FILE \u003e FILE.tokens\u003cbr\u003e python count.py FILE.tokens \u003e FILE.freqs      \n| 2 |  lm.py\u003cbr\u003eperplexity.py |  python lm.py MODEL TRAIN_FILE TEST_FILE \u003e OUTPUT\u003cbr\u003epython perplexity.py OUTPUT\n| 3 | classify.py\u003cbr\u003escore.py  | python classify.py METHOD TRAIN_DOCS TRAIN_CLASSES TEST_DOCS \u003e PREDICTED_CLASSES\u003cbr\u003e python score.py PREDICTED_CLASSES TRUE_CLASSES\n| 4 | tag.py\u003cbr\u003eaccuracy.py  | python tag.py TRAIN_FILE TEST_FILE METHOD \u003e SYSTEM_OUTPUT\u003cbr\u003epython accuracy.py TRUE_TAGS SYSTEM_OUTPUT\n| 5 | chatbot.py |  python chatbot.py METHOD  \n\n## Arguments\n\n| No  | Arguments  | File-Location (in Individual Assignment folder)\n|:-:|:-:|:-:|\n| 1  | FILE | Data/tweets-en.txt.gz      \n| 2 |  MODEL\u003cbr\u003eTRAIN_FILE\u003cbr\u003eTEST_FILE |  \u003cb\u003e1\u003c/b\u003e or \u003cb\u003e2\u003c/b\u003e or \u003cb\u003einterp\u003c/b\u003e\u003cbr\u003eData/reuters-train.txt\u003cbr\u003eData/reuters-dev.txt\n| 3 | METHOD\u003cbr\u003eTRAIN_DOCS\u003cbr\u003eTRAIN_CLASSES\u003cbr\u003eTEST_FILE\u003cbr\u003eTRUE_CLASSES  | \u003cb\u003ebaseline\u003c/b\u003e or \u003cb\u003elr\u003c/b\u003e or \u003cb\u003elexicon\u003c/b\u003e or \u003cb\u003enb\u003c/b\u003e or \u003cb\u003enbbin\u003c/b\u003e\u003cbr\u003eData/train.docs.txt\u003cbr\u003eData/train.classes.txt\u003cbr\u003eData/dev.docs.txt\u003cbr\u003eData/dev.classes.txt\n| 4 | TRAIN_FILE\u003cbr\u003eTEST_FILE\u003cbr\u003eMETHOD\u003cbr\u003eTRUE_TAGS  |Data/train.en.txt\u003cbr\u003eData/dev.en.words.txt\u003cbr\u003e\u003cb\u003ebaseline\u003c/b\u003e or \u003cb\u003ehmm\u003c/b\u003e\u003cbr\u003eData/dev.en.tags.txt\n| 5 | METHOD |  overlap\u003cbr\u003ew2v\u003cbr\u003eboth\n\nAssignment 2: - \nMODEL  \n* \u003cb\u003e1\u003c/b\u003e represents \u003cb\u003eUnigram (with Add-1 smoothing)\u003c/b\u003e\n* \u003cb\u003e2\u003c/b\u003e represents \u003cb\u003eBigram (with Add-k smoothing)\u003c/b\u003e\n* \u003cb\u003e3\u003c/b\u003e represents \u003cb\u003eInterpolated (both Unigram and Bigram)\u003c/b\u003e\n\nAssignment 3: - \nMETHOD  \n* \u003cb\u003ebaseline\u003c/b\u003e represents \u003cb\u003eMost-Frequent-Class-Baseline\u003c/b\u003e\n* \u003cb\u003elr\u003c/b\u003e represents \u003cb\u003eLogistic Regression (used from skimage)\u003c/b\u003e\n* \u003cb\u003elexicon\u003c/b\u003e represents \u003cb\u003eSentiment Lexicon containing + and - words\u003c/b\u003e\n* \u003cb\u003enb\u003c/b\u003e represents \u003cb\u003eNaive Bayes Model (with add-k smoothing)\u003c/b\u003e\n* \u003cb\u003enbbin\u003c/b\u003e represents \u003cb\u003eBinarized Naive Bayes\u003c/b\u003e\n\nAssignment 4: - \nMETHOD \n* \u003cb\u003ebaseline\u003c/b\u003e represents \u003cb\u003eMost-Frequent-Tag-Baseline\u003c/b\u003e\n* \u003cb\u003e2\u003c/b\u003e represents \u003cb\u003eHidden Markov Model (Bigram with add-k smoothing) and Viterbi Algorithm\u003c/b\u003e\n\nAssignment 5: - \nMETHOD  \n* \u003cb\u003eoverlap\u003c/b\u003e represents \u003cb\u003eChatbot responses based on the word overlap\u003c/b\u003e\n* \u003cb\u003ew2v\u003c/b\u003e represents \u003cb\u003eResponse with highest Cosine value (from pre-trained vectors from fastText)\u003c/b\u003e\n* \u003cb\u003eboth\u003c/b\u003e represents \u003cb\u003eboth responses from overlap and w2v with their Cosine values\u003c/b\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaasudevans%2Fnatural-language-processing-assignments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaasudevans%2Fnatural-language-processing-assignments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaasudevans%2Fnatural-language-processing-assignments/lists"}