{"id":16837910,"url":"https://github.com/hankcs/cs224n","last_synced_at":"2025-04-04T18:05:52.510Z","repository":{"id":39787980,"uuid":"94612359","full_name":"hankcs/CS224n","owner":"hankcs","description":"CS224n: Natural Language Processing with Deep Learning Assignments Winter, 2017","archived":false,"fork":false,"pushed_at":"2018-10-15T01:51:25.000Z","size":48191,"stargazers_count":675,"open_issues_count":13,"forks_count":273,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-03-28T17:05:41.067Z","etag":null,"topics":["cs224n","deep-learning","natural-language-processing","rnn","tensorflow","word2vec"],"latest_commit_sha":null,"homepage":"http://www.hankcs.com/tag/cs224n/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hankcs.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}},"created_at":"2017-06-17T09:01:42.000Z","updated_at":"2025-03-06T11:53:11.000Z","dependencies_parsed_at":"2022-09-20T11:14:38.529Z","dependency_job_id":null,"html_url":"https://github.com/hankcs/CS224n","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/hankcs%2FCS224n","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hankcs%2FCS224n/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hankcs%2FCS224n/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hankcs%2FCS224n/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hankcs","download_url":"https://codeload.github.com/hankcs/CS224n/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226213,"owners_count":20904465,"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":["cs224n","deep-learning","natural-language-processing","rnn","tensorflow","word2vec"],"created_at":"2024-10-13T12:19:27.915Z","updated_at":"2025-04-04T18:05:52.494Z","avatar_url":"https://github.com/hankcs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CS224n\nCS224n: Natural Language Processing with Deep Learning Assignments Winter, 2017\n\n#### Requirements\n* Python 2.7\n* TensorFlow r1.2\n\n\n## Assignment #1 \n\n1. Softmax\n2. Neural Network Basics\n3. word2vec\n![q3_word_vectors](http://wx2.sinaimg.cn/large/006Fmjmcly1fgydqi2vq4j30m80godgi.jpg)\n4. Sentiment Analysis\n![q4_reg_v_acc](http://wx1.sinaimg.cn/large/006Fmjmcly1fgydrwwnsbj30m80godgn.jpg)\n![q4_dev_conf](http://wx1.sinaimg.cn/large/006Fmjmcly1fgydrmd0wtj30m80gojrx.jpg)\n\n## Assignment #2\n\n1. Tensorflow Softmax\n2. Neural Transition-Based Dependency Parsing\n\n```\n924/924 [==============================] - 49s - train loss: 0.0631    \nEvaluating on dev set - dev UAS: 88.54\nNew best dev UAS! Saving model in ./data/weights/parser.weights\n================================================================================\nTESTING\n================================================================================\nRestoring the best model weights found on the dev set\nFinal evaluation on test set - test UAS: 88.92\nWriting predictions\nDone!\n```\n\n3. Recurrent Neural Networks: Language Modeling\n![unrolled_rnn](http://wx3.sinaimg.cn/large/006Fmjmcly1fgzqfm9p4xj30p60bbdgu.jpg)\n\n## Assignment #3\n\n1. A window into NER\n\n```\nDEBUG:Token-level confusion matrix:\ngo\\gu   PER     ORG     LOC     MISC    O    \nPER     2968    26      84      16      55   \nORG     147     1621    131     65      128  \nLOC     48      88      1896    26      36   \nMISC    37      40      54      1030    107  \nO       42      46      18      39      42614\nDEBUG:Token-level scores:\nlabel   acc     prec    rec     f1   \nPER     0.99    0.92    0.94    0.93 \nORG     0.99    0.89    0.77    0.83 \nLOC     0.99    0.87    0.91    0.89 \nMISC    0.99    0.88    0.81    0.84 \nO       0.99    0.99    1.00    0.99 \nmicro   0.99    0.98    0.98    0.98 \nmacro   0.99    0.91    0.89    0.90 \nnot-O   0.99    0.89    0.87    0.88 \nINFO:Entity level P/R/F1: 0.82/0.85/0.84\n```\n\n2. Recurrent neural nets for NER\n\n```\nDEBUG:Token-level confusion matrix:\ngo\\gu   PER     ORG     LOC     MISC    O    \nPER     2987    32      47      12      71   \nORG     136     1684    90      70      112  \nLOC     39      83      1907    21      44   \nMISC    43      45      47      1031    102  \nO       36      56      15      34      42618\nDEBUG:Token-level scores:\nlabel   acc     prec    rec     f1   \nPER     0.99    0.92    0.95    0.93 \nORG     0.99    0.89    0.80    0.84 \nLOC     0.99    0.91    0.91    0.91 \nMISC    0.99    0.88    0.81    0.85 \nO       0.99    0.99    1.00    0.99 \nmicro   0.99    0.98    0.98    0.98 \nmacro   0.99    0.92    0.89    0.91 \nnot-O   0.99    0.90    0.88    0.89 \nINFO:Entity level P/R/F1: 0.85/0.86/0.85\n```\n\n3. Grooving with GRUs\n\n![q3-noclip-rnn](http://wx2.sinaimg.cn/large/006Fmjmcly1fh6mpycoobj30hs0dcmxt.jpg)\n![q3-clip-rnn](http://wx1.sinaimg.cn/large/006Fmjmcly1fh6mq3kxzqj30hs0dcdgh.jpg)\n![q3-noclip-gru](http://wx2.sinaimg.cn/large/006Fmjmcly1fh6mq9pbitj30hs0dcgmc.jpg)\n![q3-clip-gru](http://wx2.sinaimg.cn/large/006Fmjmcly1fh6mqdhyb7j30hs0dcjs6.jpg)\n\n```\nDEBUG:Token-level confusion matrix:\ngo\\gu\tPER  \tORG  \tLOC  \tMISC \tO    \nPER  \t2920 \t41   \t57   \t12   \t119  \nORG  \t101  \t1716 \t73   \t64   \t138  \nLOC  \t22   \t95   \t1908 \t16   \t53   \nMISC \t37   \t45   \t53   \t1017 \t116  \nO    \t21   \t67   \t14   \t39   \t42618\n\nDEBUG:Token-level scores:\nlabel\tacc  \tprec \trec  \tf1   \nPER  \t0.99 \t0.94 \t0.93 \t0.93 \nORG  \t0.99 \t0.87 \t0.82 \t0.85 \nLOC  \t0.99 \t0.91 \t0.91 \t0.91 \nMISC \t0.99 \t0.89 \t0.80 \t0.84 \nO    \t0.99 \t0.99 \t1.00 \t0.99 \nmicro\t0.99 \t0.98 \t0.98 \t0.98 \nmacro\t0.99 \t0.92 \t0.89 \t0.90 \nnot-O\t0.99 \t0.91 \t0.88 \t0.89 \n\nINFO:Entity level P/R/F1: 0.86/0.85/0.85\n```\n\n4. Easter Egg Hunt!\n    - Run `python q3_gru.py dynamics` to unfold your candy eggs\n\n\n## References\n\nCS224n official website\n\n* http://web.stanford.edu/class/cs224n/index.html\n\nMany code snippets come from\n\n* https://github.com/rymc9384/DeepNLP_CS224N\n* https://github.com/gxlzj/cs224n-hw3​\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhankcs%2Fcs224n","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhankcs%2Fcs224n","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhankcs%2Fcs224n/lists"}