adding (|) functionality to determiner on GF

50 views Asked by At

On GF writing sentences' tree often encounter many options where multiple prepositions could be used in the same tree such as

Download it on my phone

Download it to my phone

Download it onto my phone

... and the list goes on and on.

this kind of problem could be solved as below

(on_Prep|to_Prep|...)

But in some situations, this problem occurs with determiners such as

Eat the food

Eat food

I know the meaning of the above sentences is not exactly the same but is there any way to accomplish such a goal?

I tried the following but it seemed unlogical.

mkNP
    (the_Det|)
    (mkN ("food"))

I also tried to add an empty string for determiner such as mkDet (mkDigits ("")) but unfortunately, the above two ways seem not smart enough.

1

There are 1 answers

0
inariksit On BEST ANSWER

Your general approach with using | is correct.

There is no empty determiner, but rather another overload instance of mkNP. There's one with a determiner (so Det -> N -> NP) and another without, just N -> NP. So you can do this:

eat_food_VP : VP = 
  mkVP eat_V2 (mkNP the_Det food_N | mkNP food_N) ;