Implementation of Modeling Joint Entity and Relation Extraction with Table Representation in EMNLP2014
Sun JDK 1.7 or more
~20GB RAM (depending on corpus size)
This software depends on the following libraries:
We put these libraries under the lib/ directory for convenience.
ant jar
Prerequisites
- mecab (with neologd)
- cabocha
Data preparation
git submodule init
git submodule update
pushd ranis_data
bash scripts/JA/prepare_data.sh dev
bash scripts/JA/prepare_data.sh test
popd
Relation Extraction
- Train
java -cp jointER.jar data.nlp.relation.RelationTrain yaml/parameters-ranis-ja-rel.yaml
- Test
java -cp jointER.jar data.nlp.relation.RelationPredict yaml/parameters-ranis-ja-rel.yaml
Results will be produced as ranis_data/conv/test/*.pred.ann
Joint Entity and Relation Extraction
- Train
java -cp jointER.jar data.nlp.joint.JointTrain yaml/parameters-ranis-ja-joint.yaml
- Test
java -cp jointER.jar data.nlp.joint.JointPredict yaml/parameters-ranis-ja-joint.yaml
Please uncompress and use model files in ranis_data/pretrained if you want to use pretrained models.
Prerequisites
- enju
Data preparation
git submodule init # required if ranis is not updated
git submodule update # required if ranis is not updated
pushd ranis_data
bash scripts/EN/prepare_data.sh dev
bash scripts/EN/prepare_data.sh test
popd
Note: This package does not handle nested/disjoint entities and intersentential entities and relations.
Joint Entity and Relation Extraction
- Train
java -cp jointER.jar data.nlp.joint.JointTrain yaml/parameters-ranis-en-joint.yaml
- Test
java -cp jointER.jar data.nlp.joint.JointPredict yaml/parameters-ranis-en-joint.yaml
Please modify the yaml file.
Please cite our paper when using this tool.
- Makoto Miwa and Yutaka Sasaki. Modeling Joint Entity and Relation Extraction with Table Representation. In the Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP 2014). pp. 1858--1869, October 2014.
This work was supported by the TTI Start-Up Research Support Program and the JSPS Grant-in-Aid for Young Scientists (B) [grant number 25730129].