Basic samples
Basic samples seem intuitively simple but can be tricky to analyze. Compound sentences, adjectives, adverbs, and modals are difficult 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 the Sample 1 cell in SRL.ipynb
:
prediction=predictor.predict(
sentence="Did Bob really think he could prepare a meal for 50 people in only a few hours?"
)
head(prediction)
BERT SRL identified the four predicates; the verb for each one labeled the result as shown in this excerpt using the head(prediction)
function:
Verb: Did [V: Did] Bob really think he could prepare a meal for 50 people in only a few hours ?
Verb: think Did [ARG0: Bob] [ARGM-ADV: really] [V: think] [ARG1: he could prepare a meal for 50 people in only a few hours...