I checked the GF library for "’s" as in "My friend’s house", but I couldn't seem to find the right method to create such a relation. May someone guide me on this problem.
There's indeed no function for the 's possessive in the core RGL. The closest you can get using just the RGL API is "the house of my friend".
However, there is a module called Extend, which has a function GenNP : NP -> Quant
.
So how to use Extend? You have been using the RGL API, where all of the mkX
opers are available when you open the Syntax and Paradigms modules. The Extend module is much newer than the core RGL, so its functions are not shown in the synopsis. But you can use them just like you'd use the Syntax and Paradigms modules. Here's an example usage:
resource Test = open SyntaxEng, ParadigmsEng, LexiconEng, ExtendEng in {
oper
-- "the house of my friend"
house1 : NP = mkNP the_Det (mkCN (mkN2 house_N) (mkNP i_Pron friend_N)) ;
-- "my friend's house"
house2 : NP =
let myFriend : NP = mkNP i_Pron friend_N ;
myFriends : Quant = GenNP myFriend ; -- GenNP is from ExtendEng
in mkNP myFriends house_N ;
}
If you have any further questions on how to use Extend, I'll be glad to help!
Copy that into a file called Test.gf, and open your GF shell as you normally do. Then you can import the file with the flag -retain
, that allows you to evaluate opers with the cc
command. Like this:
(You need to be inside the GF shell, not on the command line)
> i -retain Test.gf
> cc -one house1
the house of my friend
> cc -one house2
my friend's house