Extracting dependency relations with DependencyMatcher
To extract the intent of the utterances, we need to match tokens based on their syntax relationship with each other. The goal is to find out what sort of intent the user carries – to book a flight, purchase a meal on their already booked flight, cancel their flight, and so on. Every intent includes a verb (to book) and an object that the web acts on (flight, hotel, meal, and so on).
In this section, we’ll extract transitive verbs and their direct objects from utterances. We’ll begin our intent recognition section by extracting the transitive verb and the direct object of the verb. Before we move on to extracting transitive verbs and their direct objects, let’s first quickly go over the concepts of transitive verbs and direct/indirect objects.
Linguistic primer
Let’s explore some linguistic concepts related to sentence structure, including verbs and verb-object relations. A verb is a very...