{"id":13753210,"url":"https://github.com/AIRobotZhang/STCKA","last_synced_at":"2025-05-09T20:35:02.798Z","repository":{"id":143102912,"uuid":"230724501","full_name":"AIRobotZhang/STCKA","owner":"AIRobotZhang","description":"Reproducing the paper — Deep Short Text Classification with Knowledge Powered Attention","archived":false,"fork":false,"pushed_at":"2021-02-17T14:21:57.000Z","size":5868,"stargazers_count":101,"open_issues_count":8,"forks_count":18,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-16T05:32:37.000Z","etag":null,"topics":[],"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/AIRobotZhang.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":"2019-12-29T08:38:21.000Z","updated_at":"2024-04-05T14:43:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"e851e9e1-f151-426a-bc91-41de721ac3c0","html_url":"https://github.com/AIRobotZhang/STCKA","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/AIRobotZhang%2FSTCKA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AIRobotZhang%2FSTCKA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AIRobotZhang%2FSTCKA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AIRobotZhang%2FSTCKA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AIRobotZhang","download_url":"https://codeload.github.com/AIRobotZhang/STCKA/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253321840,"owners_count":21890476,"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":[],"created_at":"2024-08-03T09:01:18.354Z","updated_at":"2025-05-09T20:34:57.738Z","avatar_url":"https://github.com/AIRobotZhang.png","language":"Python","funding_links":[],"categories":["文本分类"],"sub_categories":[],"readme":"# Deep Short Text Classification with Knowledge Powered Attention\nFor the purpose of measuring the importance of knowledge, deep Short Text Classification with Knowledge powered Attention (STCKA) method introduces attention mechanisms, utilizing Concept towards Short Text (CST) attention and Concept towards Concept Set (C-CS) attention to acquire the weight of concepts from two aspects. And it can classify a short text with the help of conceptual information. Paper is available at [this site](https://arxiv.org/pdf/1902.08050.pdf).\n\n#### For the purpose of reproducing this paper, we implemented this code.\n\n## Requirements\n* Python==3.7.4\n* pytorch==1.3.1\n* torchtext==0.3.1\n* numpy\n* tqdm\n\n## Input data format\nSnippets and TagMyNews Dataset can be available in dataset folder. The data format is as follows('\\t' means TAB):\n\n```\norigin text \\t concepts\n...\n```\n\n## How to run\nTrain \u0026 Dev \u0026 Test:\nOriginal dataset is randomly split into 80% for training and 20% for test. 20% of randomly selected training instances are used to form development set.\n\n```console\npython main.py --epoch 100 --lr 2e-4 --train_data_path dataset/tagmynews.tsv --txt_embedding_path dataset/glove.6B.300d.txt --cpt_embedding_path dataset/glove.6B.300d.txt  --embedding_dim 300 --train_batch_size 128 --hidden_size 64\n```\n\nMore detailed configurations can be found in `config.py`, which is in utils folder.\n\n## Cite\n```\nChen J, Hu Y, Liu J, et al. Deep Short Text Classification with Knowledge Powered Attention[J]. 2019.\n```\n\n## Disclaimer\n\nThe code is for research purpose only and released under the Apache License, Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAIRobotZhang%2FSTCKA","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAIRobotZhang%2FSTCKA","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAIRobotZhang%2FSTCKA/lists"}