diff --git a/book/examples/chapter2/foodEng.cf b/book/examples/chapter2/foodEng.cf new file mode 100644 index 000000000..3216f2e30 --- /dev/null +++ b/book/examples/chapter2/foodEng.cf @@ -0,0 +1,14 @@ +Pred. Comment ::= Item "is" Quality +This. Item ::= "this" Kind +That. Item ::= "that" Kind +Mod. Kind ::= Quality Kind +Wine. Kind ::= "wine" +Cheese. Kind ::= "cheese" +Fish. Kind ::= "fish" +Very. Quality ::= "very" Quality +Fresh. Quality ::= "fresh" +Warm. Quality ::= "warm" +Italian. Quality ::= "Italian" +Expensive. Quality ::= "expensive" +Delicious. Quality ::= "delicious" +Boring. Quality ::= "boring" diff --git a/book/examples/chapter2/foodIta.cf b/book/examples/chapter2/foodIta.cf new file mode 100644 index 000000000..02b825ed0 --- /dev/null +++ b/book/examples/chapter2/foodIta.cf @@ -0,0 +1,14 @@ +Pred. Comment ::= Item "è" Quality +This. Item ::= "questo" Kind +That. Item ::= "quel" Kind +Mod. Kind ::= Kind Quality +Wine. Kind ::= "vino" +Cheese. Kind ::= "formaggio" +Fish. Kind ::= "pesce" +Very. Quality ::= "molto" Quality +Fresh. Quality ::= "fresco" +Warm. Quality ::= "caldo" +Italian. Quality ::= "italiano" +Expensive. Quality ::= "caro" +Delicious. Quality ::= "delizioso" +Boring. Quality ::= "noioso" diff --git a/book/examples/chapter4/ClothesEng.gf b/book/examples/chapter4/ClothesEng.gf index d45a8ce30..c6b9a2520 100644 --- a/book/examples/chapter4/ClothesEng.gf +++ b/book/examples/chapter4/ClothesEng.gf @@ -6,5 +6,5 @@ concrete ClothesEng of Clothes = CommentsEng ** Shirt = mkCN (mkN "shirt") ; Jacket = mkCN (mkN "jacket") ; Comfortable = mkAP (mkA "comfortable") ; - Elegant = mkAP (mkA "elega") ; + Elegant = mkAP (mkA "elegant") ; } diff --git a/lib/doc/MkSynopsis.hs b/lib/doc/MkSynopsis.hs index 30e9f0d42..5eb331980 100644 --- a/lib/doc/MkSynopsis.hs +++ b/lib/doc/MkSynopsis.hs @@ -189,10 +189,10 @@ mkTable hasEx isLatex aexx cs = inChunks chsize (\rs -> header : map (unwords . where name' = ttf name typ' = showTyp cs typ - ex' typ = if null ex then itf (takeWhile (/='_') name) else + ex' typ = let ex0 = if null ex then itf (takeWhile (/='_') name) else ex in case M.lookup typ aexx of - Just es -> mkExample es ex - _ -> itf ex + Just es -> mkExample es ex0 + _ -> itf ex0 expl typ = if null ex then itf "-" else itf ex -- make an example with hover-popup translations @@ -259,8 +259,8 @@ stitle s = append $ "==" ++ s ++ "==" include s = append $ "%!include: " ++ s space = append "\n" delimit ss = mapM_ append ss -link s f = append $ s ++ " [``" ++ fa ++ "`` " ++ f ++ "]" where - fa = "http://www.grammaticalframework.org/lib/resource" ++ dropWhile (=='.') f +link s f = append $ s ++ " [``" ++ f ++ "`` " ++ fa ++ "]" where + fa = "http://www.grammaticalframework.org/lib" ++ dropWhile (=='.') f ttf s = "``" ++ s ++ "``" itf s = "//" ++ s ++ "//" diff --git a/lib/doc/api-examples.txt b/lib/doc/api-examples.txt index 4b1b3780b..161f586cb 100644 --- a/lib/doc/api-examples.txt +++ b/lib/doc/api-examples.txt @@ -183,7 +183,7 @@ mkUtt (mkVP old_A he_NP) mkVP : A2 -> NP -> VP -- be married to him mkUtt (mkVP married_A2 he_NP) mkVP : AP -> VP -- be very old -mkUtt (mkVP (mkAP very_AdA old_A) +mkUtt (mkVP (mkAP very_AdA old_A)) mkVP : N -> VP -- be a woman mkUtt (mkVP woman_N) mkVP : CN -> VP -- be an old woman @@ -278,47 +278,65 @@ mkUtt (mkNP (mkNP the_Det man_N) see_V2) mkUtt (mkNP (mkNP paris_PN) today_Adv) mkNP : NP -> RS -> NP -- John, who walks mkUtt (mkNP (mkNP john_PN) (mkRS (mkRCl which_RP (mkVP walk_V)))) - mkNP : Conj -> NP -> NP -> NP + mkNP : Conj -> NP -> NP -> NP mkUtt (mkNP or_Conj (mkNP this_Det woman_N) (mkNP john_PN)) - mkNP : Conj -> ListNP -> NP + mkNP : Conj -> ListNP -> NP mkUtt (mkNP or_Conj (mkListNP (mkNP this_Det woman_N) (mkListNP (mkNP john_PN) i_NP))) --- i_NP : NP -- I ---i_NP --- you_NP : NP -- you (singular) ---you_NP --- youPol_NP : NP -- you (polite singular) ---youPol_NP --- he_NP : NP -- he ---he_NP --- she_NP : NP -- she ---she_NP --- it_NP : NP -- it ---it_NP --- we_NP : NP -- we ---we_NP --- youPl_NP : NP -- you (plural) ---youPl_NP --- they_NP : NP -- they ---they_NP --- mkDet : Quant -> Det -- this --- mkDet : Quant -> Card -> Det -- these five --- mkDet : Quant -> Ord -> Det -- the best --- mkDet : Quant -> Num -> Ord -> Det -- these five best --- mkDet : Quant -> Num -> Det -- these five --- mkDet : Card -> Det -- forty + i_NP : NP -- I +mkUtt i_NP + you_NP : NP -- you (singular) +mkUtt you_NP + youPol_NP : NP -- you (polite singular) +mkUtt youPol_NP + he_NP : NP -- he +mkUtt he_NP + she_NP : NP -- she +mkUtt she_NP + it_NP : NP -- it +mkUtt it_NP + we_NP : NP -- we +mkUtt we_NP + youPl_NP : NP -- you (plural) +mkUtt youPl_NP + they_NP : NP -- they +mkUtt they_NP + mkDet : Quant -> Det -- this +mkDet this_Quant + mkDet : Quant -> Card -> Det -- these five +mkDet this_Quant (mkCard (mkNumeral n5_Unit)) + mkDet : Quant -> Ord -> Det -- the best +mkDet the_Quant (mkOrd (mkNumeral n5_Unit)) + mkDet : Quant -> Num -> Ord -> Det -- these five best +mkDet the_Quant (mkNum (mkNumeral n5_Unit)) (mkOrd good_A) + mkDet : Quant -> Num -> Det -- these five +mkDet this_Quant pluralNum + mkDet : Card -> Det -- forty +mkDet (mkCard (mkNumeral n5_Unit)) -- mkDet : Digits -> Det -- 51 -- mkDet : Numeral -> Det -- five --- mkDet : Pron -> Det -- my --- mkDet : Pron -> Num -> Det -- my five --- the_Det : Det -- the (house) --- a_Det : Det -- a (house) --- theSg_Det : Det -- the (houses) --- thePl_Det : Det -- the (houses) --- aSg_Det : Det -- a (house) --- aPl_Det : Det -- (houses) --- mkQuant : Pron -> Quant -- my --- the_Quant : Quant -- the --- a_Quant : Quant -- a +mkDet (mkNumeral n5_Unit) + mkDet : Pron -> Det -- my +mkDet i_Pron + mkDet : Pron -> Num -> Det -- my five +mkDet i_Pron (mkNum (mkNumeral n5_Unit)) + the_Det : Det -- the (house) +mkNP the_Det house_N + a_Det : Det -- a (house) +mkNP a_Det house_N + theSg_Det : Det -- the (houses) +mkNP theSg_Det house_N + thePl_Det : Det -- the (houses) +mkNP thePl_Det house_N + aSg_Det : Det -- a (house) +mkNP aSg_Det woman_N + aPl_Det : Det -- (houses) +mkNP aPl_Det woman_N + mkQuant : Pron -> Quant -- my +mkNP (mkQuant i_Pron) house_N + the_Quant : Quant -- the +mkNP the_Quant house_N + a_Quant : Quant -- a +mkNP a_Quant house_N -- mkNum : Str -> Num -- thirty-five (given by "35") mkNum : Numeral -> Num -- twenty mkNum (mkNumeral (tenfoldSub100 n2_Unit)) @@ -342,14 +360,20 @@ mkCard (mkNumeral n7_Unit) mkOrd : A -> Ord -- largest mkOrd small_A mkAdN : CAdv -> AdN -- more than -mkAdN more_CAdv --- mkNumeral : Sub1000 -> Numeral -- coerce 1..999 --- mkNumeral : Sub1000 -> Sub1000 -> Numeral -- 1000m + n +mkCard (mkAdN more_CAdv) (mkCard (mkNumeral n8_Unit)) + mkNumeral : Sub1000 -> Numeral -- coerce 1..999 +mkNumeral (mkSub1000 n9_Unit (mkSub100 n9_Unit n9_Unit)) + mkNumeral : Sub1000 -> Sub1000 -> Numeral -- 1000m + n +mkNumeral (mkSub1000 n9_Unit (mkSub100 n9_Unit n9_Unit)) (mkSub1000 n9_Unit (mkSub100 n9_Unit n9_Unit)) -- mkNumeral : Str -> Numeral -- thirty-five (given by "35") --- thousandfoldNumeral : Sub1000 -> Numeral -- 1000n --- mkSub1000 : Sub100 -> Sub1000 -- coerce 1..99 --- mkSub1000 : Sub10 -> Sub1000 -- 100n --- mkSub1000 : Sub10 -> Sub100 -> Sub1000 -- 100m + n + thousandfoldNumeral : Sub1000 -> Numeral -- 1000n +thousandfoldNumeral (mkSub1000 n9_Unit (mkSub100 n9_Unit n9_Unit)) + mkSub1000 : Sub100 -> Sub1000 -- coerce 1..99 +mkNumeral (mkSub1000 (mkSub100 n9_Unit n9_Unit)) + mkSub1000 : Unit -> Sub1000 -- 100n +mkNumeral (mkSub1000 n9_Unit) + mkSub1000 : Unit -> Sub100 -> Sub1000 -- 100m + n +mkNumeral (mkSub1000 n9_Unit (mkSub100 n9_Unit n9_Unit)) mkSub100 : Unit -> Sub100 -- eight (coerce 1..9) mkSub100 n8_Unit mkSub100 : Unit -> Unit -> Sub100 -- 10m + n @@ -441,7 +465,8 @@ mkCl (mkVP (mkAP (mkAP good_A) (mkS (mkCl she_NP sleep_V)))) mkCl (mkVP (mkAP (mkAP uncertain_A) (mkQS (mkQCl who_IP sleep_V)))) mkAP : AP -> VP -> AP -- ready to go mkCl she_NP (mkAP (mkAP ready_A) (mkVP sleep_V)) --- mkAP : AP -> SC -> AP -- ready to go + mkAP : AP -> SC -> AP -- ready to go +mkCl she_NP (mkAP (mkAP ready_A) (mkSC (mkVP sleep_V))) mkAP : AdA -> A -> AP -- very old mkAP very_AdA old_A mkAP : AdA -> AP -> AP -- very very old @@ -477,7 +502,7 @@ mkAdv and_Conj (mkListAdv (mkAdv with_Prep she_NP) (mkListAdv here_Adv now_Adv)) mkQS : (Tense) -> (Ant) -> (Pol) -> QCl -> QS -- who wouldn't have slept mkQS conditionalTense anteriorAnt negativePol (mkQCl who_IP sleep_V) mkQS : Cl -> QS -- -mkQS (mkQCl who_IP sleep_V) +mkQS (mkCl she_NP sleep_V) mkQCl : Cl -> QCl -- does she sleep mkQCl (mkCl she_NP sleep_V) mkQCl : IP -> VP -> QCl -- who sleeps @@ -563,9 +588,9 @@ mkIAdv in_Prep (mkIP which_IQuant city_N) mkIAdv : IAdv -> Adv -> IAdv -- where in Paris mkIAdv where_IAdv (mkAdv in_Prep (mkNP paris_PN)) mkIDet : IQuant -> Num -> IDet -- which (songs) -mkIDet which_IQuant pluralNum +mkIP (mkIDet which_IQuant pluralNum) house_N mkIDet : IQuant -> IDet -mkIDet which_IQuant +mkIP (mkIDet which_IQuant) house_N which_IDet : IDet mkIP which_IDet whichPl_IDet : IDet @@ -574,6 +599,8 @@ mkIP whichPl_IDet mkRS conditionalTense anteriorAnt negativePol (mkRCl which_RP sleep_V) mkRS : RCl -> RS -- mkRS (mkRCl which_RP sleep_V) + mkRS : Conj -> RS -> RS -> RS -- +mkRS or_Conj (mkRS (mkRCl which_RP sleep_V)) (mkRS (mkRCl which_RP she_NP love_V2)) mkRCl : RP -> VP -> RCl -- who sleeps mkRCl which_RP (mkVP (mkVP sleep_V) here_Adv) mkRCl : RP -> V -> RCl -- who sleeps @@ -624,8 +651,8 @@ mkRCl which_RP (mkVP always_AdV (mkVP sleep_V)) mkRCl which_RP she_NP love_V2 mkRCl : RP -> ClSlash -> RCl -- who she loves today --: mkRCl which_RP (mkClSlash (mkClSlash she_NP love_V2) today_Adv) - which_RP : RP -- which -which_RP +-- which_RP : RP -- which/who +--which_RP mkRP : Prep -> NP -> RP -> RP -- all the cities in which mkRP in_Prep (mkNP all_Predet (mkNP the_Quant pluralNum city_N)) which_RP mkSSlash : Temp -> Pol -> ClSlash -> SSlash @@ -649,53 +676,55 @@ mkQCl who_IP (mkClSlash she_NP (mkVPSlash send_V3 it_NP)) mkVPSlash : V2A -> AP -> VPSlash -- (whom) (she) paints red mkQCl who_IP (mkClSlash she_NP (mkVPSlash paint_V2A (mkAP red_A))) mkVPSlash : V2Q -> QS -> VPSlash -- (whom) (she) asks who sleeps -mkQCl who_IP (mkClSlash she_NP (mkVPSlash ask_V2Q (mkQS (mkQCl where_IAP (mkCl i_NP sleep_V))))) +mkQCl who_IP (mkClSlash she_NP (mkVPSlash ask_V2Q (mkQS (mkQCl where_Idv (mkCl i_NP sleep_V))))) mkVPSlash : V2S -> S -> VPSlash -- (whom) (she) tells that we sleep mkQCl who_IP (mkClSlash she_NP (mkVPSlash answer_V2S (mkS (mkCl i_NP sleep_V)))) mkVPSlash : V2V -> VP -> VPSlash -- (whom) (she) forces to sleep mkQCl who_IP (mkClSlash she_NP (mkVPSlash beg_V2V (mkVP sleep_V))) --- mkVPSlash : VV -> VPSlash -> VPSlash -- want always to buy --- mkVPSlash : V2V -> NP -> VPSlash -> VPSlash -- beg me always to buy + mkVPSlash : VV -> VPSlash -> VPSlash -- want always to buy +mkQCl who_IP (mkClSlash she_NP (mkVPSlash want_VV (mkVPSlash see_V2))) + mkVPSlash : V2V -> NP -> VPSlash -> VPSlash -- beg me always to buy +mkQCl who_IP (mkClSlash she_NP (mkVPSlash beg_V2V i_NP (mkVPSlash see_V2))) above_Prep : Prep -above_Prep +mkAdv above_Prep it_NP after_Prep : Prep -after_Prep +mkAdv after_Prep it_NP all_Predet : Predet -all_Predet +mkNP all_Predet (mkNP thePl_Det man_N) almost_AdA : AdA -almost_AdA - almost_AdN : AdN -almost_AdN +mkAP almost_AdA red_A + almost_AdN : AdN +mkCard almostAdN (mkCard (mkNumeral n8_Unit)) although_Subj : Subj -although_Subj +mkAdv although_Subj (mkS (mkCl she_NP sleep_V)) always_AdV : AdV always_AdV and_Conj : Conj -and_Conj +mkAdv and_Conj here_Adv now_Adv because_Subj : Subj -because_Subj +mkAdv because_Subj (mkS (mkCl she_NP sleep_V)) before_Prep : Prep -before_Prep +mkAdv before_Prep it_NP behind_Prep : Prep -behind_Prep +mkAdv behind_Prep it_NP between_Prep : Prep -between_Prep +mkAdv between_Prep (mkNP and_Conj you_NP i_NP) both7and_DConj : Conj -- both...and -both7and_DConj +mkAdv both7and_DConj here_Adv there_Adv but_PConj : PConj but_PConj by8agent_Prep : Prep -- by (agent) -by8agent_Prep +mkAdv by8agent_Prep it_NP by8means_Prep : Prep -- by (means of) -by8means_Prep +mkAdv by8means_Prep it_NP can8know_VV : VV -- can (capacity) -can8know_VV +mkUtt (mkVP can8know_VV (mkVP sleep_V)) can_VV : VV -- can (possibility) -can_VV +mkUtt (mkVP can_VV (mkVP sleep_V)) during_Prep : Prep -during_Prep +mkAdv during_Prep it_NP either7or_DConj : Conj -- either...or -either7or_DConj +mkAdv either7or_DConj here_Adv there_Adv every_Det : Det every_Det everybody_NP : NP -- everybody @@ -707,9 +736,9 @@ everywhere_Adv few_Det : Det few_Det for_Prep : Prep -for_Prep +mkAdv for_Prep it_NP from_Prep : Prep -from_Prep +mkAdv from_Prep it_NP he_Pron : Pron he_Pron here_Adv : Adv @@ -721,23 +750,23 @@ here7from_Adv how_IAdv : IAdv mkUtt how_IAdv how8many_IDet : IDet -how8many_IDet +mkUtt (mkIP how8many_IDet house_N) how8much_IAdv : IAdv mkUtt how8much_IAdv i_Pron : Pron i_Pron if_Subj : Subj -if_Subj +mkAdv if_Subj (mkS (mkCl she_NP sleep_V)) in8front_Prep : Prep -- in front of -in8front_Prep +mkAdv in8front_Prep it_NP in_Prep : Prep -in_Prep +mkAdv in_Prep it_NP it_Pron : Pron it_Pron less_CAdv : CAdv less_CAdv many_Det : Det -many_Det +mkNP many_Det house_N more_CAdv : CAdv more_CAdv most_Predet : Predet @@ -749,19 +778,19 @@ must_VV no_Utt : Utt no_Utt on_Prep : Prep -on_Prep +mkAdv on_Prep it_NP only_Predet : Predet only_Predet or_Conj : Conj -or_Conj +mkAdv or_Conj here_Adv there_Adv otherwise_PConj : PConj otherwise_PConj part_Prep : Prep -part_Prep +mkAdv part_Prep it_NP please_Voc : Voc please_Voc possess_Prep : Prep -- of (possessive) -possess_Prep +mkAdv possess_Prep it_NP quite_Adv : AdA quite_Adv she_Pron : Pron @@ -795,13 +824,13 @@ they_Pron this_Quant : Quant this_Quant through_Prep : Prep -through_Prep +mkAdv through_Prep it_NP to_Prep : Prep -to_Prep +mkAdv to_Prep it_NP too_AdA : AdA too_AdA under_Prep : Prep -under_Prep +mkAdv under_Prep it_NP very_AdA : AdA very_AdA want_VV : VV @@ -819,7 +848,7 @@ when_Subj where_IAdv : IAdv mkUtt where_IAdv which_IQuant : IQuant -which_IQuant +mkIP which_IQuant house_N whoPl_IP : IP -- who (plural) whoPl_IP whoSg_IP : IP -- who (singular) @@ -827,9 +856,9 @@ whoSg_IP why_IAdv : IAdv mkUtt why_IAdv with_Prep : Prep -with_Prep +mkAdv with_Prep it_NP without_Prep : Prep -without_Prep +mkAdv without_Prep it_NP yes_Utt : Utt yes_Utt youSg_Pron : Pron -- you (singular) @@ -843,18 +872,18 @@ no_Quant not_Predet : Predet not_Predet if_then_Conj : Conj -if_then_Conj +mkAdv if_then_Conj here_Adv there_Adv at_least_AdN : AdN -at_least_AdN +mkCard at_least_AdN (mkCard (mkNumeral n8_Unit)) at_most_AdN : AdN -at_most_AdN +mkCard at_most_AdN (mkCard (mkNumeral n8_Unit)) nobody_NP : NP nobody_NP nothing_NP : NP nothing_NP except_Prep : Prep -except_Prep +mkAdv except_Prep it_NP as_CAdv : CAdv as_CAdv have_V2 : V2 -have_V2 +mkUtt (mkVP have_V2 it_NP) diff --git a/lib/doc/synopsis.html b/lib/doc/synopsis.html index ef233888b..11aecb63d 100644 --- a/lib/doc/synopsis.html +++ b/lib/doc/synopsis.html @@ -71,10 +71,10 @@ Other relevant documents:

Categories

-Source 1: http://www.grammaticalframework.org/lib/resource/src/abstract/Common.gf +Source 1: ../src/abstract/Common.gf

-Source 2: http://www.grammaticalframework.org/lib/resource/src/abstract/Cat.gf +Source 2: ../src/abstract/Cat.gf

A hierarchic view

@@ -87,7 +87,7 @@ of C that takes D as an argument. What the constructors exactly ar and what other arguments they take, is described by separate tables for each category.

- +
@@ -152,7 +152,7 @@ also in the Paradigms modules.

Explanations

-
+
@@ -478,10 +478,10 @@ also in the Paradigms modules.

Syntax Rules and Structural Words

-Source 1: http://www.grammaticalframework.org/lib/resource/src/api/Constructors.gf +Source 1: ../src/api/Constructors.gf

-Source 2: http://www.grammaticalframework.org/lib/resource/src/abstract/Structural.gf +Source 2: ../src/abstract/Structural.gf

A - one-place adjective

@@ -497,7 +497,7 @@ Lexical category, constructors given in

AP - adjectival phrase

-
Category Explanation
+
@@ -546,7 +546,7 @@ Lexical category, constructors given in - + @@ -587,7 +587,7 @@ Lexical category, constructors given in

AdA - adjective-modifying adverb

-
Function Type
mkAP AP -> SC -> APready to go
she is ready to sleep
mkAP
+
@@ -596,33 +596,33 @@ Lexical category, constructors given in - + - + - + - + - +
Function Type
almost_AdA AdAalmost
almost red
quite_Adv AdAquite
quite
so_AdA AdAso
so
too_AdA AdAtoo
too
very_AdA AdAvery
very

AdN - numeral-modifying adverb

- +
@@ -631,28 +631,28 @@ Lexical category, constructors given in - + - + - + - +
Function Type
almost_AdN AdNalmost
atomic term almostAdN
at_least_AdN AdNat
at least eight
at_most_AdN AdNat
at most eight
mkAdN CAdv -> AdN
AdverbEng.AdnCAdv {s = "more"; p = "than"; lock_CAdv : {} = <>}
more than eight

AdV - adverb directly attached to verb

- +
@@ -661,13 +661,13 @@ Lexical category, constructors given in - +
Function Type
always_AdV AdValways
always

Adv - verb-phrase-modifying adverb

- +
@@ -676,22 +676,22 @@ Lexical category, constructors given in - + - + - + - + @@ -736,28 +736,28 @@ Lexical category, constructors given in - + - + - + - +
Function Type
everywhere_Adv Adveverywhere
everywhere
here7from_Adv Advfrom here
from here
here7to_Adv Advto here
to here
here_Adv Advhere
here
mkAdv
somewhere_Adv Advsomewhere
somewhere
there7from_Adv Advfrom there
from there
there7to_Adv Advto there
there
there_Adv Advthere
there

Ant - anteriority

- +
@@ -777,7 +777,7 @@ Lexical category, constructors given in

CAdv - comparative adverb

-
Function Type
+
@@ -786,23 +786,23 @@ Lexical category, constructors given in - + - + - +
Function Type
as_CAdv CAdvas
as
less_CAdv CAdvless
less
more_CAdv CAdvmore
more

CN - common noun (without determiner)

- +
@@ -907,7 +907,7 @@ Lexical category, constructors given in

Card - cardinal number

-
Function Type
+
@@ -916,7 +916,7 @@ Lexical category, constructors given in - + @@ -937,7 +937,7 @@ Lexical category, constructors given in

Cl - declarative clause, with all tenses

-
Function Type
mkCard Str -> Cardthirty-five (given as "35")thirty-five (given as "35"; range 1-999)
mkCard
+
@@ -1102,7 +1102,7 @@ Lexical category, constructors given in

ClSlash

-
Function Type
+
@@ -1142,7 +1142,7 @@ Lexical category, constructors given in

Comp - complement of copula, such as AP

-
Function Type
+
@@ -1167,7 +1167,7 @@ Lexical category, constructors given in

Conj - conjunction

-
Function Type
+
@@ -1176,33 +1176,33 @@ Lexical category, constructors given in - + - + - + - + - +
Function Type
and_Conj Conjand
here and now
both7and_DConj Conjboth...and
both here and there
either7or_DConj Conjeither...or
either here or there
if_then_Conj Conjif
if here then there
or_Conj Conjor
here or there

Det - determiner phrase

- +
@@ -1211,62 +1211,62 @@ Lexical category, constructors given in - + - + - + - + - + - + - + - + - + - + - + - + @@ -1286,43 +1286,43 @@ Lexical category, constructors given in - + - + - + - + - + - + - +
Function Type
aPl_Det Det(houses)
women
aSg_Det Deta (house)
a woman
a_Det Deta (house)
a house
every_Det Detevery
every
few_Det Detfew
few
many_Det Detmany
many houses
mkDet Quant -> Detthis
this
mkDet Quant -> Card -> Detthese five
these five
mkDet Quant -> Ord -> Detthe best
the fifth
mkDet Quant -> Num -> Ord -> Detthese five best
the five best
mkDet Quant -> Num -> Detthese five
these
mkDet Card -> Detforty
five
mkDet
mkDet Pron -> Num -> Detmy five
my five
much_Det Detmuch
much
somePl_Det DetsomePl
some
someSg_Det DetsomeSg
some
thePl_Det Detthe (houses)
the houses
theSg_Det Detthe (houses)
the house
the_Det Detthe (house)
the house

Dig

- +
@@ -1382,7 +1382,7 @@ Lexical category, constructors given in

Digits - cardinal or ordinal in digits

-
Function Type
+
@@ -1391,7 +1391,7 @@ Lexical category, constructors given in - + @@ -1407,7 +1407,7 @@ Lexical category, constructors given in

IAdv - interrogative adverb

-
Function Type
mkDigits Str -> Digits35 (from string "35")35 (from string "35"; ; range 1-9999999)
mkDigits
+
@@ -1416,12 +1416,12 @@ Lexical category, constructors given in - + - + @@ -1436,23 +1436,23 @@ Lexical category, constructors given in - + - + - +
Function Type
how8much_IAdv IAdvhow8much
how much
how_IAdv IAdvhow
how
mkIAdv
when_IAdv IAdvwhen
when
where_IAdv IAdvwhere
where
why_IAdv IAdvwhy
why

IComp - interrogative complement of copula

- +
@@ -1472,7 +1472,7 @@ Lexical category, constructors given in

IDet - interrogative determiner

-
Function Type
+
@@ -1481,33 +1481,33 @@ Lexical category, constructors given in - + - + - + - + - +
Function Type
how8many_IDet IDethow8many
how many houses
mkIDet IQuant -> Num -> IDet
which
which houses
mkIDet IQuant -> IDetmkIDet
which house
whichPl_IDet IDetwhichPl
which
which_IDet IDetwhich
which

IP - interrogative pronoun

- +
@@ -1551,12 +1551,12 @@ Lexical category, constructors given in - + - + @@ -1566,12 +1566,12 @@ Lexical category, constructors given in - + - + @@ -1582,7 +1582,7 @@ Lexical category, constructors given in

IQuant

-
Function Type
whatPl_IP IPwhat (plural)
what
whatSg_IP IPwhat (singular)
what
what_IP
whoPl_IP IPwho (plural)
who
whoSg_IP IPwho (singular)
who
who_IP
+
@@ -1591,13 +1591,13 @@ Lexical category, constructors given in - +
Function Type
which_IQuant IQuantwhich
which house

Imp - imperative

- +
@@ -1622,7 +1622,7 @@ Lexical category, constructors given in

ImpForm

-
Function Type
+
@@ -1653,7 +1653,7 @@ Lexical category, constructors given in

ListAP

-
Function Type
+
@@ -1662,18 +1662,18 @@ Lexical category, constructors given in - + - +
Function Type
mkListAP AP -> AP -> ListAPmkListAPlist of two
mkListAP AP -> ListAP -> ListAPmkListAPlist of more

ListAdv

- +
@@ -1682,18 +1682,18 @@ Lexical category, constructors given in - + - +
Function Type
mkListAdv Adv -> Adv -> ListAdvmkListAdvlist of two
mkListAdv Adv -> ListAdv -> ListAdvmkListAdvlist of more

ListNP

- +
@@ -1702,18 +1702,18 @@ Lexical category, constructors given in - + - +
Function Type
mkListNP NP -> NP -> ListNPmkListNPlist of two
mkListNP NP -> ListNP -> ListNPmkListNPlist of more

ListRS

- +
@@ -1722,18 +1722,18 @@ Lexical category, constructors given in - + - +
Function Type
mkListRS RS -> RS -> ListRSmkListRSlist of two
mkListRS RS -> ListRS -> ListRSmkListRSlist of more

ListS

- +
@@ -1742,12 +1742,12 @@ Lexical category, constructors given in - + - +
Function Type
mkListS S -> S -> ListSmkListSlist of two
mkListS S -> ListS -> ListSmkListSlist of more
@@ -1771,7 +1771,7 @@ Lexical category, constructors given in

NP - noun phrase (subject or object)

- +
@@ -1780,27 +1780,27 @@ Lexical category, constructors given in - + - + - + - + - + @@ -1930,68 +1930,68 @@ Lexical category, constructors given in - + - + - + - + - + - + - + - + - + - + - + - +
Function Type
everybody_NP NPeverybody
everybody
everything_NP NPeverything
everything
he_NP NPhe
he
i_NP NPI
I
it_NP NPit
it
mkNP
mkNP Conj -> NP -> NP -> NPmkNP
this woman or John
mkNP Conj -> ListNP -> NPmkNP
this woman , John or I
nobody_NP NPnobody
nobody
nothing_NP NPnothing
nothing
she_NP NPshe
she
somebody_NP NPsomebody
somebody
something_NP NPsomething
something
they_NP NPthey
they
we_NP NPwe
we
youPl_NP NPyou (plural)
she
youPol_NP NPyou (polite singular)
you
you_NP NPyou (singular)
you

Num - number determining element

- +
@@ -2000,7 +2000,7 @@ Lexical category, constructors given in - + @@ -2041,7 +2041,7 @@ Lexical category, constructors given in

Numeral - cardinal or ordinal in words

-
Function Type
mkNum Str -> Numthirty-five (given by "35")thirty-five (given by "35"; range 1-999)
mkNum
+
@@ -2060,28 +2060,28 @@ Lexical category, constructors given in - + - + - + - +
Function Type
mkNumeral Sub1000 -> Numeralsix hundred (coerce 1..999)
nine hundred and ninety - nine
mkNumeral Sub1000 -> Sub1000 -> Numeral1000m + n
nine hundred and ninety - nine thousand nine hundred and ninety - nine
mkNumeral Str -> Numeralthirty-five (given by "35")thirty-five (given by "35"; range 1-999)
thousandfoldNumeral Sub1000 -> Numeral1000n
nine hundred and ninety - nine thousand

Ord - ordinal number (used in Det)

- +
@@ -2111,7 +2111,7 @@ Lexical category, constructors given in

PConj - phrase-beginning conjunction

-
Function Type
+
@@ -2120,7 +2120,7 @@ Lexical category, constructors given in - + @@ -2130,12 +2130,12 @@ Lexical category, constructors given in - + - +
Function Type
but_PConj PConjbut
but
mkPConj
otherwise_PConj PConjotherwise
otherwise
therefore_PConj PConjtherefore
therefore
@@ -2147,7 +2147,7 @@ Lexical category, constructors given in

Phr - phrase in a text

- +
@@ -2182,7 +2182,7 @@ Lexical category, constructors given in

Pol - polarity

-
Function Type
+
@@ -2202,7 +2202,7 @@ Lexical category, constructors given in

Predet - predeterminer (prefixed Quant)

-
Function Type
+
@@ -2211,28 +2211,28 @@ Lexical category, constructors given in - + - + - + - +
Function Type
all_Predet Predetall
all the men
most_Predet Predetmost
most
not_Predet Predetnot
not
only_Predet Predetonly
only

Prep - preposition, or just case

- +
@@ -2241,113 +2241,113 @@ Lexical category, constructors given in - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
Function Type
above_Prep Prepabove
above it
after_Prep Prepafter
after it
before_Prep Prepbefore
before it
behind_Prep Prepbehind
behind it
between_Prep Prepbetween
between you and me
by8agent_Prep Prepby (agent)
by it
by8means_Prep Prepby (means of)
by it
during_Prep Prepduring
during it
except_Prep Prepexcept
except it
for_Prep Prepfor
for it
from_Prep Prepfrom
from it
in8front_Prep Prepin front of
in front of it
in_Prep Prepin
in it
on_Prep Prepon
on it
part_Prep Preppart
of it
possess_Prep Prepof (possessive)
of it
through_Prep Prepthrough
atomic term it_Prep
to_Prep Prepto
atomic term it_Prep
under_Prep Prepunder
under it
with_Prep Prepwith
with it
without_Prep Prepwithout
without it

Pron - personal pronoun

- +
@@ -2356,53 +2356,53 @@ Lexical category, constructors given in - + - + - + - + - + - + - + - + - +
Function Type
he_Pron Pronhe
he
i_Pron Proni
I
it_Pron Pronit
it
she_Pron Pronshe
she
they_Pron Pronthey
they
we_Pron Pronwe
we
youPl_Pron Pronyou (plural)
you
youPol_Pron Pronyou (polite)
you
youSg_Pron Pronyou (singular)
you

Punct

- +
@@ -2427,7 +2427,7 @@ Lexical category, constructors given in

QCl - question clause, with all tenses

-
Function Type
+
@@ -2587,7 +2587,7 @@ Lexical category, constructors given in

QS - question

-
Function Type
+
@@ -2601,13 +2601,13 @@ Lexical category, constructors given in - +
Function Type
mkQS Cl -> QSmkQS
does she sleep

Quant - quantifier ('nucleus' of Det)

- +
@@ -2616,38 +2616,38 @@ Lexical category, constructors given in - + - + - + - + - + - +
Function Type
a_Quant Quanta
a house
mkQuant Pron -> Quantmy
my house
no_Quant Quantno
no
that_Quant Quantthat
that
the_Quant Quantthe
the house
this_Quant Quantthis
this

RCl - relative clause, with all tenses

- +
@@ -2782,7 +2782,7 @@ Lexical category, constructors given in

RP - relative pronoun

-
Function Type
+
@@ -2796,13 +2796,13 @@ Lexical category, constructors given in - +
Function Type
which_RP RP
RelativeEng.IdRP
which/who

RS - relative

- +
@@ -2816,7 +2816,7 @@ Lexical category, constructors given in - + @@ -2827,7 +2827,7 @@ Lexical category, constructors given in

S - declarative sentence

-
Function Type
mkRS Conj -> RS -> RS -> RSwho sleeps and whose mother runsx
who sleep or whom she loves
mkRS
+
@@ -2857,7 +2857,7 @@ Lexical category, constructors given in

SC - embedded sentence or question

-
Function Type
+
@@ -2882,7 +2882,7 @@ Lexical category, constructors given in

SSlash

-
Function Type
+
@@ -2891,13 +2891,13 @@ Lexical category, constructors given in - +
Function Type
mkSSlash Temp -> Pol -> ClSlash -> SSlashmkSSlash
she hadn't seen

Sub100

- +
@@ -2922,7 +2922,7 @@ Lexical category, constructors given in

Sub1000

-
Function Type
+
@@ -2931,23 +2931,23 @@ Lexical category, constructors given in - + - + - +
Function Type
mkSub1000 Sub100 -> Sub1000coerce 1..99
ninety - nine
mkSub1000 Unit -> Sub1000100n
nine hundred
mkSub1000 Unit -> Sub100 -> Sub1000100m + n
nine hundred and ninety - nine

Subj - subjunction

- +
@@ -2956,33 +2956,33 @@ Lexical category, constructors given in - + - + - + - + - +
Function Type
although_Subj Subjalthough
although she sleeps
because_Subj Subjbecause
because she sleeps
if_Subj Subjif
if she sleeps
that_Subj Subjthat
that
when_Subj Subjwhen
when

Temp - temporal and aspectual features

- +
@@ -2991,13 +2991,13 @@ Lexical category, constructors given in - +
Function Type
mkTemp Tense -> Ant -> TempmkTempe.g. past + anterior

Tense - tense

- +
@@ -3027,7 +3027,7 @@ Lexical category, constructors given in

Text - text consisting of several phrases

-
Function Type
+
@@ -3077,7 +3077,7 @@ Lexical category, constructors given in

Unit

-
Function Type
+
@@ -3132,7 +3132,7 @@ Lexical category, constructors given in

Utt - sentence, question, word...

-
Function Type
+
@@ -3211,12 +3211,12 @@ Lexical category, constructors given in - + - +
Function Type
no_Utt Uttno
no
yes_Utt Uttyes
yes
@@ -3228,7 +3228,7 @@ Lexical category, constructors given in

V2 - two-place verb

- +
@@ -3237,7 +3237,7 @@ Lexical category, constructors given in - +
Function Type
have_V2 V2have
to have it
@@ -3279,7 +3279,7 @@ Lexical category, constructors given in

VP - verb phrase

- +
@@ -3358,7 +3358,7 @@ Lexical category, constructors given in - + @@ -3434,7 +3434,7 @@ Lexical category, constructors given in

VPSlash - verb phrase missing complement

-
Function Type
mkVP AP -> VP
parse error
to be very old
mkVP
+
@@ -3443,42 +3443,42 @@ Lexical category, constructors given in - + - + - + - + - + - + - + - +
Function Type
mkVPSlash V2 -> VPSlash(whom) (she) loves
whom does she see
mkVPSlash V3 -> NP -> VPSlash(whom) (she) gives an apple
to whom does she send it
mkVPSlash V2A -> AP -> VPSlash(whom) (she) paints red
whom does she paint red
mkVPSlash V2Q -> QS -> VPSlash(whom) (she) asks who sleeps
atomic term where_Idv
mkVPSlash V2S -> S -> VPSlash(whom) (she) tells that we sleep
to whom does she answer that I sleep
mkVPSlash V2V -> VP -> VPSlash(whom) (she) forces to sleep
whom does she beg to sleep
mkVPSlash VV -> VPSlash -> VPSlashwant always to buy
whom does she want to see
mkVPSlash V2V -> NP -> VPSlash -> VPSlashbeg me always to buy
whom does she beg me to see
@@ -3496,7 +3496,7 @@ Lexical category, constructors given in

VV - verb-phrase-complement verb

- +
@@ -3505,28 +3505,28 @@ Lexical category, constructors given in - + - + - + - +
Function Type
can8know_VV VVcan (capacity)
to be able to sleep
can_VV VVcan (possibility)
to be able to sleep
must_VV VVmust
have to
want_VV VVwant
want

Voc - vocative or "please"

- +
@@ -3540,7 +3540,7 @@ Lexical category, constructors given in - +
Function Type
please_Voc Vocplease
please
@@ -3552,9 +3552,9 @@ Lexical category, constructors given in

-source http://www.grammaticalframework.org/lib/resource/src/bulgarian/ParadigmsBul.gf +source ../src/bulgarian/ParadigmsBul.gf

- +
@@ -4413,9 +4413,9 @@ source http://www.grammaticalfr

-source http://www.grammaticalframework.org/lib/resource/src/catalan/ParadigmsCat.gf +source ../src/catalan/ParadigmsCat.gf

-
Function Type
+
@@ -4664,9 +4664,9 @@ source http://www.grammaticalfram

-source http://www.grammaticalframework.org/lib/resource/src/danish/ParadigmsDan.gf +source ../src/danish/ParadigmsDan.gf

-
Function Type
+
@@ -4890,9 +4890,9 @@ source http://www.grammaticalframe

-source http://www.grammaticalframework.org/lib/resource/src/dutch/ParadigmsDut.gf +source ../src/dutch/ParadigmsDut.gf

-
Function Type
+
@@ -5081,9 +5081,9 @@ source http://www.grammaticalframew

-source http://www.grammaticalframework.org/lib/resource/src/english/ParadigmsEng.gf +source ../src/english/ParadigmsEng.gf

-
Function Type
+
@@ -5342,9 +5342,9 @@ source http://www.grammaticalfram

-source http://www.grammaticalframework.org/lib/resource/src/finnish/ParadigmsFin.gf +source ../src/finnish/ParadigmsFin.gf

-
Function Type
+
@@ -5482,7 +5482,7 @@ source http://www.grammaticalfram - + @@ -5668,9 +5668,9 @@ source http://www.grammaticalfram

-source http://www.grammaticalframework.org/lib/resource/src/french/ParadigmsFre.gf +source ../src/french/ParadigmsFre.gf

-
Function Type
mkN(olo,n,na,a,oon,jen,ja,ina,issa,ihin : Str) -> N(olo,n,a,na,oon,jen,ja,ina,issa,ihin : Str) -> N worst case, 10 forms
+
@@ -5899,9 +5899,9 @@ source http://www.grammaticalframe

-source http://www.grammaticalframework.org/lib/resource/src/german/ParadigmsGer.gf +source ../src/german/ParadigmsGer.gf

-
Function Type
+
@@ -6210,9 +6210,9 @@ source http://www.grammaticalframe

-source http://www.grammaticalframework.org/lib/resource/src/italian/ParadigmsIta.gf +source ../src/italian/ParadigmsIta.gf

-
Function Type
+
@@ -6491,9 +6491,9 @@ source http://www.grammaticalfram

-source http://www.grammaticalframework.org/lib/resource/src/norwegian/ParadigmsNor.gf +source ../src/norwegian/ParadigmsNor.gf

-
Function Type
+
@@ -6742,9 +6742,9 @@ source http://www.grammaticalfr

-source http://www.grammaticalframework.org/lib/resource/src/polish/ParadigmsPol.gf +source ../src/polish/ParadigmsPol.gf

-
Function Type
+
@@ -7353,9 +7353,9 @@ source http://www.grammaticalframe

-source http://www.grammaticalframework.org/lib/resource/src/romanian/ParadigmsRon.gf +source ../src/romanian/ParadigmsRon.gf

-
Function Type
+
@@ -7604,9 +7604,9 @@ source http://www.grammaticalfra

-source http://www.grammaticalframework.org/lib/resource/src/russian/ParadigmsRus.gf +source ../src/russian/ParadigmsRus.gf

-
Function Type
+
@@ -7775,9 +7775,9 @@ source http://www.grammaticalfram

-source http://www.grammaticalframework.org/lib/resource/src/spanish/ParadigmsSpa.gf +source ../src/spanish/ParadigmsSpa.gf

-
Function Type
+
@@ -8036,9 +8036,9 @@ source http://www.grammaticalfram

-source http://www.grammaticalframework.org/lib/resource/src/swedish/ParadigmsSwe.gf +source ../src/swedish/ParadigmsSwe.gf

-
Function Type
+
@@ -8277,9 +8277,9 @@ source http://www.grammaticalfram

-source http://www.grammaticalframework.org/lib/resource/src/urdu/ParadigmsUrd.gf +source ../src/urdu/ParadigmsUrd.gf

-
Function Type
+
@@ -8683,6 +8683,6 @@ For each language, an instantiation of the functor:

- + diff --git a/lib/src/api/Constructors.gf b/lib/src/api/Constructors.gf index 6912ed93f..33710247d 100644 --- a/lib/src/api/Constructors.gf +++ b/lib/src/api/Constructors.gf @@ -280,7 +280,7 @@ incomplete resource Constructors = open Grammar in { --% -- Temp is a combination of Tense and Ant. In extra modules for some -- languages, it can also involve aspect and other things. - mkTemp : Tense -> Ant -> Temp + mkTemp : Tense -> Ant -> Temp -- e.g. past + anterior = TTAnt ; --% --3 ImpForm, imperative form @@ -1421,7 +1421,7 @@ incomplete resource Constructors = open Grammar in { --% -- There is an atomic relative pronoun - which_RP : RP -- which --: + which_RP : RP -- which/who --: = IdRP ; --% -- A relative pronoun can be made into a kind of a prepositional phrase. @@ -1506,18 +1506,18 @@ incomplete resource Constructors = open Grammar in { --% --3 ListS, sentence lists mkListS = overload { --% - mkListS : S -> S -> ListS --: + mkListS : S -> S -> ListS -- list of two --: = BaseS ; --% - mkListS : S -> ListS -> ListS --: + mkListS : S -> ListS -> ListS -- list of more --: = ConsS ; --% } ; --% --3 ListAdv, adverb lists mkListAdv = overload { --% - mkListAdv : Adv -> Adv -> ListAdv --: + mkListAdv : Adv -> Adv -> ListAdv -- list of two --: = BaseAdv ; --% - mkListAdv : Adv -> ListAdv -> ListAdv --: + mkListAdv : Adv -> ListAdv -> ListAdv -- list of more --: = ConsAdv ; --% } ; --% @@ -1526,9 +1526,9 @@ incomplete resource Constructors = open Grammar in { --% --3 ListAP, adjectival phrase lists mkListAP = overload { --% - mkListAP : AP -> AP -> ListAP --: + mkListAP : AP -> AP -> ListAP -- list of two --: = BaseAP ; --% - mkListAP : AP -> ListAP -> ListAP --: + mkListAP : AP -> ListAP -> ListAP -- list of more --: = ConsAP ; --% } ; --% @@ -1537,18 +1537,18 @@ incomplete resource Constructors = open Grammar in { --% --3 ListNP, noun phrase lists mkListNP = overload { --% - mkListNP : NP -> NP -> ListNP --: + mkListNP : NP -> NP -> ListNP -- list of two --: = BaseNP ; --% - mkListNP : NP -> ListNP -> ListNP --: + mkListNP : NP -> ListNP -> ListNP -- list of more --: = ConsNP ; --% } ; --% --3 ListRS, relative clause lists mkListRS = overload { --% - mkListRS : RS -> RS -> ListRS --: + mkListRS : RS -> RS -> ListRS -- list of two --: = BaseRS ; --% - mkListRS : RS -> ListRS -> ListRS --: + mkListRS : RS -> ListRS -> ListRS -- list of more --: = ConsRS ; --% } ; --%
Function Type