diff --git a/lib/doc/AbsFunDoc.hs b/lib/doc/AbsFunDoc.hs index ddf2b193a..55656836c 100644 --- a/lib/doc/AbsFunDoc.hs +++ b/lib/doc/AbsFunDoc.hs @@ -16,11 +16,13 @@ main = do deps <- readFile "../src/uddeps.labels" >>= return . lines let depmap = M.fromList [(fun,deps) | fun:deps <- map words deps] let rows = sort $ filter (flip S.notMember hiddenModules . last) $ map (mkRow depmap) (map words funs) - let entries = map sepFields rows - putStrLn $ "GF RGL Functions" - putStrLn $ "generated by lib/src/doc/AbsFunFoc.hs" - putStrLn $ "" - putStrLn $ sepFields ["Function","Type","Example","Dependencies","Module"] + let entries = map (sepFields . addLink) rows + putStrLnIf $ "GF RGL Functions" + putStrLnIf $ "generated by lib/src/doc/AbsFunFoc.hs" + putStrLnIf $ "%%date" + putStrLnIf $ "" + putStrLnIf $ "Functions in this table have links, e.g. http://www.grammaticalframework.org/lib/doc/absfuns.html#PredVP" + putStrLn $ sepFields ["**Function**","**Type**","**Example**","**Dependencies**","**Module**"] putStrLn $ unlines entries @@ -29,14 +31,27 @@ hiddenModules = S.fromList "Documentation","Lexicon","NumeralTransfer","Terminology","Transfer","MarkHTML","Markup","ERROR"] ---- mkRow depmap ws = case ws of - file:fun:":":typecomment -> fun : getTypeComment typecomment ++ [getDep fun, getModule file] + file:fun:":":typecomment -> named fun : getTypeComment typecomment ++ [getDep fun, getModule file] _ -> ["ERROR"] where getModule = reverse . takeWhile (/='/') . tail . dropWhile (/='.') . reverse -- ../src/abstract/Adverb.gf: --> Adverb getTypeComment ws = case span (/= ";") ws of - (ty,rest) -> [unwords ty, unwords (drop 2 rest)] -- PredVP : NP -> VP -> Cl ; -- John walks + (ty,rest) -> [unwords ty, italics (unwords (drop 2 rest))] -- PredVP : NP -> VP -> Cl ; -- John walks getDep fun = maybe "-" (unwords . takeWhile (/="--")) $ M.lookup fun depmap --- sepFields = concat . intersperse "\t" +-- for html (via txt2tags) generation sepFields fs = "| " ++ concat (intersperse " | " fs) ++ " |" +named f = f ++ "''''" +italics e = "//" ++ map (\c -> case c of '[' -> '(' ; ']'->')'; _ -> c) e ++ "//" +putStrLnIf = putStrLn +addLink fs = + let m = last fs ; abstract = case m of "Extensions" -> "translator/" ; _ -> "abstract/" + in init fs ++ ["[" ++ m ++ " ../src/" ++ abstract ++ m ++ ".gf]"] + +-- for tab separated generation +-- sepFields = concat . intersperse "\t" +-- named f = f +-- italics e = e +-- putStrLnIf = return () +-- addLink fs = fs diff --git a/lib/doc/absfuns.html b/lib/doc/absfuns.html index 9cf5dbbce..0348215ab 100644 --- a/lib/doc/absfuns.html +++ b/lib/doc/absfuns.html @@ -7,1780 +7,1819 @@

GF RGL Functions

generated by lib/src/doc/AbsFunFoc.hs
+20151014
+

+Functions in this table have links, e.g. http://www.grammaticalframework.org/lib/doc/absfuns.html#PredVP +

- - - - - + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + - + - + - + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - + - + - + - - - - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
FunctionTypeExampleDependenciesModuleFunctionTypeExampleDependenciesModule
AAnterAAnter AntI have slept --# notpresentI have slept/had slept (anterior, "compound", "perfect") --# notpresent -TenseTense
ASimulASimul AntI sleep/slept (simultaneous, not compound) -TenseTense
AdAPAdAP AdA -> AP -> APvery warmvery warm advmod headAdjectiveAdjective
AdAdVAdAdV AdA -> AdV -> AdValmost alwaysalmost always amod headExtensionsExtensions
AdAdvAdAdv AdA -> Adv -> Advvery quicklyvery quickly amod headAdverbAdverb
AdNumAdNum AdN -> Card -> Cardalmost 51almost 51 advmod headNounNoun
AdVVPAdVVP AdV -> VP -> VPalways sleepalways sleep advmod headVerbVerb
AdVVPSlashAdVVPSlash AdV -> VPSlash -> VPSlashalways use (it)always use (it) advmod headVerbVerb
AddAdvQVPAddAdvQVP QVP -> IAdv -> QVPbuys what wherebuys what where head advmodQuestionQuestion
AdjCNAdjCN AP -> CN -> CNbig housebig house amod headNounNoun
AdjDAPAdjDAP DAP -> AP -> DAPthe large (one)the large (one) head amodNounNoun
AdjOrdAdjOrd Ord -> APwarmestwarmest -AdjectiveAdjective
AdnCAdvAdnCAdv CAdv -> AdNless (than five)less (than five) -AdverbAdverb
AdvAPAdvAP AP -> Adv -> APwarm by naturewarm by nature head advmodAdjectiveAdjective
AdvCNAdvCN CN -> Adv -> CNhouse on the hillhouse on the hill head nmodNounNoun
AdvIAdvAdvIAdv IAdv -> Adv -> IAdvwhere in Pariswhere in Paris advmod headQuestionQuestion
AdvIPAdvIP IP -> Adv -> IPwho in Pariswho in Paris -QuestionQuestion
AdvNPAdvNP NP -> Adv -> NPParis todayParis today head nmodNounNoun
AdvQVPAdvQVP VP -> IAdv -> QVPlives wherelives where head dobjQuestionQuestion
AdvSAdvS Adv -> S -> Sthen I will go homethen I will go home advmod headSentenceSentence
AdvSlashAdvSlash ClSlash -> Adv -> ClSlash(whom) he sees today(whom) he sees today head advmodSentenceSentence
AdvVPAdvVP VP -> Adv -> VPsleep heresleep here head advmodVerbVerb
AdvVPSlashAdvVPSlash VPSlash -> Adv -> VPSlashuse (it) hereuse (it) here head advmodVerbVerb
ApposCNApposCN CN -> NP -> CNcity Paris (, numbers x and y)city Paris (, numbers x and y) head apposNounNoun
ApposNPApposNP NP -> NP -> NPMr Hollande, the president of France,Mr Hollande, the president of France, head apposExtensionsExtensions
ByVPByVP VP -> Advby publishing the documentby publishing the document -ExtensionsExtensions
CAdvAPCAdvAP CAdv -> AP -> NP -> APas cool as Johnas cool as John case amod headAdjectiveAdjective
CNIntNPCNIntNP CN -> Int -> NPlevel 53 (covered by CNNumNP)level 53 (covered by CNNumNP) -SymbolSymbol
CNNumNPCNNumNP CN -> Card -> NPlevel five ; level 5level five ; level 5 head nummodSymbolSymbol
CNSymbNPCNSymbNP Det -> CN -> [Symb] -> NP(the) (2) numbers x and y(the) (2) numbers x and y -SymbolSymbol
CleftAdvCleftAdv Adv -> S -> Clit is here she sleptit is here she slept head advclIdiomIdiom
CleftNPCleftNP NP -> RS -> Clit is I who did itit is I who did it head aclIdiomIdiom
CompAPCompAP AP -> Comp(be) small(be) small -VerbVerb
CompAdvCompAdv Adv -> Comp(be) here(be) here -VerbVerb
CompCNCompCN CN -> Comp(be) a man/men(be) a man/men -VerbVerb
CompIAdvCompIAdv IAdv -> ICompwhere (is it)where (is it) -QuestionQuestion
CompIPCompIP IP -> ICompwho (is it)who (is it) -QuestionQuestion
CompNPCompNP NP -> Comp(be) the man(be) the man -VerbVerb
CompQSCompQS QS -> Comp(the question is) who sleeps(the question is) who sleeps -ExtensionsExtensions
CompSCompS S -> Comp(the fact is) that she sleeps(the fact is) that she sleeps -ExtensionsExtensions
CompVPCompVP Ant -> Pol -> VP -> Comp(she is) to go(she is) to go -ExtensionsExtensions
ComparAComparA A -> NP -> APwarmer than Iwarmer than I amod headAdjectiveAdjective
ComparAdvAdjComparAdvAdj CAdv -> A -> NP -> Advmore warmly than Johnmore warmly than John advmod amod headAdverbAdverb
ComparAdvAdjSComparAdvAdjS CAdv -> A -> S -> Advmore warmly than he runsmore warmly than he runs advmod amod headAdverbAdverb
ComplA2ComplA2 A2 -> NP -> APmarried to hermarried to her amod headAdjectiveAdjective
ComplN2ComplN2 N2 -> NP -> CNmother of the kingmother of the king head nmodNounNoun
ComplN3ComplN3 N3 -> NP -> N2distance from this city (to Paris)distance from this city (to Paris) nmod headNounNoun
ComplSlashComplSlash VPSlash -> NP -> VPlove itlove it head dobjVerbVerb
ComplSlashIPComplSlashIP VPSlash -> IP -> QVPbuys whatbuys what head dobjQuestionQuestion
ComplVAComplVA VA -> AP -> VPthey become redthey become red head xcompVerbVerb
ComplVPIVVComplVPIVV VV -> VPI -> VPwant to walk and drink beer -ExtensionsExtensions
ComplVQComplVQ VQ -> QS -> VPwonder who runswonder who runs head ccompVerbVerb
ComplVSComplVS VS -> S -> VPsay that she runssay that she runs head ccompVerbVerb
ComplVVComplVV VV -> Ant -> Pol -> VP -> VPwant not to have sleptwant not to have slept head xcompExtensionsExtensions
ComplVVComplVV VV -> VP -> VPwant to runwant to run head xcompVerbVerb
CompoundAPCompoundAP N -> A -> APlanguage independent / language-independentlanguage independent / language-independent head amodExtensionsExtensions
CompoundNCompoundN N -> N -> Ncontrol system / controls system / control-systemcontrol system / controls system / control-system compound headExtensionsExtensions
ConjAPConjAP Conj -> [AP] -> AP"cold and warm"cold and warm cc headConjunctionConjunction
ConjAdVConjAdV Conj -> [AdV] -> AdValways or sometimes cc headConjunctionConjunction
ConjAdvConjAdv Conj -> [Adv] -> Adv"here or there"here or there cc headConjunctionConjunction
ConjCNConjCN Conj -> [CN] -> CN"man and woman"man and woman cc headConjunctionConjunction
ConjDetConjDet Conj -> [DAP] -> Det"his or her"his or her cc headConjunctionConjunction
ConjIAdvConjIAdv Conj -> [IAdv] -> IAdv"where and with whom"where and with whom cc headConjunctionConjunction
ConjNPConjNP Conj -> [NP] -> NP"she or we"she or we cc headConjunctionConjunction
ConjRSConjRS Conj -> [RS] -> RS"who walks and whose mother runs"who walks and whose mother runs cc headConjunctionConjunction
ConjSConjS Conj -> [S] -> S"he walks and she runs"he walks and she runs cc headConjunctionConjunction
ConjVPIConjVPI Conj -> [VPI] -> VPIto walk and drink beer -ExtensionsExtensions
ConjVPSConjVPS Conj -> [VPS] -> VPShad walked and drank beer -ExtensionsExtensions
CountNPCountNP Det -> NP -> NPthree of them, some of the boysthree of them, some of the boys det headNounNoun
DefArtDefArt Quantthe -NounNoun
DetCNDetCN Det -> CN -> NPthe manthe man det headNounNoun
DetDAPDetDAP Det -> DAPthis (or that)this (or that) -NounNoun
DetNPDetNP Det -> NPthese fivethese five -NounNoun
DetQuantDetQuant Quant -> Num -> Detthese fivethese five head nummodNounNoun
DetQuantOrdDetQuantOrd Quant -> Num -> Ord -> Detthese five bestthese five best head nummod amodNounNoun
DirectComplVQDirectComplVQ Temp -> NP -> VQ -> QS -> Swho is there, she asked / she asked: who is there -- no negation possiblewho is there, she asked / she asked: who is there -- no negation possible empty nsubj head ccompExtensionsExtensions
DirectComplVSDirectComplVS Temp -> NP -> VS -> Utt -> SI am here, she said / she said: I am here -- no negation possibleI am here, she said / she said: I am here -- no negation possible empty nsubj head ccompExtensionsExtensions
EmbedQSEmbedQS QS -> SCwho goeswho goes -SentenceSentence
EmbedSEmbedS S -> SCthat she goesthat she goes -SentenceSentence
EmbedVPEmbedVP VP -> SCto goto go -SentenceSentence
EmptyRelSlashEmptyRelSlash ClSlash -> RCl(the city) he lives in(the city) he lives in -ExtensionsExtensions
ExistIPExistIP IP -> QClwhich houses are therewhich houses are there -IdiomIdiom
ExistIPAdvExistIPAdv IP -> Adv -> QClwhich houses are there in Pariswhich houses are there in Paris head advmodIdiomIdiom
ExistNPExistNP NP -> Clthere is a housethere is a house -IdiomIdiom
ExistNPAdvExistNPAdv NP -> Adv -> Clthere is a house in Paristhere is a house in Paris head nmodIdiomIdiom
ExtAdvSExtAdvS Adv -> S -> Snext week, I will go homenext week, I will go home advmod headSentenceSentence
ExtAdvVPExtAdvVP VP -> Adv -> VPsleep , even though ...sleep , even though ... head advmodVerbVerb
FloatPNFloatPN Float -> PN3.141593.14159 -SymbolSymbol
FocusObjSFocusObjS NP -> SSlash -> Sthis woman I love -- in declarative S, not in QSthis woman I love -- in declarative S, not in QS nsubj headExtensionsExtensions
FunRPFunRP Prep -> NP -> RP -> RPthe mother of whomthe mother of whom -RelativeRelative
GenIPGenIP IP -> IQuantwhosewhose -ExtensionsExtensions
GenNPGenNP NP -> Quantthis man'sthis man's -ExtensionsExtensions
GenRPGenRP Num -> CN -> RPwhose car(s)whose car(s) -ExtensionsExtensions
GenericClGenericCl VP -> Clone sleepsone sleeps -IdiomIdiom
GerundAdvGerundAdv VP -> Advpublishing the document (prepositionless adverb)publishing the document (prepositionless adverb) -ExtensionsExtensions
GerundCNGerundCN VP -> CNpublishing of the document (can get a determiner)publishing of the document (can get a determiner) -ExtensionsExtensions
GerundNPGerundNP VP -> NPpublishing the document (by nature definite)publishing the document (by nature definite) -ExtensionsExtensions
IDigIDig Dig -> Digits88 -NumeralNumeral
IIDigIIDig Dig -> Digits -> Digits876876 head goeswithNumeralNumeral
IdRPIdRP RPwhichwhich -RelativeRelative
IdetCNIdetCN IDet -> CN -> IPwhich five songswhich five songs -QuestionQuestion
IdetIPIdetIP IDet -> IPwhich fivewhich five -QuestionQuestion
IdetQuantIdetQuant IQuant -> Num -> IDetwhich (five)which (five) -QuestionQuestion
ImpP3ImpP3 NP -> VP -> Uttlet John walklet John walk -IdiomIdiom
ImpPl1ImpPl1 VP -> Uttlet's golet's go -IdiomIdiom
ImpVPImpVP VP -> Implove yourselveslove yourselves -SentenceSentence
ImpersClImpersCl VP -> Clit is hotit is hot -IdiomIdiom
InOrderToVPInOrderToVP VP -> Adv(in order) to publish the document(in order) to publish the document -ExtensionsExtensions
IndefArtIndefArt Quanta/an -NounNoun
IntPNIntPN Int -> PN2727 -SymbolSymbol
MassNPMassNP CN -> NP(beer)(beer) -NounNoun
MkSymbMkSymb String -> Symbfoo (making a symbol from a string) -SymbolSymbol
MkVPIMkVPI VP -> VPIto walk -ExtensionsExtensions
MkVPSMkVPS Temp -> Pol -> VP -> VPShad walked empty empty headExtensionsExtensions
ModSubjSModSubjS S -> Subj -> S -> Sshe sleeps, because she is oldshe sleeps, because she is old -SentenceSentence
NoPConjNoPConj PConj(plain phrase without conjunction in front) -PhrasePhrase
NoVocNoVoc Voc(plain phrase without vocative) -PhrasePhrase
NumCardNumCard Card -> Numone/five (explicit numeral) -NounNoun
NumDigitsNumDigits Digits -> Card5151 -NounNoun
NumNumeralNumNumeral Numeral -> Cardfifty-onefifty-one -NounNoun
NumPNNumPN Card -> PNtwelve (as proper name) -SymbolSymbol
NumPlNumPl Num(no numeral, but marked as plural) -NounNoun
NumSgNumSg Num(no numeral, but marked as singular) -NounNoun
OrdDigitsOrdDigits Digits -> Ord51st51st -NounNoun
OrdNumeralOrdNumeral Numeral -> Ordfifty-firstfifty-first -NounNoun
OrdNumeralSuperlOrdNumeralSuperl Numeral -> A -> Ordthird largestthird largest nummod headNounNoun
OrdSuperlOrdSuperl A -> Ordwarmestwarmest -NounNoun
PConjConjPConjConj Conj -> PConjandand -PhrasePhrase
PPartNPPNegPolI don't sleep (negative polarity)-Tense
PPartNP NP -> V2 -> NPthe man seenthe man seen -NounNoun
PartNPPPosPolI sleep (positive polarity)-Tense
PartNP CN -> NP -> CNglass of wineglass of wine nmod headNounNoun
PassAgentVPSlashPassAgentVPSlash VPSlash -> NP -> VPbe begged by her to gobe begged by her to go head nmodExtensionsExtensions
PassV2PassV2 V2 -> VPbe lovedbe loved -VerbVerb
PassVPSlashPassVPSlash VPSlash -> VPbe forced to sleepbe forced to sleep -ExtensionsExtensions
PastPartAPPastPartAP VPSlash -> APlost (opportunity) ; (opportunity) lost in spacelost (opportunity) ; (opportunity) lost in space -ExtensionsExtensions
PastPartAgentAPPastPartAgentAP VPSlash -> NP -> AP(opportunity) lost by the company(opportunity) lost by the company head dobjExtensionsExtensions
PastPartRSPastPartRS Ant -> Pol -> VPSlash -> RS(man) not seen by her --- maybe no Anter(man) not seen by her --- maybe no Anter -ExtensionsExtensions
PhrUttPhrUtt PConj -> Utt -> Voc -> Phrbut come here, my friendbut come here, my friend cc head discoursePhrasePhrase
PositAPositA A -> APwarmwarm -AdjectiveAdjective
PositAdAAdjPositAdAAdj A -> AdAextremelyextremely -AdverbAdverb
PositAdVAdjPositAdVAdj A -> AdV(that she) positively (sleeps)(that she) positively (sleeps) -ExtensionsExtensions
PositAdvAdjPositAdvAdj A -> Advwarmlywarmly -AdverbAdverb
PossNPPossNP CN -> NP -> CNhouse of Paris, house of minehouse of Paris, house of mine nmod headNounNoun
PossPronPossPron Pron -> Quantmy (house)my (house) -NounNoun
PredFrontVQPredFrontVQ Temp -> NP -> VQ -> QS -> Sare you here, she asked -- no negation; direct orderare you here, she asked -- no negation; direct order -ExtensionsExtensions
PredFrontVSPredFrontVS Temp -> NP -> VS -> S -> SI am here, she said -- no negationI am here, she said -- no negation -ExtensionsExtensions
PredSCVPPredSCVP SC -> VP -> Clthat she goes is goodthat she goes is good csubj headSentenceSentence
PredVPPredVP NP -> VP -> ClJohn walksJohn walks PassVPSlash nsubjpass headSentenceSentence
PredVPSPredVPS NP -> VPS -> SI had walked and drank beer nsubj headExtensionsExtensions
PredetNPPredet -> NP -> NP; -- only the manPredetNPPredet -> NP -> NPonly the man det headNounNoun
PrepIPPrepIP Prep -> IP -> IAdvwith whomwith whom case headQuestionQuestion
PrepNPPrepNP Prep -> NP -> Advin the housein the house case headAdverbAdverb
PresPartAPPresPartAP VP -> APsleeping (man), (man) sleeping in the carsleeping (man), (man) sleeping in the car -ExtensionsExtensions
PresPartRSPresPartRS Ant -> Pol -> VP -> RS(man) not having seen her(man) not having seen her -ExtensionsExtensions
ProgrVPProgrVP VP -> VPbe sleepingbe sleeping -IdiomIdiom
QuestClQuestCl Cl -> QCldoes John walkdoes John walk -QuestionQuestion
QuestIAdvQuestIAdv IAdv -> Cl -> QClwhy does John walkwhy does John walk advmod headQuestionQuestion
QuestICompQuestIComp IComp -> NP -> QClwhere is Johnwhere is John head nsubjQuestionQuestion
QuestQVPQuestQVP IP -> QVP -> QClwho buys what wherewho buys what where nsubj headQuestionQuestion
QuestSlashQuestSlash IP -> ClSlash -> QClwhom does John lovewhom does John love dobj headQuestionQuestion
QuestVPQuestVP IP -> VP -> QClwho walkswho walks nsubj headQuestionQuestion
ReflA2ReflA2 A2 -> APmarried to itselfmarried to itself -AdjectiveAdjective
ReflVPReflVP VPSlash -> VPlove himselflove himself -VerbVerb
RelCNRelCN CN -> RS -> CNhouse that John boughthouse that John bought head aclNounNoun
RelClRelCl Cl -> RClsuch that John loves hersuch that John loves her -RelativeRelative
RelNPRelNP NP -> RS -> NPParis, which is hereParis, which is here head aclNounNoun
RelSRelS S -> RS -> Sshe sleeps, which is goodshe sleeps, which is good head advclSentenceSentence
RelSlashRelSlash RP -> ClSlash -> RClwhom John loveswhom John loves mark headRelativeRelative
RelVPRelVP RP -> VP -> RClwho loves Johnwho loves John mark headRelativeRelative
SSubjSSSubjS S -> Subj -> S -> SI go home if she comesI go home if she comes head mark advclSentenceSentence
SelfAdVVPSelfAdVVP VP -> VPis himself at homeis himself at home -IdiomIdiom
SelfAdvVPSelfAdvVP VP -> VPis at home himselfis at home himself -IdiomIdiom
SelfNPSelfNP NP -> NPthe president himself (is at home)the president himself (is at home) -IdiomIdiom
SentAPSentAP AP -> SC -> APgood that she is heregood that she is here amod aclAdjectiveAdjective
SentCNSentCN CN -> SC -> CNquestion where she sleepsquestion where she sleeps head aclNounNoun
Slash2V3Slash2V3 V3 -> NP -> VPSlashgive it (to her)give it (to her) head iobjVerbVerb
Slash3V3Slash3V3 V3 -> NP -> VPSlashgive (it) to hergive (it) to her head dobjVerbVerb
SlashPrepSlashPrep Cl -> Prep -> ClSlash(with whom) he walks(with whom) he walks head caseSentenceSentence
SlashSlashV2VSlashSlashV2V V2V -> Ant -> Pol -> VPSlash -> VPSlashinduce them to sell (it) -- analogous to Verb.SlashVVinduce them to sell (it) -- analogous to Verb.SlashVV -ExtensionsExtensions
SlashV2ASlashV2A V2A -> AP -> VPSlashpaint (it) redpaint (it) red head xcompVerbVerb
SlashV2QSlashV2Q V2Q -> QS -> VPSlashask (him) who cameask (him) who came head ccompVerbVerb
SlashV2SSlashV2S V2S -> S -> VPSlashanswer (to him) that it is goodanswer (to him) that it is good head ccompVerbVerb
SlashV2VSlashV2V V2V -> Ant -> Pol -> VP -> VPSlashforce (her) not to have sleptforce (her) not to have slept head xcompExtensionsExtensions
SlashV2VSlashV2V V2V -> VP -> VPSlashbeg (her) to gobeg (her) to go head xcompVerbVerb
SlashV2VNPSlashV2VNP V2V -> NP -> VPSlash -> VPSlashbeg me to buybeg me to buy head dobj xcompVerbVerb
SlashV2aSlashV2a V2 -> VPSlashlove (it)love (it) -VerbVerb
SlashVPSlashVP NP -> VPSlash -> ClSlash(whom) he sees(whom) he sees nsubj headSentenceSentence
SlashVPIV2VSlashVPIV2V V2V -> Pol -> VPI -> VPSlashforce (her) not to sleep and dreamforce (her) not to sleep and dream -ExtensionsExtensions
SlashVSSlashVS NP -> VS -> SSlash -> ClSlash(whom) she says that he loves(whom) she says that he loves nsubj head ccompSentenceSentence
SlashVVSlashVV VV -> VPSlash -> VPSlashwant to buywant to buy head aclVerbVerb
SubjSSubjS Subj -> S -> Advwhen she sleepswhen she sleeps mark headAdverbAdverb
SymbNumSymbNum Symb -> Cardnn -SymbolSymbol
SymbOrdSymbOrd Symb -> Ordn'thn'th -SymbolSymbol
SymbPNSymbPN Symb -> PNxx -SymbolSymbol
SymbSSymbS Symb -> SAA -SymbolSymbol
TEmptyText-Text
TExclMarkPhr -> Text -> TextLet's go! ...-Text
TFullStopPhr -> Text -> TextJohn walks. ...-Text
TPresTCond TenseI would sleep (conditional) --# notpresent -TenseTense
TQuestMarkPhr -> Text -> TextAre they here? ...-TEmpty Text(empty text, no sentences)-Text
TTAntTExclMarkPhr -> Text -> TextLet's go! ...-Text
TFullStopPhr -> Text -> TextJohn walks. ...-Text
TFutTenseI will sleep (future) --# notpresent-Tense
TPastTenseI slept (past, "imperfect") --# notpresent-Tense
TPresTenseI sleep/have slept (present)-Tense
TQuestMarkPhr -> Text -> TextAre they here? ...-Text
TTAnt Tense -> Ant -> Temp(combination of tense and anteriority, e.g. past anterior) empty empty headTenseTense
Use2N3Use2N3 N3 -> N2distance (from this city)distance (from this city) -NounNoun
Use3N3Use3N3 N3 -> N2distance (to Paris)distance (to Paris) -NounNoun
UseA2UseA2 A2 -> APmarriedmarried -AdjectiveAdjective
UseClUseCl Temp -> Pol -> Cl -> Sshe had not slept empty empty headSentenceSentence
UseCompUseComp Comp -> VPbe warmbe warm -VerbVerb
UseComparAUseComparA A -> APwarmerwarmer -AdjectiveAdjective
UseCopulaUseCopula VPbebe -VerbVerb
UseNUseN N -> CNhousehouse -NounNoun
UseN2UseN2 N2 -> CNmothermother -NounNoun
UsePNUsePN PN -> NPJohnJohn -NounNoun
UsePronUsePron Pron -> NPhehe -NounNoun
UseQClUseQCl Temp -> Pol -> QCl -> QSwho had not slept empty empty headSentenceSentence
UseQuantPNQuant -> PN -> NP; -- this JohnUseQuantPNQuant -> PN -> NPthis John -ExtensionsExtensions
UseRClUseRCl Temp -> Pol -> RCl -> RSthat had not slept empty empty headSentenceSentence
UseSlashUseSlash Temp -> Pol -> ClSlash -> SSlash(that) she had not seen empty empty headSentenceSentence
UseVUseV V -> VPsleepsleep -VerbVerb
UttAPUttAP AP -> Uttfinefine -PhrasePhrase
UttAdVAdV -> Utt; -- always!UttAdVAdV -> Uttalways(!) -ExtensionsExtensions
UttAdvUttAdv Adv -> Uttherehere -PhrasePhrase
UttCNUttCN CN -> Utthousehouse -PhrasePhrase
UttCardUttCard Card -> Uttfivefive -PhrasePhrase
UttIAdvUttIAdv IAdv -> Uttwhywhy -PhrasePhrase
UttIPUttIP IP -> Uttwhowho -PhrasePhrase
UttImpPlUttImpPl Pol -> Imp -> Utt(don't) love yourselves(don't) love yourselves empty headPhrasePhrase
UttImpPolUttImpPol Pol -> Imp -> Utt(don't) sleep (polite)(don't) sleep (polite) empty headPhrasePhrase
UttImpSgUttImpSg Pol -> Imp -> Utt(don't) love yourself(don't) love yourself empty headPhrasePhrase
UttInterjUttInterj Interj -> Uttalasalas -PhrasePhrase
UttNPUttNP NP -> Uttthis manthis man -PhrasePhrase
UttQSUttQS QS -> Uttis it goodis it good -PhrasePhrase
UttSUttS S -> UttJohn walksJohn walks -PhrasePhrase
UttVPUttVP VP -> Uttto sleepto sleep -PhrasePhrase
VPSlashPrepVPSlashPrep VP -> Prep -> VPSlashlive in (it)live in (it) head caseVerbVerb
VPSlashVSVPSlashVS VS -> VP -> VPSlashto believe (her) to sleep --- she was believed to sleepto believe (her) to sleep --- she was believed to sleep -ExtensionsExtensions
VocNPVocNP NP -> Vocmy friendmy friend -PhrasePhrase
WithoutVPWithoutVP VP -> Advwithout publishing the documentwithout publishing the document -ExtensionsExtensions
numnum Sub1000000 -> Numeral123456 (coercion to top category) -NumeralNumeral
pot0pot0 Digit -> Sub10d * 1d * 1 -NumeralNumeral
pot01pot01 Sub1011 -NumeralNumeral
pot0as1pot0as1 Sub10 -> Sub100coercion of 1..9coercion of 1..9 -NumeralNumeral
pot1pot1 Digit -> Sub100d * 10d * 10 -NumeralNumeral
pot110pot110 Sub1001010 -NumeralNumeral
pot111pot111 Sub1001111 -NumeralNumeral
pot1as2pot1as2 Sub100 -> Sub1000coercion of 1..99coercion of 1..99 -NumeralNumeral
pot1pluspot1plus Digit -> Sub10 -> Sub100d * 10 + nd * 10 + n -NumeralNumeral
pot1to19pot1to19 Digit -> Sub10010 + d10 + d -NumeralNumeral
pot2pot2 Sub10 -> Sub1000m * 100m * 100 -NumeralNumeral
pot2as3pot2as3 Sub1000 -> Sub1000000coercion of 1..999coercion of 1..999 -NumeralNumeral
pot2pluspot2plus Sub10 -> Sub100 -> Sub1000m * 100 + nm * 100 + n -NumeralNumeral
pot3pot3 Sub1000 -> Sub1000000m * 1000m * 1000 -NumeralNumeral
pot3pluspot3plus Sub1000 -> Sub1000 -> Sub1000000m * 1000 + nm * 1000 + n -NumeralNumeral
that_RPthat_RP RPthat (relative pronoun) -ExtensionsExtensions
who_RPwho_RP RPwho (relative pronoun) -ExtensionsExtensions
diff --git a/lib/src/abstract/Conjunction.gf b/lib/src/abstract/Conjunction.gf index 3bf4c6960..44198b07e 100644 --- a/lib/src/abstract/Conjunction.gf +++ b/lib/src/abstract/Conjunction.gf @@ -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 ; - ConjIAdv : Conj -> [IAdv] -> IAdv ; -- "where and with whom" - ConjCN : Conj -> [CN] -> CN ; -- "man and woman" - ConjDet : Conj -> [DAP] -> Det ; -- "his or her" + 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 --2 Categories diff --git a/lib/src/abstract/Noun.gf b/lib/src/abstract/Noun.gf index f47129dfc..31cfdf59b 100644 --- a/lib/src/abstract/Noun.gf +++ b/lib/src/abstract/Noun.gf @@ -20,7 +20,7 @@ abstract Noun = Cat ** { -- A noun phrase already formed can be modified by a $Predet$erminer. - PredetNP : Predet -> NP -> NP; -- only the man + PredetNP : Predet -> NP -> NP ; -- only the man -- A noun phrase can also be postmodified by the past participle of a -- verb, by an adverb, or by a relative clause @@ -50,9 +50,9 @@ abstract Noun = Cat ** { -- the "kernel" of a determiner. It is, however, the $Num$ that determines -- the inherent number. - NumSg : Num ; - NumPl : Num ; - NumCard : Card -> Num ; + NumSg : Num ; -- [no numeral, but marked as singular] + NumPl : Num ; -- [no numeral, but marked as plural] + NumCard : Card -> Num ; -- one/five [explicit numeral] -- $Card$ consists of either digits or numeral words. @@ -82,8 +82,8 @@ abstract Noun = Cat ** { -- neatly distinct words (Spanish "un, unos ; el, los") but also without -- any particular word (Finnish; Swedish definites). - IndefArt : Quant ; - DefArt : Quant ; + IndefArt : Quant ; -- a/an + DefArt : Quant ; -- the -- Nouns can be used without an article as mass nouns. The resource does -- not distinguish mass nouns from other common nouns, which can result diff --git a/lib/src/abstract/Numeral.gf b/lib/src/abstract/Numeral.gf index a483a7dd2..0feae9ec4 100644 --- a/lib/src/abstract/Numeral.gf +++ b/lib/src/abstract/Numeral.gf @@ -27,7 +27,7 @@ cat Sub1000000 ; -- 1..999999 data - num : Sub1000000 -> Numeral ; + num : Sub1000000 -> Numeral ; -- 123456 [coercion to top category] n2, n3, n4, n5, n6, n7, n8, n9 : Digit ; diff --git a/lib/src/abstract/Phrase.gf b/lib/src/abstract/Phrase.gf index f954d0a90..e4983af42 100644 --- a/lib/src/abstract/Phrase.gf +++ b/lib/src/abstract/Phrase.gf @@ -36,13 +36,13 @@ abstract Phrase = Cat ** { -- The phrasal conjunction is optional. A sentence conjunction -- can also be used to prefix an utterance. - NoPConj : PConj ; + NoPConj : PConj ; -- [plain phrase without conjunction in front] PConjConj : Conj -> PConj ; -- and -- The vocative is optional. Any noun phrase can be made into vocative, -- which may be overgenerating (e.g. "I"). - NoVoc : Voc ; + NoVoc : Voc ; -- [plain phrase without vocative] VocNP : NP -> Voc ; -- my friend } diff --git a/lib/src/abstract/Sentence.gf b/lib/src/abstract/Sentence.gf index f7c30235b..6068223ca 100644 --- a/lib/src/abstract/Sentence.gf +++ b/lib/src/abstract/Sentence.gf @@ -57,10 +57,10 @@ abstract Sentence = Cat ** { -- anteriority, which are defined in [``Common`` Common.html]. fun - UseCl : Temp -> Pol -> Cl -> S ; - UseQCl : Temp -> Pol -> QCl -> QS ; - UseRCl : Temp -> Pol -> RCl -> RS ; - UseSlash : Temp -> Pol -> ClSlash -> SSlash ; + UseCl : Temp -> Pol -> Cl -> S ; -- she had not slept + UseQCl : Temp -> Pol -> QCl -> QS ; -- who had not slept + UseRCl : Temp -> Pol -> RCl -> RS ; -- that had not slept + UseSlash : Temp -> Pol -> ClSlash -> SSlash ; -- (that) she had not seen -- An adverb can be added to the beginning of a sentence, either with comma ("externally") -- or without: diff --git a/lib/src/abstract/Symbol.gf b/lib/src/abstract/Symbol.gf index a8ac9ca1b..6fe0bca64 100644 --- a/lib/src/abstract/Symbol.gf +++ b/lib/src/abstract/Symbol.gf @@ -12,7 +12,7 @@ fun SymbPN : Symb -> PN ; -- x IntPN : Int -> PN ; -- 27 FloatPN : Float -> PN ; -- 3.14159 - NumPN : Card -> PN ; + NumPN : Card -> PN ; -- twelve [as proper name] CNNumNP : CN -> Card -> NP ; -- level five ; level 5 CNSymbNP : Det -> CN -> [Symb] -> NP ; -- (the) (2) numbers x and y @@ -37,7 +37,7 @@ cat [Symb]{2} ; fun - MkSymb : String -> Symb ; + MkSymb : String -> Symb ; -- foo [making a symbol from a string] --2 Obsolescent diff --git a/lib/src/abstract/Tense.gf b/lib/src/abstract/Tense.gf index 6c0616380..0bd6a31e8 100644 --- a/lib/src/abstract/Tense.gf +++ b/lib/src/abstract/Tense.gf @@ -11,12 +11,15 @@ abstract Tense = Common ** { fun - TTAnt : Tense -> Ant -> Temp ; + TTAnt : Tense -> Ant -> Temp ; -- [combination of tense and anteriority, e.g. past anterior] - PPos, PNeg : Pol ; -- I sleep/don't sleep + PPos : Pol ; -- I sleep [positive polarity] + PNeg : Pol ; -- I don't sleep [negative polarity] - TPres : Tense ; - ASimul : Ant ; - TPast, TFut, TCond : Tense ; -- I slept/will sleep/would sleep --# notpresent - AAnter : Ant ; -- I have slept --# notpresent + TPres : Tense ; -- I sleep/have slept [present] + ASimul : Ant ; -- I sleep/slept [simultaneous, not compound] + TPast : Tense ; -- I slept [past, "imperfect"] --# notpresent + TFut : Tense ; -- I will sleep [future] --# notpresent + TCond : Tense ; -- I would sleep [conditional] --# notpresent + AAnter : Ant ; -- I have slept/had slept [anterior, "compound", "perfect"] --# notpresent } diff --git a/lib/src/abstract/Text.gf b/lib/src/abstract/Text.gf index d3cfac16f..72f4b3783 100644 --- a/lib/src/abstract/Text.gf +++ b/lib/src/abstract/Text.gf @@ -7,7 +7,7 @@ abstract Text = Common ** { fun - TEmpty : Text ; -- + TEmpty : Text ; -- [empty text, no sentences] TFullStop : Phr -> Text -> Text ; -- John walks. ... TQuestMark : Phr -> Text -> Text ; -- Are they here? ... TExclMark : Phr -> Text -> Text ; -- Let's go! ... diff --git a/lib/src/translator/Extensions.gf b/lib/src/translator/Extensions.gf index 3198ad38f..be1b1846c 100644 --- a/lib/src/translator/Extensions.gf +++ b/lib/src/translator/Extensions.gf @@ -13,13 +13,13 @@ cat [VPS] {2} ; fun - MkVPI : VP -> VPI ; - ConjVPI : Conj -> [VPI] -> VPI ; - ComplVPIVV : VV -> VPI -> VP ; + MkVPI : VP -> VPI ; -- to walk + ConjVPI : Conj -> [VPI] -> VPI ; -- to walk and drink beer + ComplVPIVV : VV -> VPI -> VP ; -- want to walk and drink beer - MkVPS : Temp -> Pol -> VP -> VPS ; - ConjVPS : Conj -> [VPS] -> VPS ; - PredVPS : NP -> VPS -> S ; + 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 ---- merge VPS and VPI ---- MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS, @@ -63,11 +63,11 @@ fun PastPartAP : VPSlash -> AP ; -- lost (opportunity) ; (opportunity) lost in space PastPartAgentAP : VPSlash -> NP -> AP ; -- (opportunity) lost by the company - UseQuantPN : Quant -> PN -> NP; -- this John + UseQuantPN : Quant -> PN -> NP ; -- this John ---- merge with IdRP? - that_RP : RP ; - who_RP : RP ; + that_RP : RP ; -- that [relative pronoun] + who_RP : RP ; -- who [relative pronoun] EmptyRelSlash : ClSlash -> RCl ; -- (the city) he lives in ---- overgenerating? @@ -80,7 +80,7 @@ fun ---- move to standard RGL? AdAdV : AdA -> AdV -> AdV ; -- almost always - UttAdV : AdV -> Utt; -- always! + UttAdV : AdV -> Utt ; -- always(!) PositAdVAdj : A -> AdV ; -- (that she) positively (sleeps) CompS : S -> Comp ; -- (the fact is) that she sleeps