added documentation of list constructors to abstract/ files to improve the absfun document

This commit is contained in:
aarne
2015-10-19 13:21:33 +00:00
parent 0c229c9108
commit 90a5c3fe85
4 changed files with 218 additions and 34 deletions

View File

@@ -7,7 +7,7 @@
<CENTER>
<H1>GF RGL Functions</H1>
<FONT SIZE="4"><I>generated by lib/src/doc/AbsFunFoc.hs</I></FONT><BR>
<FONT SIZE="4">20151015</FONT>
<FONT SIZE="4">20151019</FONT>
</CENTER>
<P>
@@ -198,6 +198,76 @@ Functions in this table have links, e.g. <A HREF="http://www.grammaticalframewor
<TD><A HREF="../src/translator/Extensions.gf">Extensions</A></TD>
</TR>
<TR>
<TD>BaseAP<a name="BaseAP"></a></TD>
<TD>AP -&gt; AP -&gt; ListAP</TD>
<TD><I>red, white</I></TD>
<TD>head conj</TD>
<TD><A HREF="../src/abstract/Conjunction.gf">Conjunction</A></TD>
</TR>
<TR>
<TD>BaseAdV<a name="BaseAdV"></a></TD>
<TD>AdV -&gt; AdV -&gt; ListAdV</TD>
<TD><I>always, sometimes</I></TD>
<TD>head conj</TD>
<TD><A HREF="../src/abstract/Conjunction.gf">Conjunction</A></TD>
</TR>
<TR>
<TD>BaseAdv<a name="BaseAdv"></a></TD>
<TD>Adv -&gt; Adv -&gt; ListAdv</TD>
<TD><I>here, there</I></TD>
<TD>head conj</TD>
<TD><A HREF="../src/abstract/Conjunction.gf">Conjunction</A></TD>
</TR>
<TR>
<TD>BaseCN<a name="BaseCN"></a></TD>
<TD>CN -&gt; CN -&gt; ListCN</TD>
<TD><I>man, woman</I></TD>
<TD>head conj</TD>
<TD><A HREF="../src/abstract/Conjunction.gf">Conjunction</A></TD>
</TR>
<TR>
<TD>BaseIAdv<a name="BaseIAdv"></a></TD>
<TD>IAdv -&gt; IAdv -&gt; ListIAdv</TD>
<TD><I>where, when</I></TD>
<TD>head conj</TD>
<TD><A HREF="../src/abstract/Conjunction.gf">Conjunction</A></TD>
</TR>
<TR>
<TD>BaseNP<a name="BaseNP"></a></TD>
<TD>NP -&gt; NP -&gt; ListNP</TD>
<TD><I>John, Mary</I></TD>
<TD>head conj</TD>
<TD><A HREF="../src/abstract/Conjunction.gf">Conjunction</A></TD>
</TR>
<TR>
<TD>BaseRS<a name="BaseRS"></a></TD>
<TD>RS -&gt; RS -&gt; ListRS</TD>
<TD><I>who walks, whom I know</I></TD>
<TD>head conj</TD>
<TD><A HREF="../src/abstract/Conjunction.gf">Conjunction</A></TD>
</TR>
<TR>
<TD>BaseS<a name="BaseS"></a></TD>
<TD>S -&gt; S -&gt; ListS</TD>
<TD><I>John walks, Mary runs</I></TD>
<TD>head conj</TD>
<TD><A HREF="../src/abstract/Conjunction.gf">Conjunction</A></TD>
</TR>
<TR>
<TD>BaseVPI<a name="BaseVPI"></a></TD>
<TD>VPI -&gt; VPI -&gt; ListVPI</TD>
<TD><I>to walk, to run</I></TD>
<TD>-</TD>
<TD><A HREF="../src/translator/Extensions.gf">Extensions</A></TD>
</TR>
<TR>
<TD>BaseVPS<a name="BaseVPS"></a></TD>
<TD>VPS -&gt; VPS -&gt; ListVPS</TD>
<TD><I>walks, has run</I></TD>
<TD>-</TD>
<TD><A HREF="../src/translator/Extensions.gf">Extensions</A></TD>
</TR>
<TR>
<TD>ByVP<a name="ByVP"></a></TD>
<TD>VP -&gt; Adv</TD>
<TD><I>by publishing the document</I></TD>
@@ -423,82 +493,152 @@ Functions in this table have links, e.g. <A HREF="http://www.grammaticalframewor
</TR>
<TR>
<TD>ConjAP<a name="ConjAP"></a></TD>
<TD>Conj -&gt; [AP] -&gt; AP</TD>
<TD>Conj -&gt; ListAP -&gt; AP</TD>
<TD><I>cold and warm</I></TD>
<TD>cc head</TD>
<TD><A HREF="../src/abstract/Conjunction.gf">Conjunction</A></TD>
</TR>
<TR>
<TD>ConjAdV<a name="ConjAdV"></a></TD>
<TD>Conj -&gt; [AdV] -&gt; AdV</TD>
<TD>Conj -&gt; ListAdV -&gt; AdV</TD>
<TD><I>always or sometimes</I></TD>
<TD>cc head</TD>
<TD><A HREF="../src/abstract/Conjunction.gf">Conjunction</A></TD>
</TR>
<TR>
<TD>ConjAdv<a name="ConjAdv"></a></TD>
<TD>Conj -&gt; [Adv] -&gt; Adv</TD>
<TD>Conj -&gt; ListAdv -&gt; Adv</TD>
<TD><I>here or there</I></TD>
<TD>cc head</TD>
<TD><A HREF="../src/abstract/Conjunction.gf">Conjunction</A></TD>
</TR>
<TR>
<TD>ConjCN<a name="ConjCN"></a></TD>
<TD>Conj -&gt; [CN] -&gt; CN</TD>
<TD>Conj -&gt; ListCN -&gt; CN</TD>
<TD><I>man and woman</I></TD>
<TD>cc head</TD>
<TD><A HREF="../src/abstract/Conjunction.gf">Conjunction</A></TD>
</TR>
<TR>
<TD>ConjDet<a name="ConjDet"></a></TD>
<TD>Conj -&gt; [DAP] -&gt; Det</TD>
<TD>Conj -&gt; ListDAP -&gt; Det</TD>
<TD><I>his or her</I></TD>
<TD>cc head</TD>
<TD><A HREF="../src/abstract/Conjunction.gf">Conjunction</A></TD>
</TR>
<TR>
<TD>ConjIAdv<a name="ConjIAdv"></a></TD>
<TD>Conj -&gt; [IAdv] -&gt; IAdv</TD>
<TD>Conj -&gt; ListIAdv -&gt; IAdv</TD>
<TD><I>where and with whom</I></TD>
<TD>cc head</TD>
<TD><A HREF="../src/abstract/Conjunction.gf">Conjunction</A></TD>
</TR>
<TR>
<TD>ConjNP<a name="ConjNP"></a></TD>
<TD>Conj -&gt; [NP] -&gt; NP</TD>
<TD>Conj -&gt; ListNP -&gt; NP</TD>
<TD><I>she or we</I></TD>
<TD>cc head</TD>
<TD><A HREF="../src/abstract/Conjunction.gf">Conjunction</A></TD>
</TR>
<TR>
<TD>ConjRS<a name="ConjRS"></a></TD>
<TD>Conj -&gt; [RS] -&gt; RS</TD>
<TD>Conj -&gt; ListRS -&gt; RS</TD>
<TD><I>who walks and whose mother runs</I></TD>
<TD>cc head</TD>
<TD><A HREF="../src/abstract/Conjunction.gf">Conjunction</A></TD>
</TR>
<TR>
<TD>ConjS<a name="ConjS"></a></TD>
<TD>Conj -&gt; [S] -&gt; S</TD>
<TD>Conj -&gt; ListS -&gt; S</TD>
<TD><I>he walks and she runs</I></TD>
<TD>cc head</TD>
<TD><A HREF="../src/abstract/Conjunction.gf">Conjunction</A></TD>
</TR>
<TR>
<TD>ConjVPI<a name="ConjVPI"></a></TD>
<TD>Conj -&gt; [VPI] -&gt; VPI</TD>
<TD>Conj -&gt; ListVPI -&gt; VPI</TD>
<TD><I>to walk and drink beer</I></TD>
<TD>-</TD>
<TD><A HREF="../src/translator/Extensions.gf">Extensions</A></TD>
</TR>
<TR>
<TD>ConjVPS<a name="ConjVPS"></a></TD>
<TD>Conj -&gt; [VPS] -&gt; VPS</TD>
<TD>Conj -&gt; ListVPS -&gt; VPS</TD>
<TD><I>had walked and drank beer</I></TD>
<TD>-</TD>
<TD><A HREF="../src/translator/Extensions.gf">Extensions</A></TD>
</TR>
<TR>
<TD>ConsAP<a name="ConsAP"></a></TD>
<TD>AP -&gt; ListAP -&gt; ListAP</TD>
<TD><I>red, white, blue</I></TD>
<TD>head conj</TD>
<TD><A HREF="../src/abstract/Conjunction.gf">Conjunction</A></TD>
</TR>
<TR>
<TD>ConsAdV<a name="ConsAdV"></a></TD>
<TD>AdV -&gt; ListAdV -&gt; ListAdV</TD>
<TD><I>always, sometimes, never</I></TD>
<TD>head conj</TD>
<TD><A HREF="../src/abstract/Conjunction.gf">Conjunction</A></TD>
</TR>
<TR>
<TD>ConsAdv<a name="ConsAdv"></a></TD>
<TD>Adv -&gt; ListAdv -&gt; ListAdv</TD>
<TD><I>here, there, everywhere</I></TD>
<TD>head conj</TD>
<TD><A HREF="../src/abstract/Conjunction.gf">Conjunction</A></TD>
</TR>
<TR>
<TD>ConsCN<a name="ConsCN"></a></TD>
<TD>CN -&gt; ListCN -&gt; ListCN</TD>
<TD><I>man, woman, child</I></TD>
<TD>head conj</TD>
<TD><A HREF="../src/abstract/Conjunction.gf">Conjunction</A></TD>
</TR>
<TR>
<TD>ConsIAdv<a name="ConsIAdv"></a></TD>
<TD>IAdv -&gt; ListIAdv -&gt; ListIAdv</TD>
<TD><I>where, when, why</I></TD>
<TD>head conj</TD>
<TD><A HREF="../src/abstract/Conjunction.gf">Conjunction</A></TD>
</TR>
<TR>
<TD>ConsNP<a name="ConsNP"></a></TD>
<TD>NP -&gt; ListNP -&gt; ListNP</TD>
<TD><I>John, Mary, Bill</I></TD>
<TD>head conj</TD>
<TD><A HREF="../src/abstract/Conjunction.gf">Conjunction</A></TD>
</TR>
<TR>
<TD>ConsRS<a name="ConsRS"></a></TD>
<TD>RS -&gt; ListRS -&gt; ListRS</TD>
<TD><I>who wals, whom I know, who is here</I></TD>
<TD>head conj</TD>
<TD><A HREF="../src/abstract/Conjunction.gf">Conjunction</A></TD>
</TR>
<TR>
<TD>ConsS<a name="ConsS"></a></TD>
<TD>S -&gt; ListS -&gt; ListS</TD>
<TD><I>John walks, Mary runs, Bill swims</I></TD>
<TD>head conj</TD>
<TD><A HREF="../src/abstract/Conjunction.gf">Conjunction</A></TD>
</TR>
<TR>
<TD>ConsVPI<a name="ConsVPI"></a></TD>
<TD>VPI -&gt; ListVPI -&gt; ListVPI</TD>
<TD><I>to walk, to run, to stop</I></TD>
<TD>-</TD>
<TD><A HREF="../src/translator/Extensions.gf">Extensions</A></TD>
</TR>
<TR>
<TD>ConsVPS<a name="ConsVPS"></a></TD>
<TD>VPS -&gt; ListVPS -&gt; ListVPS</TD>
<TD><I>walks, has run, will stop</I></TD>
<TD>-</TD>
<TD><A HREF="../src/translator/Extensions.gf">Extensions</A></TD>
</TR>
<TR>
<TD>CountNP<a name="CountNP"></a></TD>
<TD>Det -&gt; NP -&gt; NP</TD>
<TD><I>three of them, some of the boys</I></TD>
@@ -936,7 +1076,7 @@ Functions in this table have links, e.g. <A HREF="http://www.grammaticalframewor
<TD>PPartNP<a name="PPartNP"></a></TD>
<TD>NP -&gt; V2 -&gt; NP</TD>
<TD><I>the man seen</I></TD>
<TD>-</TD>
<TD>head amod</TD>
<TD><A HREF="../src/abstract/Noun.gf">Noun</A></TD>
</TR>
<TR>
@@ -1419,14 +1559,14 @@ Functions in this table have links, e.g. <A HREF="http://www.grammaticalframewor
<TD>TExclMark<a name="TExclMark"></a></TD>
<TD>Phr -&gt; Text -&gt; Text</TD>
<TD><I>Let's go! ...</I></TD>
<TD>-</TD>
<TD>head dep</TD>
<TD><A HREF="../src/abstract/Text.gf">Text</A></TD>
</TR>
<TR>
<TD>TFullStop<a name="TFullStop"></a></TD>
<TD>Phr -&gt; Text -&gt; Text</TD>
<TD><I>John walks. ...</I></TD>
<TD>-</TD>
<TD>head dep</TD>
<TD><A HREF="../src/abstract/Text.gf">Text</A></TD>
</TR>
<TR>
@@ -1454,7 +1594,7 @@ Functions in this table have links, e.g. <A HREF="http://www.grammaticalframewor
<TD>TQuestMark<a name="TQuestMark"></a></TD>
<TD>Phr -&gt; Text -&gt; Text</TD>
<TD><I>Are they here? ...</I></TD>
<TD>-</TD>
<TD>head dep</TD>
<TD><A HREF="../src/abstract/Text.gf">Text</A></TD>
</TR>
<TR>

View File

@@ -17,15 +17,15 @@ abstract Conjunction = Cat ** {
--2 Rules
fun
ConjS : Conj -> [S] -> S ; -- he walks and she runs
ConjRS : Conj -> [RS] -> RS ; -- who walks and whose mother runs
ConjAP : Conj -> [AP] -> AP ; -- cold and warm
ConjNP : Conj -> [NP] -> NP ; -- she or we
ConjAdv : Conj -> [Adv] -> Adv ; -- here or there
ConjAdV : Conj -> [AdV] -> AdV ; -- always or sometimes
ConjIAdv : Conj -> [IAdv] -> IAdv ; -- where and with whom
ConjCN : Conj -> [CN] -> CN ; -- man and woman
ConjDet : Conj -> [DAP] -> Det ; -- his or her
ConjS : Conj -> ListS -> S ; -- he walks and she runs
ConjRS : Conj -> ListRS -> RS ; -- who walks and whose mother runs
ConjAP : Conj -> ListAP -> AP ; -- cold and warm
ConjNP : Conj -> ListNP -> NP ; -- she or we
ConjAdv : Conj -> ListAdv -> Adv ; -- here or there
ConjAdV : Conj -> ListAdV -> AdV ; -- always or sometimes
ConjIAdv : Conj -> ListIAdv -> IAdv ; -- where and with whom
ConjCN : Conj -> ListCN -> CN ; -- man and woman
ConjDet : Conj -> ListDAP -> Det ; -- his or her
--2 Categories
@@ -46,8 +46,37 @@ abstract Conjunction = Cat ** {
-- The list constructors are derived from the list notation and therefore
-- not given explicitly. But here are their type signatures:
{-
-- overview
BaseC : C -> C -> [C] ; --- for C = AdV, Adv, AP, CN, Det, IAdv, NP, RS, S
ConsC : C -> [C] -> [C] ; --- for C = AdV, Adv, AP, CN, Det, IAdv, NP, RS, S
-- BaseC : C -> C -> [C] ; -- for C = S, AP, NP, Adv
-- ConsC : C -> [C] -> [C] ;
-- complete list
BaseAP : AP -> AP -> ListAP ; -- red, white
ConsAP : AP -> ListAP -> ListAP ; -- red, white, blue
BaseAdV : AdV -> AdV -> ListAdV ; -- always, sometimes
ConsAdV : AdV -> ListAdV -> ListAdV ; -- always, sometimes, never
BaseAdv : Adv -> Adv -> ListAdv ; -- here, there
ConsAdv : Adv -> ListAdv -> ListAdv ; -- here, there, everywhere
BaseCN : CN -> CN -> ListCN ; -- man, woman
ConsCN : CN -> ListCN -> ListCN ; -- man, woman, child
BaseIAdv : IAdv -> IAdv -> ListIAdv ; -- where, when
ConsIAdv : IAdv -> ListIAdv -> ListIAdv ; -- where, when, why
BaseNP : NP -> NP -> ListNP ; -- John, Mary
ConsNP : NP -> ListNP -> ListNP ; -- John, Mary, Bill
BaseRS : RS -> RS -> ListRS ; -- who walks, whom I know
ConsRS : RS -> ListRS -> ListRS ; -- who wals, whom I know, who is here
BaseS : S -> S -> ListS ; -- John walks, Mary runs
ConsS : S -> ListS -> ListS ; -- John walks, Mary runs, Bill swims
-}
}

View File

@@ -13,19 +13,18 @@ cat
[VPS] {2} ;
fun
MkVPI : VP -> VPI ; -- to walk
ConjVPI : Conj -> [VPI] -> VPI ; -- to walk and drink beer
ComplVPIVV : VV -> VPI -> VP ; -- want to walk and drink beer
MkVPI : VP -> VPI ; -- to walk
ConjVPI : Conj -> ListVPI -> VPI ; -- to walk and drink beer
ComplVPIVV : VV -> VPI -> VP ; -- want to walk and drink beer
MkVPS : Temp -> Pol -> VP -> VPS ; -- had walked
ConjVPS : Conj -> [VPS] -> VPS ; -- had walked and drank beer
PredVPS : NP -> VPS -> S ; -- I had walked and drank beer
MkVPS : Temp -> Pol -> VP -> VPS ; -- had walked
ConjVPS : Conj -> ListVPS -> VPS ; -- had walked and drank beer
PredVPS : NP -> VPS -> S ; -- I had walked and drank beer
---- merge VPS and VPI
---- MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS,
---- VPIForm, VPIInf, VPIPresPart, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
-- generalizing Grammar
PassVPSlash : VPSlash -> VP ; -- be forced to sleep
@@ -95,6 +94,17 @@ fun
FocusObjS : NP -> SSlash -> S ; -- this woman I love -- in declarative S, not in QS
{-
-- for documentation
BaseVPI : VPI -> VPI -> ListVPI ; -- to walk, to run
ConsVPI : VPI -> ListVPI -> ListVPI ; -- to walk, to run, to stop
BaseVPS : VPS -> VPS -> ListVPS ; -- walks, has run
ConsVPS : VPS -> ListVPS -> ListVPS ; -- walks, has run, will stop
-}
}
{-

View File

@@ -88,6 +88,7 @@ DetQuantOrd head nummod amod -- quite wrong; again for same reason as DetQu
DetCN det head
CountNP det head
PredetNP det head
PPartNP head amod -- only in core RGL
AdjCN amod head
AdjDAP head amod
@@ -150,3 +151,7 @@ PhrUtt cc head discourse
PlusChunk head dep
TTAnt empty empty head
TExclMark head dep -- punctuation in the middle in these three
TFullStop head dep
TQuestMark head dep