就像@aschepler所说,“由 BBC 主持”是分词短语,而不是被动语态。在Extend模块中,有几个函数可以从 VP 创建分词:
PastPartAP : VPSlash -> AP ; -- lost (opportunity) ; (opportunity) lost in space
PastPartAgentAP : VPSlash -> NP -> AP ; -- (opportunity) lost by the company
所以我们可以用PastPartAgentAP
分词“hosted by BBC”来创建分词。如果您ExtendEng
在 GF 文件中打开,您可以使用它的所有功能,就像您已经在使用 SyntaxEng 和 ParadigmsEng 一样。(另请参阅此答案。)
这是一个示例,您可以将其复制并粘贴到名为Comedy.gf
并在 GF shell 中使用的文件中。
resource Comedy = open SyntaxEng, ParadigmsEng, ExtendEng in {
oper
-- Some lexicon
comedy_N : N = mkN "comedy" ;
host_V2 : V2 = mkV2 "host" ;
play_V2 : V2 = mkV2 "play" ;
BBC_PN : PN = mkPN "BBC" ;
-- Intermediate phrases
hosted_by_BBC : AP =
PastPartAgentAP (mkVPSlash host_V2) (mkNP BBC_PN) ;
comedy_hosted_by_BBC : NP =
mkNP a_Det (mkCN comedy_N hosted_by_BBC) ;
-- The final phrase
play_comedy_hosted_by_BBC : Utt =
mkUtt (mkImp (mkVP play_V2 comedy_hosted_by_BBC)) ;
}
当您在带有标志的 GF shell 中打开 Comedy.gf 时-retain
,您可以使用命令检查词典和中间结果cc
。例如:
> cc -table comedy_hosted_by_BBC
s . NCase Nom => a comedy hosted by BBC
s . NCase Gen => a comedy's hosted by BBC
s . NPAcc => a comedy hosted by BBC
s . NPNomPoss => a comedy hosted by BBC
a . AgP3Sg Neutr
> cc -one play_comedy_hosted_by_BBC
play a comedy hosted by BBC