Skip to content

Instantly share code, notes, and snippets.

View tsengchan's full-sized avatar

tsengchan

View GitHub Profile
@lan2720
lan2720 / allennlp_srl.py
Last active June 5, 2021 14:02
Demo for using AllenNLP Semantic Role Labeling (http://allennlp.org/)
"""
Usage:
python allennlp_srl.py \
https://s3-us-west-2.amazonaws.com/allennlp/models/srl-model-2017.09.05.tar.gz \
examples.json
Note:
each line in examples.json is one sentence, such as:
Which NFL team represented the AFC at Super Bowl 50?
Where did Super Bowl 50 take place?