{"id":20357912,"url":"https://github.com/alanshaw-github/toyrnntext","last_synced_at":"2025-04-12T03:14:58.947Z","repository":{"id":159567805,"uuid":"154596490","full_name":"AlanShaw-GitHub/toyRNNText","owner":"AlanShaw-GitHub","description":"This is a toy implementation of RNNText on zhihu tag classification dataset.","archived":false,"fork":false,"pushed_at":"2018-10-25T02:21:03.000Z","size":1132,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-12T03:14:54.926Z","etag":null,"topics":["python","rnn","tensorflow","textclassification","zhihu"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlanShaw-GitHub.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":"2018-10-25T02:12:46.000Z","updated_at":"2019-05-20T07:19:34.000Z","dependencies_parsed_at":"2023-05-03T06:46:19.334Z","dependency_job_id":null,"html_url":"https://github.com/AlanShaw-GitHub/toyRNNText","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/AlanShaw-GitHub%2FtoyRNNText","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlanShaw-GitHub%2FtoyRNNText/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlanShaw-GitHub%2FtoyRNNText/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlanShaw-GitHub%2FtoyRNNText/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlanShaw-GitHub","download_url":"https://codeload.github.com/AlanShaw-GitHub/toyRNNText/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248510001,"owners_count":21116130,"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":["python","rnn","tensorflow","textclassification","zhihu"],"created_at":"2024-11-14T23:24:29.216Z","updated_at":"2025-04-12T03:14:58.942Z","avatar_url":"https://github.com/AlanShaw-GitHub.png","language":"Python","readme":"# toyRNNText\n\nRequirements:\n\n- python  \u003e= 3.6\n- tensorflow \u003e= 1.10\n- jieba\n- gensim\n- numpy\n- pickle\n\n### Shutouts:\n\n![demo](demo.jpg)\n\nThis is a toy implementation of a common **text classification** model called RNNText.\n\nIt uses the end2end architecture which takes a sentence as input, and directly predicts the labels it belongs to.\n\nDiffer from the traditional methods like SVM etc. It uses neural networks to encode the huge information and corelations between sentences and corresponding tags.\n\nThe model is extremely simple(main model part takes less than 50 lines), we argue that the results mainly achieved by tuning the hyper-parameters and empirical tricks.\n\nWe also found that adding L2 normalization punishment to the final loss function significantly benefits the results on valid set, it's probably because the neural-network-like models easily get overfitted on the training set.\n\nThe original dataset is from NLPCC website, check this link:http://tcci.ccf.org.cn/conference/2018/taskdata.php\n\nThe word embedding use pretrained Google word2vec model on open source wikipedia(chinese) dumps, and is fine-tuned during the training process, which also benefits the results on valid set.\n\nI will release the pretained model on 100k sentences(10k different  labels) and the preprocessed data(also 100k ,pickle format).Note that the original dataset contains over 700k sentences(20k labels) .\n\nTo use the pretained model(100k), you need to first download the cleaned dataset and tensorflow checkpoint on www.freedomworld.cn/toyRNNText , then put the dataset on root path(./) , and the checkpoints on ./model_path_large.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falanshaw-github%2Ftoyrnntext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falanshaw-github%2Ftoyrnntext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falanshaw-github%2Ftoyrnntext/lists"}