Adding missing entities#

Sometimes you see that some entities are missing from a domain. There is an easy solution to improve any domain: to write lexicons and rules to complement it.

For instance, we do not find “Ncuti Gatwa” as a Person.

We have some solutions at hand. First, we can add it as a Person with a lexicon:

lexicon: { Ncuti Gatwa } = Person;

We can try straightaway with the snippet app. Remember to pass your snippet or domain before the entity domain so that it can be picked up:

wow -p 'english,snippet(lexicon:{Ncuti Gatwa }=Person;).app,entity' \
 -i "I saw Ncuti Gatwa ."

This solution, however does not give us the fine-grained information that the Person entity usually produces, for instance what’s the given and family name, or the gender. This information is also importan for anaphora resolution and conjecture. We advise to pass the annotation GivenName or FamilyName (one of them is enough) and the let the entity domain figure out the rest:

lexicon: { Ncuti } = GivenName@(gender="male");

Let’s try with the snippet app:

wow -p 'english,snippet(lexicon:{Ncuti}=GivenName@(gender="male");).app,entity' \
-i "I saw Ncuti Gatwa . He is very friendly"

We see in the results, that we get a canical , given and family name as well as anaphora resolution:

S:(  0, 19)
C:(  0, 19): Sentence
T:(  0,  1): I,{+1p, +init-cap, +init-token, +nom, +sg},[I:Pron-Pers]
C:(  2,  5): VP,@(negation='false' voice='active' )
T:(  2,  5): saw,[see:V-Past]
C:(  6, 17): Person,@(canonical='Ncuti Gatwa' family='Gatwa' gender='male' given='Ncuti' )
C:(  6, 17): NP
C:(  6, 11): PersonGiv
C:(  6, 11): GivenName,@(gender='male' standalone='Yes' )
T:(  6, 11): Ncuti,{+init-cap, +nf, +nf-lex},[Ncuti:Prop-Std]
C:( 12, 17): PersonFam
T:( 12, 17): Gatwa,{+init-cap, +nf, +nf-lex},[Gatwa:Prop-Std]
T:( 18, 19): .,[.:Punct-Sent]
S:( 20, 39)
C:( 20, 39): Sentence
C:( 20, 22): Person,@(canonical='Ncuti Gatwa' family='Gatwa' gender='male' given='Ncuti' )
T:( 20, 22): He,{+3p, +init-cap, +init-token, +nom, +sg},[he:Pron-Pers]
C:( 23, 25): VP,@(negation='false' voice='active' )
T:( 23, 25): is,[be:V-Pres-Sg-be]
T:( 26, 30): very,[very:Adv-Std]
T:( 31, 39): friendly,[friendly:Adv-Std]