{"id":19467617,"url":"https://github.com/thunlp/mnre","last_synced_at":"2025-04-25T11:31:38.574Z","repository":{"id":76097124,"uuid":"88963834","full_name":"thunlp/MNRE","owner":"thunlp","description":"The code and data for ACL2017 paper \"Neural Relation Extraction with Multi-lingual Attention\"","archived":false,"fork":false,"pushed_at":"2017-04-29T02:30:35.000Z","size":21,"stargazers_count":45,"open_issues_count":1,"forks_count":17,"subscribers_count":9,"default_branch":"master","last_synced_at":"2023-10-20T23:29:02.261Z","etag":null,"topics":["relation-extraction"],"latest_commit_sha":null,"homepage":null,"language":"C++","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/thunlp.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}},"created_at":"2017-04-21T08:56:17.000Z","updated_at":"2023-10-20T23:29:02.553Z","dependencies_parsed_at":"2023-03-11T21:29:31.852Z","dependency_job_id":null,"html_url":"https://github.com/thunlp/MNRE","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunlp%2FMNRE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunlp%2FMNRE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunlp%2FMNRE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunlp%2FMNRE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thunlp","download_url":"https://codeload.github.com/thunlp/MNRE/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223998571,"owners_count":17238778,"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":["relation-extraction"],"created_at":"2024-11-10T18:36:14.318Z","updated_at":"2024-11-10T18:36:14.956Z","avatar_url":"https://github.com/thunlp.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Neural Relation Extraction with Multi-lingual Attention (MNRE)\n==========\n\nNeural relation extraction aims to extract relations from plain text with neural models, which has been the state-of-the-art methods for relation extraction. In this project, we provide our implementations of CNN [Zeng et al., 2014] and PCNN [Zeng et al.,2015] and their extended version with multi-lingual sentence-level attention scheme [Lin et al., 2017] .\n\n \nData\n==========\n\nWe provide the  dataset we used for the task relation extraction in  (https://pan.baidu.com/s/1dF26l93). We preprocess the original data to make it satisfy the input format of our codes. \n\nPre-Trained English Word Vectors are learned from New York Times Annotated Corpus (LDC Data LDC2008T19), which should be obtained from LDC (https://catalog.ldc.upenn.edu/LDC2008T19).\n\nPre-Trained Chinese Word Vectors are learned from Chinese Baidu Baike (https://baike.baidu.com/).\n\nTo run our code, the dataset should be put in the folder data/ using the following format, containing six files\n\n+ train_en.txt / train_zh.txt: training file, format (wikidata_qid_e1, wikidata_qid_e2, e1_name, e2_name, relation, sentence).\n\n+ valid_en.txt / valid_zh.txt: validation file, same format as train.txt \n\n+ test_en.txt / test_zh.txt: test file, same format as train.txt.\n\n+ entity2id.txt: all entities and corresponding ids, one per line.\n\n+ relation2id.txt: all relations and corresponding ids, one per line.\n\n+ vec_en.bin, vec_zh.bin: the pre-train word embedding file\n\nCodes\n==========\n\nThe source codes of various methods are put in the folders src/.\n\nCompile \n==========\n\nJust type \"make\" in the folder src/.\n\nTrain\n==========\n\nFor training, you need to type the following command in each model folder:\n\n./train\n\nThe training model file will be saved in folder out/ .\n\nTest\n==========\n\nFor testing, you need to type the following command in each model folder:\n\n./test\n\nThe testing result which reports the precision/recall curve  will be shown in pr.txt.\n\nCite\n==========\n\nIf you use the code, please cite the following paper:\n\n[Lin et al., 2017] Yankai Lin, Zhiyuan Liu, and Maosong Sun. Neural Relation Extraction with Multi-lingual Attention. In Proceedings of ACL.[[pdf]](http://thunlp.org/~lyk/publications/acl2017_mnre.pdf)\n\nReference\n==========\n[Zeng et al., 2014] Daojian Zeng, Kang Liu, Siwei Lai, Guangyou Zhou, and Jun Zhao. Relation classification via convolutional deep neural network. In Proceedings of COLING.\n\n[Zeng et al.,2015] Daojian Zeng,Kang Liu,Yubo Chen,and Jun Zhao. Distant supervision for relation extraction via piecewise convolutional neural networks. In Proceedings of EMNLP.\n\n[Lin et al., 2016] Yankai Lin, Shiqi Shen, Zhiyuan Liu, Huanbo Luan, and Maosong Sun. Neural Relation Extraction with Selective Attention over Instances. In Proceedings of ACL.[[pdf]](http://thunlp.org/~lyk/publications/acl2016_nre.pdf)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthunlp%2Fmnre","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthunlp%2Fmnre","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthunlp%2Fmnre/lists"}