Basic samples
Basic samples seem intuitively simple but can be tricky to analyze. Compound sentences, adjectives, adverbs, and modals are not easy to identify, even for non-expert humans.
Let's begin with an easy sample for the transformer.
Sample 1
The first sample is long but relatively easy for the transformer:
"Did Bob really think he could prepare a meal for 50 people in only a few hours?
"
Run Sample 1 cell in SRL.ipynb
:
!echo '{"sentence": "Did Bob really think he could prepare a meal for 50 people in only a few hours?"}' | \
allennlp predict https://storage.googleapis.com/allennlp-public-models/bert-base-srl-2020.03.24.tar.gz -
The transformer identified the verb "think
," for example, as we can see in the following excerpt of the raw output of the cell:
prediction: {"verbs": [{"verb": "think", "description": "Did [ARG0: Bob] [ARGM-ADV: really...