-
Book Overview & Buying
-
Table Of Contents
Transformers for Natural Language Processing
By :
In this section, we will run samples that contain problems that the BERT-based transformer will first solve. We will end with an intractable sample.
Let's start with a complex sample that the BERT-based transformer can analyze.
Sample 4 takes us into more tricky SRL territory. The sample separates "Alice" from the verb "liked," creating a long-term dependency that has to jump over "whose husband went jogging every Sunday."
The sentence is:
"Alice, whose husband went jogging every Sunday, liked to go to a dancing class in the meantime."
A human can isolate "Alice" and find the predicate:
"Alice, whose husband went jogging every Sunday,liked to go to a dancing class in the meantime."
Can the BERT model find the predicate like us?
Let's find out by first running the code in SRL.ipynb:
!echo '{"sentence": "Alice, whose husband went...