프로젝트
GitHub에서 보기
kentonl/e2e-coref
소개
종단 간 신경망 상호참조 해결
AI 및 머신러닝측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalHigher-order Coreference Resolution with Coarse-to-fine Inference
Introduction
This repository contains the code for replicating results from
- Higher-order Coreference Resolution with Coarse-to-fine Inference
- Kenton Lee, Luheng He, and Luke Zettlemoyer
- In NAACL 2018
Getting Started
- Install python (either 2 or 3) requirements:
pip install -r requirements.txt - Download pretrained models at https://drive.google.com/file/d/1fkifqZzdzsOEo0DXMzCFjiNXqsKG_cHi
- Move the downloaded file to the root of the repo and extract:
tar -xzvf e2e-coref.tgz
- Move the downloaded file to the root of the repo and extract:
- Download GloVe embeddings and build custom kernels by running
setup_all.sh.- There are 3 platform-dependent ways to build custom TensorFlow kernels. Please comment/uncomment the appropriate lines in the script.
- To train your own models, run
setup_training.sh- This assumes access to OntoNotes 5.0. Please edit the
ontonotes_pathvariable.
- This assumes access to OntoNotes 5.0. Please edit the
Training Instructions
- Experiment configurations are found in
experiments.conf - Choose an experiment that you would like to run, e.g.
best - Training:
python train.py <experiment> - Results are stored in the
logsdirectory and can be viewed via TensorBoard. - Evaluation:
python evaluate.py <experiment>
Demo Instructions
- Command-line demo:
python demo.py final - To run the demo with other experiments, replace
finalwith your configuration name.
Batched Prediction Instructions
- Create a file where each line is in the following json format (make sure to strip the newlines so each line is well-formed json):
{
"clusters": [],
"doc_key": "nw",
"sentences": [["This", "is", "the", "first", "sentence", "."], ["This", "is", "the", "second", "."]],
"speakers": [["spk1", "spk1", "spk1", "spk1", "spk1", "spk1"], ["spk2", "spk2", "spk2", "spk2", "spk2"]]
}
clustersshould be left empty and is only used for evaluation purposes.doc_keyindicates the genre, which can be one of the following:"bc", "bn", "mz", "nw", "pt", "tc", "wb"speakersindicates the speaker of each word. These can be all empty strings if there is only one known speaker.- Run
python predict.py <experiment> <input_file> <output_file>, which outputs the input jsonlines with predicted clusters.
Other Quirks
- It does not use GPUs by default. Instead, it looks for the
GPUenvironment variable, which the code treats as shorthand forCUDA_VISIBLE_DEVICES. - The training runs indefinitely and needs to be terminated manually. The model generally converges at about 400k steps.
관련 프로젝트 살펴보기
불러오는 중…