illinois-srl: Semantic Role Labeler
Running
You can use the illinois-srl system in either interactive or annotator mode.
Interactive mode
In interactive mode the user can input a single piece of text and get back the feedback from either the Nominal or Verbal SRL systems in plain text.
To run the system in interactive mode see the class edu.illinois.cs.cogcomp.srl.SemanticRoleLabeler
or simply run the script:
scripts/run-interactive.sh <config> <Verb|Nom>
Annotator
component
As an illinois-srl can also be used programmatically through the Annotator interface.
The main method is getView(TextAnnotation)
inside SemanticRoleLabeler
. This will add a new
PredicateArgumentView
for either Nominal or Verbal SRL.
Training
To train the SRL system you will require access to the Propbank
or Nombank corpora. You need to set pointers to these in the
config/srl-config.properties
file.
(To train the system with a non-Prop/Nombank corpus, you need to extend
AbstractSRLAnnotationReader
)
To perform the whole training/testing suite, run the Main
class with parameters <config-file> expt Verb|Nom true
.
This will:
- Read and cache the datasets (train/test)
- Annotate each
TextAnnotation
with the required views (here you can set theuseCurator
flag to false to use the CogComp's standalone NLP pipeline) - Pre-extract and cache the features for the classifiers
- Train the classifiers
- Evaluate on the (cached) test corpus
IMPORTANT After training, make sure you comment-out the pre-trained SRL model dependencies inside
pom.xml
(lines 27-38).