问题
我正在尝试 It's sunny on Monday and rainy on Tuesday
使用 RGL 在 GF 上生成句子。我在 RGL 页面上寻找了一种生成这句话的方法,但我找不到任何可能对此有所帮助的方法。在GitHubExtend.gf
上查看了有关 GF 的更多信息,我发现了这三行:
MkVPS : Temp -> Pol -> VP -> VPS ; -- hasn't slept
ConjVPS : Conj -> [VPS] -> VPS ; -- has walked and won't sleep
PredVPS : NP -> VPS -> S ; -- she [has walked and won't sleep]
乍一看,它们似乎很有希望,但是当我尝试在真实代码上实现它们时,似乎我误用了[VPS]
. 我的代码:
mkPhr(PredVPS
(it_NP)
(ConjVPS
(and_Conj)
(MkVPS
(mkTemp (futureTense) (simultaneousAnt))
(positivePol)
(mkVP
(mkVP (mkA "sunny"))
(SyntaxEng.mkAdv (on_Prep) (mkNP (mkN ("Monday"))))))
(MkVPS
(mkTemp (futureTense) (simultaneousAnt))
(positivePol)
(mkVP
(mkVP (mkA "rainy"))
(SyntaxEng.mkAdv (on_Prep) (mkNP (mkN ("Tuesday"))))))));
但是我遇到了这个错误,这显然是定义变量和预期变量的问题。
missing record fields: s1, s2 type of MkVPS (mkTemp futureTense simultaneousAnt) positivePol (AdvVP ((\a -> UseComp (CompAP (PositA a))) (regA "rainy")) (PrepNP on_Prep ((\n -> MassNP (UseN n)) (regN "Monday"))))
expected: {s1 : ResEng.Agr => Str; s2 : ResEng.Agr => Str}
inferred: {s : ResEng.Agr => Str; lock_VPS : {}}
问题
正确的使用方法是[VPS]
什么?