This is thin wrapper over AllenNLP's pretrained Open IE model.
Outputs predictions identical to those in the onlline demo, with batched gpu options.
- AllenNLP
- docopt
- tqdm
Use the following to install requirements:
pip install -r requirements.txt
cd src
python run_oie.py --in=path/to/input/file --batch-size=<batch-size> --out=path/to/output/file [--cuda-device=<cude-device-identifier>]
If --cuda-device
is not specified, the model will run on the cpu.
Raw sentences, each in a new line.
Each line pertains to a single OIE extraction:
tokenized sentence <tab> ARG0:.. <tab> V:... <tab> ARG1:... ...
See example of input and output files in src/example.txt and src/example.oie.