在 GF 中生成所有格所有格

问题描述 投票:0回答:2

我在 GF 库中检查了“我朋友的房子”中的“’s”,但我似乎找不到创建这种关系的正确方法。希望有人指导我解决这个问题。

gf
2个回答
4
投票

核心 RGL 中的 's 所有格确实没有任何功能。仅使用 RGL API 可以获得的最接近的是“我朋友的房子”。

但是,有一个名为 Extend 的模块,它有一个功能

GenNP : NP -> Quant

那么如何使用Extend呢?您一直在使用 RGL API,当您打开语法和范式模块时,所有

mkX
操作都可用。 Extend 模块比核心 RGL 新得多,因此其功能未在概要中显示。但您可以像使用语法和范式模块一样使用它们。这是一个用法示例:

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 ;
}

如果您对如何使用 Extend 还有任何疑问,我很乐意为您提供帮助!

将其复制到名为 Test.gf 的文件中,然后像平常一样打开 GF shell。然后,您可以使用标志

-retain
导入文件,这允许您使用
cc
命令评估操作。像这样:

(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

1
投票

如果您在英语 RGL 中搜索所有格的实现(大部分是

Gen
),您可能会发现一些对您的实现有用的东西。

例如,CompatibilityEng.gf 中有

addGenitiveS
,ResEng.gf 中有
regGenitiveS

> cc -table ResEng.regGenitiveS "dog"
ResEng.Nom => dog
ResEng.Gen => dog's
© www.soinside.com 2019 - 2024. All rights reserved.