Conjugating Phrasal Verbs

Written by on October 13, 2019 in Natural Language Processing, Programming, Prolog with 0 Comments

In the last article, I showed how to generate verb conjugations in the “iLexicon” system. Today, let us see how this idea can be extended to English “phrasal verbs”.

According to Wikipedia:

“a phrasal verb is a phrase such as turn down or ran into which combines two or three words from different grammatical categories: a verb and a particle and/or a preposition together form a single semantic unit.”

I found this article quite informative.

Phrasal verbs add richness to the prose, and are therefore widely used. However, to use them correctly, we should understand where the corresponding “object” should appear in the sentence. Some phrasal verbs allow the object to appear between the main verb and the rest of the phrase, whereas others require the object to be placed after the phrasal verb. We will see some examples below.

“iLexicon” contains information about a few hundred phrasal verbs (this number is growing). Just as we can supply <Person, Number, Tense> to a single “verb” to get its conjugation, we can supply the same parameters to a “phrasal verb” in “iLexicon” and get its fully conjugated form. Note that since some phrasal verbs are “separable”, we will get multiple conjugations for the same parameters, depending on the positioning of the object.

Let us look at some examples. Instead of showing the Prolog REPL, this time I decided to build a simple Windows Forms application in C# using Visual Studio 2019. This app dynamically loads the Sicstus Prolog DLL and makes calls to the appropriate functions (to learn how to build Sicstus Prolog DLL on Windows, please see this article).

Here is the first example:

Conjugating Phrasal Verb

Conjugating Phrasal Verb

This simple app allows us to select a phrasal verb from the list that “iLexicon” contains in its KB. We can also specify one of the 16 tenses supported (see the earlier article for the list of tenses). The object required to complete the usage of the phrasal verb can be entered in the “Object” edit field. For simplicity, I am assuming a fixed subject called “Mary” (3rd Person Singular). When we click “Apply”, the system generates the correct instantiations of the selected phrasal verb based on the supplied parameters and displays that information in the text area at the bottom. 

This first example shows the phrasal verb “break into”.

The second example, given below, is about the phrasal verb “pay off”. 

Conjugating "Pay Off"

Conjugating “Pay Off”

As this example shows, this phrasal verb is separable and hence we get two ways in which we can use it.

And here is our third and final example:

Conjugation of "Turn on"

Conjugation of “Turn on”

This is also quite similar to “Pay off” in that it is separable. 

The challenge in automatically conjugating such phrasal verbs is in identifying the main verb and knowing whether it is separable or not. iLexicon’s knowledgebase contains detailed information about many common phrasal verbs, thus enabling automatic conjugation based on <Person, Number, Tense> triple.

I mentioned earlier that the Prolog engine is invoked by my Windows Forms app through a DLL. The actual Prolog predicate that does the job of conjugating a phrasal verb is shown below:

Prolog Predicate

Prolog Predicate

The above is just one of the many predicates exposed via the DLL. Of course, I had to solve some interesting parameter passing challenges between the C++ DLL and the C# application. But that is the fun of being a software developer!

That is it for today. Have a great weekend!


Tags: , , ,


If you enjoyed this article, subscribe now to receive more just like it.

Subscribe via RSS Feed

Leave a Reply

Your email address will not be published. Required fields are marked *