{"id":44902910,"url":"https://github.com/miyyer/dan","last_synced_at":"2026-03-02T15:00:29.369Z","repository":{"id":35566945,"uuid":"39838961","full_name":"miyyer/dan","owner":"miyyer","description":"Deep Averaging Networks","archived":false,"fork":false,"pushed_at":"2022-01-18T22:12:49.000Z","size":21,"stargazers_count":235,"open_issues_count":2,"forks_count":55,"subscribers_count":15,"default_branch":"master","last_synced_at":"2023-10-20T21:50:52.145Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/miyyer.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":"2015-07-28T14:32:36.000Z","updated_at":"2023-09-19T05:58:02.000Z","dependencies_parsed_at":"2022-09-18T00:22:29.411Z","dependency_job_id":null,"html_url":"https://github.com/miyyer/dan","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/miyyer/dan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyyer%2Fdan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyyer%2Fdan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyyer%2Fdan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyyer%2Fdan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miyyer","download_url":"https://codeload.github.com/miyyer/dan/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyyer%2Fdan/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30007043,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T14:08:50.421Z","status":"ssl_error","status_checked_at":"2026-03-02T14:08:50.037Z","response_time":60,"last_error":"SSL_read: 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":[],"created_at":"2026-02-17T22:01:18.263Z","updated_at":"2026-03-02T15:00:29.363Z","avatar_url":"https://github.com/miyyer.png","language":"Python","readme":"# Deep Averaging Networks (DAN)\ncode for model described in\n\u003chttp://cs.umd.edu/~miyyer/pubs/2015_acl_dan.pdf\u003e along with negation dataset (negation_dataset.txt). \nfeel free to email me at miyyer@umd.edu with any comments/problems/questions/suggestions.\n\n### dependencies: \n- python 2.7.9, numpy 1.9.2 (might work w/ other versions but not tested), nltk\n\n### commands to run DAN on Stanford Sentiment Treebank:\n- bash run.sh (downloads word embeddings and dataset, preprocesses PTB trees into DAN format)\n- python dan_sentiment.py (can tweak hyperparameters via command-line arguments, currently this runs the fine-grained experiment on only root-level labels and should take a few minutes to finish training)\n\n### QA DAN code available in the repository for our full quiz bowl system \n- https://github.com/Pinafore/qb/blob/master/qanta/guesser/dan.py\n\n### DAN input format (for your own data!):\n- each training/test instance must be a tuple with the following format: ([list of word embedding lookup indices associated with text], label)\n- if you want to use pretrained word embeddings, you should also pass a pickled matrix using the --We argument, where the matrix is of size d x V (each column stores the embedding for the corresponding word lookup index)\n\n### important hyperparameters:\n- batch size (the smaller the better, but also slower)\n- adagrad initial learning rate (should be decreased as the batch size is decreased)\n- word dropout probability (30% is the default but might be too high for some tasks)\n- number of epochs (increase when using random initialization)\n\nif you use this code, please cite:\n\n    @InProceedings{Iyyer:Manjunatha:Boyd-Graber:III}-2015,\n        Title = {Deep Unordered Composition Rivals Syntactic Methods for Text Classification},\n        Booktitle = {Association for Computational Linguistics},\n        Author = {Mohit Iyyer and Varun Manjunatha and Jordan Boyd-Graber and Hal {Daum\\'{e} III}},\n        Year = {2015},\n        Location = {Beijing, China}\n    }\n","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyyer%2Fdan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiyyer%2Fdan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyyer%2Fdan/lists"}