diff --git a/lib/resource-1.0/api/Constructors.gf b/lib/resource-1.0/api/Constructors.gf index 2abf3c104..e8c883bf7 100644 --- a/lib/resource-1.0/api/Constructors.gf +++ b/lib/resource-1.0/api/Constructors.gf @@ -357,7 +357,7 @@ incomplete resource Constructors = open Grammar in { mkNP : Num -> N -> NP ; -- 11. almost twenty men mkNP : Num -> CN -> NP ; -- 12. almost twenty old men mkNP : Pron -> N -> NP ; -- 13. my man - mkNP : Pron -> CN -> NP; -- 14. my old man + mkNP : Pron -> CN -> NP ; -- 14. my old man -- Proper names and pronouns can be used as noun phrases. diff --git a/lib/resource-1.0/doc/MkSynopsis.hs b/lib/resource-1.0/doc/MkSynopsis.hs index d296598e7..6de3913ed 100644 --- a/lib/resource-1.0/doc/MkSynopsis.hs +++ b/lib/resource-1.0/doc/MkSynopsis.hs @@ -20,14 +20,17 @@ main = do cs1 <- getCats isLatex True commonAPI cs2 <- getCats isLatex False catAPI let cs = cs1 ++ cs2 - delimit cs + append "==A hierarchic view==\n" + include "categories-intro.txt" + append "==Explanations==\n" + delimit $ reCat cs space title "Syntax Rules" space link "Source:" syntaxAPI space rs <- getRules True isLatex syntaxAPI - delimit rs + delimit $ reTable rs space title "Structural Words" space @@ -154,3 +157,44 @@ link s f = append $ s ++ " [``" ++ fa ++ "`` " ++ f ++ "]" where ttf s = "``" ++ s ++ "``" itf s = "//" ++ s ++ "//" + +----------------- + +-- sort category synopsis by category, retain one table + +reCat t = let (hd,tb) = splitHeader t in hd : sortCat tb + +sortCat = sortBy (\r s -> compare (cat r) (cat s)) where + cat r = unquote $ words r !! 1 + +unquote = takeWhile (/='`') . dropWhile (=='`') + +-- sort function synopsis by category, into separate tables + +-- table: +-- || Function | Type | Example || +-- | ``mkText`` | ``Phr -> Text`` | //But John walks.// | + +reTable t = let (hd,tb) = splitHeader t in sortTable hd tb + +splitHeader (hd:tb) = (hd,tb) + +sortTable hd = map (printBack hd) . sortVal . groupVal + +groupVal = groupBy sameVal where + sameVal r1 r2 = valRow r1 == valRow r2 + +-- row: | ``mkText`` | ``Phr -> Text`` | //But John walks.// | +valRow r = case words r of + "|":_:"|":rest -> val where + typ = takeWhile (/="|") rest + val = unquote $ last typ + _ -> error "no row value for: " ++ r + +sortVal = sortBy (\t u -> compare (hd t) (hd u)) where + hd = (valRow . head) + +printBack hd tb = unlines $ subtitle (valRow (head tb)) : "\n" : [hd] ++ tb + +subtitle cat = "==" ++ cat ++ "==" + diff --git a/lib/resource-1.0/doc/categories-intro.txt b/lib/resource-1.0/doc/categories-intro.txt new file mode 100644 index 000000000..4ca6cc3a4 --- /dev/null +++ b/lib/resource-1.0/doc/categories-intro.txt @@ -0,0 +1,17 @@ + + + +The chart below shows the categories in a hierarchical top-down order. +The edges do not define the complete dependency structure; if they did, +the graph would have many many more edges, and also many cycles. The precise +meaning of a directed edge from //C// to //D// is: there is a constructor +of //C// that takes //D// as an argument. What the constructors exactly are, +and what other arguments they take, is described by separate tables for +each category. + + | [categories.png] | + +The rectangular boxes mark open lexical categories, which have constructors +also in the ``Paradigms`` modules. + + diff --git a/lib/resource-1.0/doc/categories.dot b/lib/resource-1.0/doc/categories.dot new file mode 100644 index 000000000..dc0a053f4 --- /dev/null +++ b/lib/resource-1.0/doc/categories.dot @@ -0,0 +1,139 @@ +digraph { + +size = "12,8" ; + +Text [style = "solid", shape = "ellipse"]; +Text -> Punct [style = "solid"]; +Text -> Phr [style = "solid"]; + +Punct [style = "solid", shape = "ellipse"]; + +Phr [style = "solid", shape = "ellipse"]; +Phr -> PConj [style = "solid"]; +Phr -> Utt [style = "solid"]; +Phr -> Voc [style = "solid"]; + +PConj [style = "solid", shape = "ellipse"]; +Voc [style = "solid", shape = "ellipse"]; + +Utt [style = "solid", shape = "ellipse"]; +Utt -> Imp [style = "solid"]; +Utt -> S [style = "solid"]; +Utt -> QS [style = "solid"]; + +Imp [style = "solid", shape = "ellipse"]; + +S [style = "solid", shape = "ellipse"]; +S -> Tense [style = "solid"]; +S -> Ant [style = "solid"]; +S -> Pol [style = "solid"]; +S -> Cl [style = "solid"]; +S -> ListS [style = "solid"]; +S -> Conjs [style = "solid"]; + +Conjs [label = "Conj,DConj", style = "solid", shape = "ellipse"]; + +Tense [style = "solid", shape = "ellipse"]; +Ant [style = "solid", shape = "ellipse"]; +Pol [style = "solid", shape = "ellipse"]; + +Cl [style = "solid", shape = "ellipse"]; +Cl -> NP [style = "solid"]; +Cl -> VP [style = "solid"]; +Cl -> Adv [style = "solid"]; + +Adv [style = "solid", shape = "rectangle"]; +Adv -> ListAdv [style = "solid"]; + + +NP [style = "solid", shape = "ellipse"]; +NP -> Predet [style = "solid"]; +NP -> Pron [style = "solid"]; +NP -> PN [style = "solid"]; +NP -> Det [style = "solid"]; +NP -> CN [style = "solid"]; +NP -> ListNP [style = "solid"]; + +Predet [style = "solid", shape = "ellipse"]; + +Pron [style = "solid", shape = "ellipse"]; +PN [style = "solid", shape = "rectangle"]; + +Det [style = "solid", shape = "ellipse"]; +Det -> Quants [style = "solid"]; +Det -> Num [style = "solid"]; +Det -> Ord [style = "solid"]; + + +Quants [label = "QuantSg,QuantPl", style = "solid", shape = "ellipse"]; +Quants -> Quant [style = "solid"]; + +Quant [style = "solid", shape = "ellipse"]; + + +Num [style = "solid", shape = "ellipse"]; +Num -> Numerals [style = "solid"]; +Num -> AdN [style = "solid"]; + +AdN [style = "solid", shape = "ellipse"]; +AdN -> CAdv [style = "solid"]; + + +Numerals [label = "Numeral,Int", style = "solid", shape = "ellipse"]; + + +Ord [style = "solid", shape = "ellipse"]; + +CN [style = "solid", shape = "ellipse"]; +CN -> Ns [style = "solid"]; +CN -> RS [style = "solid"]; + +Ns [label = "N,N2,N3", style = "solid", shape = "rectangle"]; + + +VP [style = "solid", shape = "ellipse"]; +VP -> AdV [style = "solid"]; +VP -> Vs [style = "solid"]; +VP -> AP [style = "solid"]; + +AdV [style = "solid", shape = "ellipse"]; + +Vs [label = "V,V2,V3,VV,VS,VQ,VA,V2A", style = "solid", shape = "rectangle"]; + +AP [style = "solid", shape = "ellipse"]; +AP -> AdA [style = "solid"]; +AP -> As [style = "solid"]; +AP -> ListAP [style = "solid"]; + +As [label = "A, A2", style = "solid", shape = "rectangle"]; + + + + +QS [style = "solid", shape = "ellipse"]; +QS -> QCl [style = "solid"]; + +QCl [style = "solid", shape = "ellipse"]; +QCl -> IP [style = "solid"]; +QCl -> IAdv [style = "solid"]; +QCl -> Slash [style = "solid"]; + +IP [style = "solid", shape = "ellipse"]; +IP -> IDet [style = "solid"]; + +IDet [style = "solid", shape = "ellipse"]; + +IAdv [style = "solid", shape = "ellipse"]; + +Slash [style = "solid", shape = "ellipse"]; + +RS [style = "solid", shape = "ellipse"]; +RS -> RCl [style = "solid"]; + +RCl [style = "solid", shape = "ellipse"]; +RCl -> RP [style = "solid"]; + +RP [style = "solid", shape = "ellipse"]; + + +} diff --git a/lib/resource-1.0/doc/categories.png b/lib/resource-1.0/doc/categories.png new file mode 100644 index 000000000..079b70ea4 Binary files /dev/null and b/lib/resource-1.0/doc/categories.png differ diff --git a/lib/resource-1.0/doc/synopsis.html b/lib/resource-1.0/doc/synopsis.html index 862af0eb0..c04203fd3 100644 --- a/lib/resource-1.0/doc/synopsis.html +++ b/lib/resource-1.0/doc/synopsis.html @@ -14,20 +14,64 @@

@@ -61,6 +105,30 @@ Source 1: http://www.cs.chalmers.se/~aarne

Source 2: http://www.cs.chalmers.se/~aarne/GF/lib/resource/abstract/Cat.gf

+ +

A hierarchic view

+

+The chart below shows the categories in a hierarchical top-down order. +The edges do not define the complete dependency structure; if they did, +the graph would have many many more edges, and also many cycles. The precise +meaning of a directed edge from C to D is: there is a constructor +of C that takes D as an argument. What the constructors exactly are, +and what other arguments they take, is described by separate tables for +each category. +

+ + + + +
+ +

+

+The rectangular boxes mark open lexical categories, which have constructors +also in the Paradigms modules. +

+ +

Explanations

@@ -68,44 +136,19 @@ Source 2: http://www.cs.chalmers.se/~aarne/GF - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -118,24 +161,14 @@ Source 2: http://www.cs.chalmers.se/~aarne/GF - - - + + + - - - - - - - - - - - - - + + + @@ -143,79 +176,9 @@ Source 2: http://www.cs.chalmers.se/~aarne/GF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -223,39 +186,14 @@ Source 2: http://www.cs.chalmers.se/~aarne/GF - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -268,64 +206,34 @@ Source 2: http://www.cs.chalmers.se/~aarne/GF - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -343,17 +251,180 @@ Source 2: http://www.cs.chalmers.se/~aarne/GF + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CategoryExample
Texttext consisting of several phrases"He is here. Why?"Aone-place adjective"warm"
Phrphrase in a text"but be quiet please"A2two-place adjective"divisible"
Uttsentence, question, word..."be quiet"
Vocvocative or "please""my darling"
PConjphrase-beginning conj."therefore"
SCembedded sentence or question"that it rains"
Advverb-phrase-modifying adverb,"in the house"
AdVadverb directly attached to verb"always"APadjectival phrase"very warm"
AdA"more than"
IAdvinterrogative adverb"why"AdVadverb directly attached to verb"always"
CAdvcomparative adverb"more"
Tensetensepresent, past, future
Polpolaritypositive, negativeAdvverb-phrase-modifying adverb,"in the house"
Antsimultaneous, anterior
Sdeclarative sentence"she lived here"
QSquestion"where did she live"
RSrelative"in which she lived"
Cldeclarative clause, with all tenses"she looks at this"
Slashclause missing NP (S/NP in GPSG)"she looks at"
Impimperative"look at this"
QClquestion clause, with all tenses"why does she walk"
IPinterrogative pronoun"who"
ICompinterrogative complement of copula"where"
IDetinterrogative determiner"which"
RClrelative clause, with all tenses"in which she lives"
RPrelative pronoun"in which"
VPverb phrase"is very warm"
Compcomplement of copula, such as AP"very warm"
APadjectival phrase"very warm"CAdvcomparative adverb"more"
CN"red house"
NPnoun phrase (subject or object)"the red house"Cldeclarative clause, with all tenses"she looks at this"
Pronpersonal pronoun"she"
Detdeterminer phrase"those seven"
Predetpredeterminer (prefixed Quant)"all"
Quantquantifier with both sg and pl"this/these"
Numcardinal number (used with QuantPl)"seven"
Ordordinal number (used in Det)"seventh"Compcomplement of copula, such as AP"very warm"
Conj"both - and"
Subjsubjunction,"if"Detdeterminer phrase"those seven"
Preppreposition, or just case"in"IAdvinterrogative adverb"why"
Vone-place verb"sleep"ICompinterrogative complement of copula"where"
V2two-place verb"love"IDetinterrogative determiner"which"
V3three-place verb"show"IPinterrogative pronoun"who"
VVverb-phrase-complement verb"want"
VSsentence-complement verb"claim"
VQquestion-complement verb"ask"
VAadjective-complement verb"look"
V2Averb with NP and AP complement"paint"
Aone-place adjective"warm"
A2two-place adjective"divisible"Impimperative"look at this"
N"connection"
NPnoun phrase (subject or object)"the red house"
Numcardinal number (used with QuantPl)"seven"
Ordordinal number (used in Det)"seventh"
PConjphrase-beginning conj."therefore"
PN proper name "Paris"
Phrphrase in a text"but be quiet please"
Polpolaritypositive, negative
Predetpredeterminer (prefixed Quant)"all"
Preppreposition, or just case"in"
Pronpersonal pronoun"she"
QClquestion clause, with all tenses"why does she walk"
QSquestion"where did she live"
Quantquantifier with both sg and pl"this/these"
RClrelative clause, with all tenses"in which she lives"
RPrelative pronoun"in which"
RSrelative"in which she lived"
Sdeclarative sentence"she lived here"
SCembedded sentence or question"that it rains"
Slashclause missing NP (S/NP in GPSG)"she looks at"
Subjsubjunction,"if"
Tensetensepresent, past, future
Texttext consisting of several phrases"He is here. Why?"
Uttsentence, question, word..."be quiet"
Vone-place verb"sleep"
V2two-place verb"love"
V2Averb with NP and AP complement"paint"
V3three-place verb"show"
VAadjective-complement verb"look"
VPverb phrase"is very warm"
VQquestion-complement verb"ask"
VSsentence-complement verb"claim"
VVverb-phrase-complement verb"want"
Vocvocative or "please""my darling"
- +

+

Syntax Rules

Source: http://www.cs.chalmers.se/~aarne/GF/lib/resource/api/Constructors.gf

+ +

AP

@@ -361,164 +432,157 @@ Source: http://www.cs.chalmers.se/~aarne/ - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + + +
FunctionExample
mkTextPhr -> TextBut John walks.mkAPA -> APold
mkTextPhr -> (Punct) -> (Text) -> TextJohn walks? Yes.mkAPA -> NP -> APolder than John
mkTextUtt -> TextJohn.mkAPA2 -> NP -> APmarried to her
mkTextS -> TextJohn walked.mkAPA2 -> APmarried to myself
mkTextCl -> TextJohn walks.mkAPAP -> S -> APprobable that John walks
mkTextQS -> TextDid John walk?mkAPAP -> QS -> APuncertain if John walks
mkTextImp -> TextWalk!mkAPAP -> VP -> APready to go
emptyTextText(empty text)mkAPAdA -> A -> APvery old
fullStopPunctPunct.mkAPAdA -> AP -> APvery very old
questMarkPunctPunct?mkAPConj -> AP -> AP -> APold and big
exclMarkPunctPunct!mkAPConj -> ListAP -> APold, big, and warm
mkPhrUtt -> PhrwhymkAPDConj -> AP -> AP -> APeither old or big
mkPhr(PConj) -> Utt -> (Voc) -> Phrbut why JohnmkAPDConj -> ListAP -> APeither old, big, or warm
+ +

+
+

AdN

+ + + + + - - - + + + + +
FunctionTypeExample
mkPhrS -> PhrJohn walkedmkAdNCAdv -> AdNmore than
+ +

+ +

Adv

+ + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + +
FunctionTypeExample
mkPhrCl -> PhrJohn walksmkAdvA -> Advwarmly
mkPhrQS -> Phrdid John walkmkAdvPrep -> NP -> Advwith John
mkPhrImp -> PhrwalkmkAdvSubj -> S -> Advwhen John walks
mkPConjConj -> PConjandmkAdvCAdv -> A -> NP -> Advmore warmly than John
mkVocNP -> VocJohnmkAdvCAdv -> A -> S -> Advmore warmly than John walks
mkUttS -> UttJohn walkedmkAdvAdA -> Adv -> Advvery warmly
mkUttCl -> UttJohn walksmkAdvConj -> Adv -> Adv -> Advhere and now
mkUttQS -> Uttdid John walkmkAdvConj -> ListAdv -> Advwith John, here and now
mkUttImp -> Uttlove yourselfmkAdvDConj -> Adv -> Adv -> Adveither here or now
mkUtt(ImpForm) -> (Pol) -> Imp -> Uttdon't love yourselvesmkAdvDConj -> ListAdv -> Adveither here, now, or with John
+ +

+ +

Ant

+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -530,75 +594,117 @@ Source: http://www.cs.chalmers.se/~aarne/ +
mkUttIP -> Uttwho
mkUttIAdv -> Uttwhy
mkUttNP -> UttJohn
mkUttAdv -> Utthere
mkUttVP -> Uttto walk
lets_UttVP -> Uttlet's walk
positivePolPol(John walks) [default]
negativePolPol(John doesn't walk)FunctionTypeExample
simultaneousAntAnt (John has walked) --# notpresent
+ +

+
+

CN

+ - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
presentTenseTense(John walks) [default]FunctionTypeExample
pastTenseTense(John walked) --# notpresentmkCNN -> CNhouse
futureTenseTense(John will walk) --# notpresentmkCNN2 -> NP -> CNmother of John
conditionalTenseTense(John would walk) --# notpresentmkCNN3 -> NP -> NP -> CNdistance from this city to Paris
singularImpFormImpForm(help yourself) [default]mkCNN2 -> CNson
pluralImpFormImpForm(help yourselves)mkCNN3 -> CNflight
politeImpFormImpForm(help yourself) (polite singular)mkCNA -> N -> CNbig house
mkSCl -> SJohn walksmkCNA -> CN -> CNbig blue house
mkS(Tense) -> (Ant) -> (Pol) -> Cl -> SJohn wouldn't have walkedmkCNAP -> N -> CNvery big house
mkSConj -> S -> S -> SJohn walks and I runmkCNAP -> CN -> CNvery big blue house
mkSConj -> ListS -> SJohn walks, I run and you sleepmkCNN -> RS -> CNhouse that John loves
mkSDConj -> S -> S -> Seither John walk or I runmkCNCN -> RS -> CNbig house that John loves
mkSDConj -> ListS -> Seither John walks, I run or you sleepmkCNN -> Adv -> CNhouse in the city
mkSAdv -> S -> Stoday, John walksmkCNCN -> Adv -> CNbig house in the city
mkCNCN -> S -> CNrule that John walks
mkCNCN -> QS -> CNquestion if John walks
mkCNCN -> VP -> CNreason to walk
mkCNN -> NP -> CNking John
mkCNCN -> NP -> CNold king John
+ +

+ +

Cl

+ + + + + @@ -725,6 +831,1107 @@ Source: http://www.cs.chalmers.se/~aarne/ +
FunctionTypeExample
mkClVP -> Cl one walks
+ +

+
+

Det

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FunctionTypeExample
mkDetQuantSg -> Detthis
mkDetQuantSg -> (Ord) -> Detthis first
mkDetQuantPl -> Detthese
mkDetQuantPl -> (Num) -> (Ord) -> Detthese five best
mkDetQuant -> Detthis
mkDetQuant -> Num -> Detthese five
mkDetNum -> Detalmost twenty
mkDetNumeral -> Detfive
mkDetInt -> Det51
mkDetPron -> Detmy
defSgDetDetthe (house)
defPlDetDetthe (houses)
indefSgDetDeta (house)
indefPlDetDet(houses)
+ +

+ +

IAdv

+ + + + + + + + + + + +
FunctionTypeExample
mkIAdvPrep -> IP -> IAdvin which city
+ +

+ +

IP

+ + + + + + + + + + + + + + + + + + + + + +
FunctionTypeExample
mkIPIDet -> N -> IPwhich city
mkIPIDet -> (Num) -> (Ord) -> CN -> IPwhich five best cities
mkIPIP -> Adv -> IPwho in Paris
+ +

+ +

Imp

+ + + + + + + + + + + + + + + + + + + + + +
FunctionTypeExample
mkImpV -> Impgo
mkImpV2 -> NP -> Imptake it
mkImpVP -> Impgo there now
+ +

+ +

ImpForm

+ + + + + + + + + + + + + + + + + + + + + +
FunctionTypeExample
singularImpFormImpForm(help yourself) [default]
pluralImpFormImpForm(help yourselves)
politeImpFormImpForm(help yourself) (polite singular)
+ +

+ +

ListAP

+ + + + + + + + + + + + + + + + +
FunctionTypeExample
mkListAPAP -> AP -> ListAPold, big
mkListAPAP -> ListAP -> ListAPold, big, warm
+ +

+ +

ListAdv

+ + + + + + + + + + + + + + + + +
FunctionTypeExample
mkListAdvAdv -> Adv -> ListAdvhere, now
mkListAdvAdv -> ListAdv -> ListAdvto me, here, now
+ +

+ +

ListNP

+ + + + + + + + + + + + + + + + +
FunctionTypeExample
mkListNPNP -> NP -> ListNPJohn, I
mkListNPNP -> ListNP -> ListNPJohn, I, that
+ +

+ +

ListS

+ + + + + + + + + + + + + + + + +
FunctionTypeExample
mkListSS -> S -> ListShe walks, I run
mkListSS -> ListS -> ListSJohn walks, I run, you sleep
+ +

+ +

NP

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FunctionTypeExample
mkNPDet -> N -> NPthe first man
mkNPDet -> CN -> NPthe first old man
mkNPQuantSg -> N -> NPthis man
mkNPQuantSg -> CN -> NPthis old man
mkNPQuantPl -> N -> NPthese men
mkNPQuantPl -> CN -> NPthese old men
mkNPNumeral -> N -> NPtwenty men
mkNPNumeral -> CN -> NPtwenty old men
mkNPInt -> N -> NP45 men
mkNPInt -> CN -> NP45 old men
mkNPNum -> N -> NPalmost twenty men
mkNPNum -> CN -> NPalmost twenty old men
mkNPPron -> N -> NPmy man
mkNPPron -> CN -> NPmy old man
mkNPPN -> NPJohn
mkNPPron -> NPhe
mkNPPredet -> NP -> NPonly John
mkNPNP -> V2 -> NPJohn killed
mkNPNP -> Adv -> NPJohn in Paris
mkNPConj -> NP -> NP -> NPJohn and I
mkNPConj -> ListNP -> NPJohn, I, and that
mkNPDConj -> NP -> NP -> NPeither John or I
mkNPDConj -> ListNP -> NPeither John, I, or that
+ +

+ +

Num

+ + + + + + + + + + + + + + + + + + + + + +
FunctionTypeExample
mkNumNumeral -> Numtwenty
mkNumInt -> Num51
mkNumAdN -> Num -> Numalmost ten
+ +

+ +

Numeral

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FunctionTypeExample
n1_NumeralNumeralone
n2_NumeralNumeraltwo
n3_NumeralNumeralthree
n4_NumeralNumeralfour
n5_NumeralNumeralfive
n6_NumeralNumeralsix
n7_NumeralNumeralseven
n8_NumeralNumeraleight
n9_NumeralNumeralnine
n10_NumeralNumeralten
n20_NumeralNumeraltwenty
n100_NumeralNumeralhundred
n1000_NumeralNumeralthousand
+ +

+ +

Ord

+ + + + + + + + + + + + + + + + + + + + + +
FunctionTypeExample
mkOrdNumeral -> Ordtwentieth
mkOrdInt -> Ord51st
mkOrdA -> Ordbest
+ +

+ +

PConj

+ + + + + + + + + + + +
FunctionTypeExample
mkPConjConj -> PConjand
+ +

+ +

Phr

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FunctionTypeExample
mkPhrUtt -> Phrwhy
mkPhr(PConj) -> Utt -> (Voc) -> Phrbut why John
mkPhrS -> PhrJohn walked
mkPhrCl -> PhrJohn walks
mkPhrQS -> Phrdid John walk
mkPhrImp -> Phrwalk
+ +

+ +

Pol

+ + + + + + + + + + + + + + + + +
FunctionTypeExample
positivePolPol(John walks) [default]
negativePolPol(John doesn't walk)
+ +

+ +

Punct

+ + + + + + + + + + + + + + + + + + + + + +
FunctionTypeExample
fullStopPunctPunct.
questMarkPunctPunct?
exclMarkPunctPunct!
+ +

+ +

QCl

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FunctionTypeExample
mkQClCl -> QCldoes John walk
mkQClIP -> VP -> QClwho walks
mkQClIP -> NP -> V2 -> QClwhom does John love
mkQClIP -> Slash -> QClwhom does John love today
mkQClIAdv -> Cl -> QClwhy does John walk
mkQClPrep -> IP -> Cl -> QClwith who does John walk
mkQClIAdv -> NP -> QClwhere is John
mkQClIP -> QClwhat is there
+ +

+ +

QS

+ + + + + + + + + + + + + + + + + + + + + +
FunctionTypeExample
mkQSQCl -> QSwho walks
mkQS(Tense) -> (Ant) -> (Pol) -> QCl -> QSwho wouldn't have walked
mkQSCl -> QSdoes John walk
+ +

+ +

Quant

+ + + + + + + + + + + + + + + + +
FunctionTypeExample
defQuantQuantthe
indefQuantQuanta
+ +

+ +

QuantPl

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FunctionTypeExample
mkQuantPlQuant -> QuantPlthese
the_QuantPlQuantPlthe
a_QuantPlQuantPl(indefinite plural)
these_QuantPlQuantPlthese
those_QuantPlQuantPlthose
+ +

+ +

QuantSg

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FunctionTypeExample
mkQuantSgQuant -> QuantSgthis
massQuantQuantSg(mass terms)
the_QuantSgQuantSgthe
a_QuantSgQuantSga
this_QuantSgQuantSgthis
that_QuantSgQuantSgthat
+ +

+ +

RCl

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
FunctionTypeExample
mkRClRP -> VP -> RClthat walk
mkRClRP -> NP -> V2 -> RClwhich John loves
mkRClRP -> Slash -> RClwhich John loves today
mkRClCl -> RClsuch that John loves her
+ +

+ +

RP

+ + + + + + + + + + + + + + + + +
FunctionTypeExample
which_RPRPwhich
mkRPPrep -> NP -> RP -> RPall the houses in which
+ +

+ +

RS

+ + + + + + + + + + + + + + + + +
FunctionTypeExample
mkRSRCl -> RSthat walk
mkRS(Tense) -> (Ant) -> (Pol) -> RCl -> RSthat wouldn't have walked
+ +

+ +

S

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FunctionTypeExample
mkSCl -> SJohn walks
mkS(Tense) -> (Ant) -> (Pol) -> Cl -> SJohn wouldn't have walked
mkSConj -> S -> S -> SJohn walks and I run
mkSConj -> ListS -> SJohn walks, I run and you sleep
mkSDConj -> S -> S -> Seither John walk or I run
mkSDConj -> ListS -> Seither John walks, I run or you sleep
mkSAdv -> S -> Stoday, John walks
+ +

+ +

Slash

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
FunctionTypeExample
mkSlashNP -> V2 -> Slash(whom) John loves
mkSlashNP -> VV -> V2 -> Slash(whom) John wants to see
mkSlashCl -> Prep -> Slash(with whom) John walks
mkSlashSlash -> Adv -> Slash(whom) John loves today
+ +

+ +

Tense

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
FunctionTypeExample
presentTenseTense(John walks) [default]
pastTenseTense(John walked) --# notpresent
futureTenseTense(John will walk) --# notpresent
conditionalTenseTense(John would walk) --# notpresent
+ +

+ +

Text

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FunctionTypeExample
mkTextPhr -> TextBut John walks.
mkTextPhr -> (Punct) -> (Text) -> TextJohn walks? Yes.
mkTextUtt -> TextJohn.
mkTextS -> TextJohn walked.
mkTextCl -> TextJohn walks.
mkTextQS -> TextDid John walk?
mkTextImp -> TextWalk!
emptyTextText(empty text)
+ +

+ +

Utt

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FunctionTypeExample
mkUttS -> UttJohn walked
mkUttCl -> UttJohn walks
mkUttQS -> Uttdid John walk
mkUttImp -> Uttlove yourself
mkUtt(ImpForm) -> (Pol) -> Imp -> Uttdon't love yourselves
mkUttIP -> Uttwho
mkUttIAdv -> Uttwhy
mkUttNP -> UttJohn
mkUttAdv -> Utthere
mkUttVP -> Uttto walk
lets_UttVP -> Uttlet's walk
+ +

+ +

VP

+ + + + + + @@ -835,754 +2042,26 @@ Source: http://www.cs.chalmers.se/~aarne/ +
FunctionTypeExample
mkVP V -> VPVP -> VP be sleeping
+ +

+
+

Voc

+ - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
mkImpV -> ImpgoFunctionTypeExample
mkImpV2 -> NP -> Imptake it
mkImpVP -> Impgo there now
mkNPDet -> N -> NPthe first man
mkNPDet -> CN -> NPthe first old man
mkNPQuantSg -> N -> NPthis man
mkNPQuantSg -> CN -> NPthis old man
mkNPQuantPl -> N -> NPthese men
mkNPQuantPl -> CN -> NPthese old men
mkNPNumeral -> N -> NPtwenty men
mkNPNumeral -> CN -> NPtwenty old men
mkNPInt -> N -> NP45 men
mkNPInt -> CN -> NP45 old men
mkNPNum -> N -> NPalmost twenty men
mkNPNum -> CN -> NPalmost twenty old men
mkNPPron -> N -> NPmy man
mkNPPron -> CN -> NP;my old man
mkNPPN -> NPmkVocNP -> Voc John
mkNPPron -> NPhe
mkNPPredet -> NP -> NPonly John
mkNPNP -> V2 -> NPJohn killed
mkNPNP -> Adv -> NPJohn in Paris
mkNPConj -> NP -> NP -> NPJohn and I
mkNPConj -> ListNP -> NPJohn, I, and that
mkNPDConj -> NP -> NP -> NPeither John or I
mkNPDConj -> ListNP -> NPeither John, I, or that
mkDetQuantSg -> Detthis
mkDetQuantSg -> (Ord) -> Detthis first
mkDetQuantPl -> Detthese
mkDetQuantPl -> (Num) -> (Ord) -> Detthese five best
mkDetQuant -> Detthis
mkDetQuant -> Num -> Detthese five
mkDetNum -> Detalmost twenty
mkDetNumeral -> Detfive
mkDetInt -> Det51
mkDetPron -> Detmy
defSgDetDetthe (house)
defPlDetDetthe (houses)
indefSgDetDeta (house)
indefPlDetDet(houses)
defQuantQuantthe
indefQuantQuanta
mkQuantSgQuant -> QuantSgthis
massQuantQuantSg(mass terms)
the_QuantSgQuantSgthe
a_QuantSgQuantSga
this_QuantSgQuantSgthis
that_QuantSgQuantSgthat
mkQuantPlQuant -> QuantPlthese
the_QuantPlQuantPlthe
a_QuantPlQuantPl(indefinite plural)
these_QuantPlQuantPlthese
those_QuantPlQuantPlthose
mkNumNumeral -> Numtwenty
mkNumInt -> Num51
mkNumAdN -> Num -> Numalmost ten
mkOrdNumeral -> Ordtwentieth
mkOrdInt -> Ord51st
mkOrdA -> Ordbest
mkAdNCAdv -> AdNmore than
n1_NumeralNumeralone
n2_NumeralNumeraltwo
n3_NumeralNumeralthree
n4_NumeralNumeralfour
n5_NumeralNumeralfive
n6_NumeralNumeralsix
n7_NumeralNumeralseven
n8_NumeralNumeraleight
n9_NumeralNumeralnine
n10_NumeralNumeralten
n20_NumeralNumeraltwenty
n100_NumeralNumeralhundred
n1000_NumeralNumeralthousand
mkCNN -> CNhouse
mkCNN2 -> NP -> CNmother of John
mkCNN3 -> NP -> NP -> CNdistance from this city to Paris
mkCNN2 -> CNson
mkCNN3 -> CNflight
mkCNA -> N -> CNbig house
mkCNA -> CN -> CNbig blue house
mkCNAP -> N -> CNvery big house
mkCNAP -> CN -> CNvery big blue house
mkCNN -> RS -> CNhouse that John loves
mkCNCN -> RS -> CNbig house that John loves
mkCNN -> Adv -> CNhouse in the city
mkCNCN -> Adv -> CNbig house in the city
mkCNCN -> S -> CNrule that John walks
mkCNCN -> QS -> CNquestion if John walks
mkCNCN -> VP -> CNreason to walk
mkCNN -> NP -> CNking John
mkCNCN -> NP -> CNold king John
mkAPA -> APold
mkAPA -> NP -> APolder than John
mkAPA2 -> NP -> APmarried to her
mkAPA2 -> APmarried to myself
mkAPAP -> S -> APprobable that John walks
mkAPAP -> QS -> APuncertain if John walks
mkAPAP -> VP -> APready to go
mkAPAdA -> A -> APvery old
mkAPAdA -> AP -> APvery very old
mkAPConj -> AP -> AP -> APold and big
mkAPConj -> ListAP -> APold, big, and warm
mkAPDConj -> AP -> AP -> APeither old or big
mkAPDConj -> ListAP -> APeither old, big, or warm
mkAdvA -> Advwarmly
mkAdvPrep -> NP -> Advwith John
mkAdvSubj -> S -> Advwhen John walks
mkAdvCAdv -> A -> NP -> Advmore warmly than John
mkAdvCAdv -> A -> S -> Advmore warmly than John walks
mkAdvAdA -> Adv -> Advvery warmly
mkAdvConj -> Adv -> Adv -> Advhere and now
mkAdvConj -> ListAdv -> Advwith John, here and now
mkAdvDConj -> Adv -> Adv -> Adveither here or now
mkAdvDConj -> ListAdv -> Adveither here, now, or with John
mkQSQCl -> QSwho walks
mkQS(Tense) -> (Ant) -> (Pol) -> QCl -> QSwho wouldn't have walked
mkQSCl -> QSdoes John walk
mkQClCl -> QCldoes John walk
mkQClIP -> VP -> QClwho walks
mkQClIP -> NP -> V2 -> QClwhom does John love
mkQClIP -> Slash -> QClwhom does John love today
mkQClIAdv -> Cl -> QClwhy does John walk
mkQClPrep -> IP -> Cl -> QClwith who does John walk
mkQClIAdv -> NP -> QClwhere is John
mkQClIP -> QClwhat is there
mkIPIDet -> N -> IPwhich city
mkIPIDet -> (Num) -> (Ord) -> CN -> IPwhich five best cities
mkIPIP -> Adv -> IPwho in Paris
mkIAdvPrep -> IP -> IAdvin which city
mkRSRCl -> RSthat walk
mkRS(Tense) -> (Ant) -> (Pol) -> RCl -> RSthat wouldn't have walked
mkRClRP -> VP -> RClthat walk
mkRClRP -> NP -> V2 -> RClwhich John loves
mkRClRP -> Slash -> RClwhich John loves today
mkRClCl -> RClsuch that John loves her
which_RPRPwhich
mkRPPrep -> NP -> RP -> RPall the houses in which
mkSlashNP -> V2 -> Slash(whom) John loves
mkSlashNP -> VV -> V2 -> Slash(whom) John wants to see
mkSlashCl -> Prep -> Slash(with whom) John walks
mkSlashSlash -> Adv -> Slash(whom) John loves today
mkListSS -> S -> ListShe walks, I run
mkListSS -> ListS -> ListSJohn walks, I run, you sleep
mkListAdvAdv -> Adv -> ListAdvhere, now
mkListAdvAdv -> ListAdv -> ListAdvto me, here, now
mkListAPAP -> AP -> ListAPold, big
mkListAPAP -> ListAP -> ListAPold, big, warm
mkListNPNP -> NP -> ListNPJohn, I
mkListNPNP -> ListNP -> ListNPJohn, I, that
- +

+

Structural Words

Source: http://www.cs.chalmers.se/~aarne/GF/lib/resource/abstract/Structural.gf @@ -1978,7 +2457,8 @@ Source: http://www.cs.chalmers.se/~aar - +

+

Paradigms for Danish

source http://www.cs.chalmers.se/~aarne/GF/lib/resource/danish/ParadigmsDan.gf @@ -2222,7 +2702,8 @@ source http://www.cs.chalmers.se/~aarn - +

+

Paradigms for English

source http://www.cs.chalmers.se/~aarne/GF/lib/resource/english/ParadigmsEng.gf @@ -2450,7 +2931,8 @@ source http://www.cs.chalmers.se/~aar - +

+

Paradigms for Finnish

source http://www.cs.chalmers.se/~aarne/GF/lib/resource/finnish/ParadigmsFin.gf @@ -2786,7 +3268,8 @@ source http://www.cs.chalmers.se/~aar - +

+

Paradigms for French

source http://www.cs.chalmers.se/~aarne/GF/lib/resource/french/ParadigmsFre.gf @@ -3014,7 +3497,8 @@ source http://www.cs.chalmers.se/~aarn - +

+

Paradigms for German

source http://www.cs.chalmers.se/~aarne/GF/lib/resource/german/ParadigmsGer.gf @@ -3266,7 +3750,8 @@ source http://www.cs.chalmers.se/~aarn - +

+

Paradigms for Italian

source http://www.cs.chalmers.se/~aarne/GF/lib/resource/italian/ParadigmsIta.gf @@ -3498,7 +3983,8 @@ source http://www.cs.chalmers.se/~aar - +

+

Paradigms for Norwegian

source http://www.cs.chalmers.se/~aarne/GF/lib/resource/norwegian/ParadigmsNor.gf @@ -3742,7 +4228,8 @@ source http://www.cs.chalmers.se/~a - +

+

Paradigms for Russian

source http://www.cs.chalmers.se/~aarne/GF/lib/resource/russian/ParadigmsRus.gf @@ -3982,7 +4469,8 @@ source http://www.cs.chalmers.se/~aar - +

+

Paradigms for Spanish

source http://www.cs.chalmers.se/~aarne/GF/lib/resource/spanish/ParadigmsSpa.gf @@ -4218,7 +4706,8 @@ source http://www.cs.chalmers.se/~aar - +

+

Paradigms for Swedish

source http://www.cs.chalmers.se/~aarne/GF/lib/resource/swedish/ParadigmsSwe.gf @@ -4458,7 +4947,8 @@ source http://www.cs.chalmers.se/~aar - +

+

Browsing the libraries with GF commands

All of the following assume @@ -4488,7 +4978,7 @@ To view linearizations in all languages by parsing from English: > p -cat=S -lang=LangEng "this grammar is too big" | tb

- +

An Example of Usage

The standard way of building an application has the following modules. @@ -4553,6 +5043,6 @@ For each language, an instantiation of the functor:

- +