forked from GitHub/gf-core
changed names of resource-1.3; added a note on homepage on release
This commit is contained in:
12
lib/resource-1.3/Examples/Examples.gf
Normal file
12
lib/resource-1.3/Examples/Examples.gf
Normal file
@@ -0,0 +1,12 @@
|
||||
abstract Examples = {
|
||||
|
||||
flags startcat = Ex ;
|
||||
|
||||
cat
|
||||
Ex ;
|
||||
fun
|
||||
ex01, ex02, ex04, ex08, ex13, ex19, ex20, ex23,
|
||||
ex03, ex05, ex06, ex07, ex10, ex12, ex14, ex15, ex16, ex24, ex25, ex26, ex27,
|
||||
ex09,
|
||||
ex11, ex17, ex18, ex21, ex22 : Ex ;
|
||||
}
|
||||
6
lib/resource-1.3/Examples/ExamplesDan.gf
Normal file
6
lib/resource-1.3/Examples/ExamplesDan.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
concrete ExamplesDan of Examples = ExamplesI with
|
||||
(Syntax=SyntaxDan),
|
||||
(Lang=LangDan) ;
|
||||
|
||||
6
lib/resource-1.3/Examples/ExamplesEng.gf
Normal file
6
lib/resource-1.3/Examples/ExamplesEng.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
concrete ExamplesEng of Examples = ExamplesI with
|
||||
(Syntax=SyntaxEng),
|
||||
(Lang=LangEng) ;
|
||||
|
||||
6
lib/resource-1.3/Examples/ExamplesFin.gf
Normal file
6
lib/resource-1.3/Examples/ExamplesFin.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
concrete ExamplesFin of Examples = ExamplesI with
|
||||
(Syntax=SyntaxFin),
|
||||
(Lang=LangFin) ;
|
||||
|
||||
6
lib/resource-1.3/Examples/ExamplesFre.gf
Normal file
6
lib/resource-1.3/Examples/ExamplesFre.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
concrete ExamplesFre of Examples = ExamplesI with
|
||||
(Syntax=SyntaxFre),
|
||||
(Lang=LangFre) ;
|
||||
|
||||
6
lib/resource-1.3/Examples/ExamplesGer.gf
Normal file
6
lib/resource-1.3/Examples/ExamplesGer.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
concrete ExamplesGer of Examples = ExamplesI with
|
||||
(Syntax=SyntaxGer),
|
||||
(Lang=LangGer) ;
|
||||
|
||||
135
lib/resource-1.3/Examples/ExamplesI.gf
Normal file
135
lib/resource-1.3/Examples/ExamplesI.gf
Normal file
@@ -0,0 +1,135 @@
|
||||
incomplete concrete ExamplesI of Examples = open Syntax,Lang in {
|
||||
|
||||
lincat Ex = Text ;
|
||||
|
||||
lin
|
||||
ex01 = mkText (UttS (UseCl TPres ASimul PPos (PredVP (UsePron he_Pron)
|
||||
(AdvVP (UseV sing_V) (AdAdv almost_AdA (PositAdvAdj correct_A))))));
|
||||
|
||||
ex02 = mkText (UttAdv (SubjS when_Subj (ConjS and_Conj (BaseS (UseCl TPast ASimul PPos
|
||||
(PredVP everybody_NP (UseComp (CompAP (ConjAP and_Conj (BaseAP
|
||||
(PositA young_A) (PositA beautiful_A))))))) (UseCl TPast ASimul PPos
|
||||
(PredVP everything_NP (ComplVA become_VA (PositA probable_AS)))))))) ;
|
||||
|
||||
ex03 = mkText (UseCl TPres ASimul PPos (ExistNP (PredetNP only_Predet
|
||||
(DetCN (DetPl IndefArt (NumNumeral (num (pot2as3 (pot1as2 (pot0as1
|
||||
(pot0 n2)))))) NoOrd) (AdvCN (RelCN (UseN woman_N) (UseRCl TCond ASimul
|
||||
PPos (RelSlash IdRP (SlashPrep (PredVP (UsePron i_Pron) (ComplVV want_VV
|
||||
(PassV2 see_V2))) with_Prep)))) (PrepNP in_Prep (DetCN (DetSg DefArt NoOrd)
|
||||
(UseN rain_N)))))))) ;
|
||||
|
||||
ex04 = mkText (UttNP (DetCN someSg_Det (RelCN (UseN day_N) (UseRCl TFut ASimul PPos
|
||||
(RelCl (ExistNP (AdvNP (DetCN (DetSg MassDet NoOrd)
|
||||
(UseN peace_N)) (PrepNP on_Prep (DetCN (DetSg DefArt
|
||||
NoOrd) (UseN earth_N)))))))))) ;
|
||||
|
||||
ex05 = mkText (UseCl TPres ASimul PPos (PredVP (UsePron they_Pron) (AdvVP
|
||||
(ProgrVP (UseV play_V)) (ComparAdvAdjS less_CAdv clever_A
|
||||
(UseCl TPres ASimul PPos (GenericCl (UseV think_V))))))) ;
|
||||
|
||||
ex06 = mkText (UseCl TPres ASimul PPos (CleftAdv (AdvSC (EmbedVP (AdVVP always_AdV
|
||||
(UseV stop_V)))) (UseCl TPres ASimul PPos (PredVP (UsePron we_Pron)
|
||||
(ComplV2 beg_V2V (UsePron youPl_Pron)))))) ;
|
||||
|
||||
ex07 = mkText (UseCl TCond ASimul PNeg (PredVP (UsePron i_Pron) (ComplV3 give_V3
|
||||
(DetCN (DetPl ( IndefArt) (AdNum (AdnCAdv more_CAdv)
|
||||
(NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n3))))))) NoOrd)
|
||||
(UseN star_N)) (DetCN (DetSg ( this_Quant) NoOrd)
|
||||
(UseN restaurant_N))))) ;
|
||||
|
||||
ex08 = mkText (UttImpSg PPos (ImpVP (ComplV2A paint_V2A (DetCN (DetSg ( DefArt)
|
||||
NoOrd) (UseN earth_N)) (DConjAP both7and_DConj (BaseAP (ComparA
|
||||
small_A (DetCN (DetSg ( DefArt) NoOrd) (UseN sun_N)))
|
||||
(ComparA big_A (DetCN (DetSg ( DefArt) NoOrd) (UseN moon_N
|
||||
))))))) ) ;
|
||||
|
||||
ex09 = mkText (UseCl TPres ASimul PPos (PredVP everybody_NP (ComplVQ wonder_VQ
|
||||
(UseQCl TPres ASimul PPos (QuestSlash whatSg_IP (SlashV2 (UsePron
|
||||
youSg_Pron)love_V2)))))) ;
|
||||
|
||||
ex10 = mkText (UseCl TPres ASimul PPos (PredSCVP (EmbedS (UseCl TPres ASimul PNeg
|
||||
(PredVP (UsePron she_Pron) (UseComp (CompAP (ReflA2 married_A2))))))
|
||||
(ComplV2 kill_V2 (UsePron i_Pron)))) ;
|
||||
|
||||
ex11 = (TQuestMark (PhrUtt (PConjConj and_Conj) (UttQS (UseQCl TPres ASimul
|
||||
PNeg (QuestIAdv why_IAdv (PredVP (DetCN (DetSg MassDet NoOrd)
|
||||
(UseN art_N)) (UseComp (CompAP (ComparA (UseA2 easy_A2V)
|
||||
(DetCN (DetSg MassDet NoOrd) (UseN science_N))))))))) NoVoc) TEmpty) ;
|
||||
|
||||
ex12 = mkText (UseCl TPres ASimul PPos (CleftNP (DetCN (DetSg ( IndefArt)
|
||||
NoOrd) (UseN dog_N)) (UseRCl TPres ASimul PPos (RelSlash (FunRP
|
||||
with_Prep (DetCN (DetSg ( IndefArt) NoOrd) (UseN friend_N))
|
||||
IdRP) (SlashVVV2 (DetCN (DetSg ( (PossPron i_Pron)) NoOrd)
|
||||
(UseN2 brother_N2)) can_VV play_V2))))) ;
|
||||
|
||||
ex13 = mkText (ImpPl1 (ComplVS hope_VS (DConjS either7or_DConj (BaseS (UseCl
|
||||
TPres ASimul PPos (PredVP (DetCN (DetSg ( DefArt) NoOrd)
|
||||
(ComplN2 father_N2 (DetCN (DetSg ( DefArt) NoOrd)
|
||||
(UseN baby_N)))) (UseV run_V))) (UseCl TPres ASimul PPos (PredVP
|
||||
(DetCN (DetSg ( DefArt) NoOrd)(UseN3 distance_N3))
|
||||
(UseComp (CompAP (PositA small_A))))))))) ;
|
||||
|
||||
ex14 = mkText (UseCl TPres ASimul PNeg (PredVP (UsePron i_Pron) (AdvVP (ReflV2
|
||||
(UseVS fear_VS)) now_Adv))) ;
|
||||
|
||||
ex15 = mkText (UseCl TPres ASimul PPos (PredVP (UsePron i_Pron) (ComplV2 (UseVQ
|
||||
wonder_VQ) (ConjNP or_Conj (BaseNP somebody_NP something_NP))))) ;
|
||||
|
||||
ex16 = mkText (UseCl TPres ASimul PPos (PredVP (DetCN every_Det (UseN baby_N))
|
||||
(UseComp (CompNP (DConjNP either7or_DConj (BaseNP (DetCN (DetSg
|
||||
( IndefArt) NoOrd) (UseN boy_N)) (DetCN (DetSg (
|
||||
IndefArt) NoOrd) (UseN girl_N)))))))) ;
|
||||
|
||||
ex17 = (TQuestMark (PhrUtt NoPConj (UttQS (UseQCl TPres ASimul PPos (QuestVP
|
||||
(IDetCN whichSg_IDet NoNum NoOrd (ApposCN (ComplN2 (ComplN3 distance_N3
|
||||
(DetCN (DetSg ( DefArt) NoOrd) (UseN house_N))) (DetCN (DetSg
|
||||
( DefArt) NoOrd) (UseN bank_N))) (DetCN (DetSg (
|
||||
DefArt) (OrdSuperl short_A)) (UseN road_N)))) (PassV2 find_V2))))
|
||||
NoVoc) TEmpty) ;
|
||||
|
||||
ex18 = (TQuestMark (PhrUtt NoPConj ( UttQS (UseQCl TPres ASimul PPos
|
||||
(QuestIComp (CompIAdv where_IAdv) (DetCN (DetSg ( DefArt)
|
||||
NoOrd) (RelCN (UseN teacher_N) (UseRCl TPres ASimul PPos
|
||||
(RelVP IdRP (ComplV3 sell_V3 (PPartNP (DetCN (DetPl ( DefArt)
|
||||
NoNum NoOrd) (UseN book_N)) read_V2) (DetCN (DetPl ( IndefArt)
|
||||
NoNum NoOrd) (UseN student_N)))))))))) NoVoc) TEmpty) ;
|
||||
|
||||
ex19 = mkText (UttIAdv (PrepIP with_Prep (AdvIP whoSg_IP (ConjAdv and_Conj (BaseAdv
|
||||
(PositAdvAdj cold_A) (PositAdvAdj warm_A)))))) ;
|
||||
|
||||
ex20 = mkText (UttAdv (DConjAdv either7or_DConj (ConsAdv here7from_Adv (BaseAdv
|
||||
there_Adv everywhere_Adv)))) ;
|
||||
|
||||
ex21 = (TExclMark (PhrUtt NoPConj (UttImpPl PNeg (ImpVP (UseV die_V)))
|
||||
please_Voc) TEmpty) ;
|
||||
|
||||
ex22 = (TQuestMark (PhrUtt NoPConj (UttIP (IDetCN how8many_IDet NoNum NoOrd
|
||||
(UseN year_N))) (VocNP (DetCN (DetSg ( (PossPron i_Pron))
|
||||
NoOrd) (UseN friend_N)))) TEmpty) ;
|
||||
|
||||
ex23 = mkText (UttVP (PassV2 know_V2)) ;
|
||||
|
||||
ex24 = mkText (UseCl TPres ASimul PPos (PredVP (DetCN (DetSg IndefArt NoOrd) (SentCN
|
||||
(UseN song_N) (EmbedVP (UseV sing_V)))) (UseComp (CompAP
|
||||
(PositA (UseA2 easy_A2V)))))) ;
|
||||
|
||||
ex25 = mkText (UseCl TPast ASimul PNeg (PredVP (UsePron she_Pron) (ComplV2 know_V2
|
||||
(DetCN (DetSg MassDet NoOrd) (AdvCN (UseN industry_N) (PrepNP
|
||||
before_Prep (DetCN (DetSg ( DefArt) NoOrd) (UseN university_N)))))))) ;
|
||||
|
||||
ex26 = mkText (UseCl TPres ASimul PPos (PredVP (UsePron she_Pron) (UseComp (CompAP
|
||||
(AdAP almost_AdA (SentAP (ComplA2 married_A2 (DetCN (DetSg (
|
||||
(PossPron she_Pron)) NoOrd) (UseN cousin_N))) (SubjS if_Subj (UseCl
|
||||
TPast ASimul PPos ((PredVP (UsePron youPol_Pron)
|
||||
(ComplV2 watch_V2 (DetCN (DetSg ( DefArt) NoOrd)
|
||||
(UseN television_N))))))))))))) ;
|
||||
|
||||
ex27 = mkText (UseCl TPres ASimul PPos (ImpersCl (ComplVV can8know_VV (UseComp
|
||||
(CompAP (PositA important_A)))))) ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
6
lib/resource-1.3/Examples/ExamplesIta.gf
Normal file
6
lib/resource-1.3/Examples/ExamplesIta.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
concrete ExamplesIta of Examples = ExamplesI with
|
||||
(Syntax=SyntaxIta),
|
||||
(Lang=LangIta) ;
|
||||
|
||||
6
lib/resource-1.3/Examples/ExamplesNor.gf
Normal file
6
lib/resource-1.3/Examples/ExamplesNor.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
concrete ExamplesNor of Examples = ExamplesI with
|
||||
(Syntax=SyntaxNor),
|
||||
(Lang=LangNor) ;
|
||||
|
||||
6
lib/resource-1.3/Examples/ExamplesRus.gf
Normal file
6
lib/resource-1.3/Examples/ExamplesRus.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
concrete ExamplesRus of Examples = ExamplesI with
|
||||
(Syntax=SyntaxRus),
|
||||
(Lang=LangRus) ** {flags coding=utf8; }
|
||||
|
||||
6
lib/resource-1.3/Examples/ExamplesSpa.gf
Normal file
6
lib/resource-1.3/Examples/ExamplesSpa.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
concrete ExamplesSpa of Examples = ExamplesI with
|
||||
(Syntax=SyntaxSpa),
|
||||
(Lang=LangSpa) ;
|
||||
|
||||
6
lib/resource-1.3/Examples/ExamplesSwe.gf
Normal file
6
lib/resource-1.3/Examples/ExamplesSwe.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
concrete ExamplesSwe of Examples = ExamplesI with
|
||||
(Syntax=SyntaxSwe),
|
||||
(Lang=LangSwe) ;
|
||||
|
||||
139
lib/resource-1.3/Examples/ResExamples.gf
Normal file
139
lib/resource-1.3/Examples/ResExamples.gf
Normal file
@@ -0,0 +1,139 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
abstract ResExamples = Lang ** {
|
||||
fun
|
||||
ex1, ex2, ex4, ex8, ex13, ex19, ex20, ex23: Utt;
|
||||
ex3, ex5, ex6, ex7, ex10, ex12, ex14, ex15, ex16, ex24, ex25, ex26, ex27: S;
|
||||
ex9: Phr;
|
||||
ex11, ex17, ex18, ex21, ex22 : Text;
|
||||
|
||||
def
|
||||
ex1 = UttS (UseCl TPres ASimul PPos (PredVP (UsePron he_Pron)
|
||||
(AdvVP (UseV sing_V) (AdAdv almost_AdA (PositAdvAdj correct_A)))));
|
||||
|
||||
ex2 = UttAdv (SubjS when_Subj (ConjS and_Conj (BaseS (UseCl TPast ASimul PPos
|
||||
(PredVP everybody_NP (UseComp (CompAP (ConjAP and_Conj (BaseAP
|
||||
(PositA young_A) (PositA beautiful_A))))))) (UseCl TPast ASimul PPos
|
||||
(PredVP everything_NP (ComplVA become_VA (PositA probable_AS)))))));
|
||||
|
||||
ex3 = UseCl TPres ASimul PPos (CleftNP (PredetNP only_Predet
|
||||
(DetCN (DetPl ( IndefArt) (NumInt 2) NoOrd) (UseN woman_N)))
|
||||
(UseRCl TCond ASimul PPos (RelSlash IdRP
|
||||
(AdvSlash (SlashPrep (PredVP (UsePron i_Pron) (ComplVV want_VV
|
||||
(PassV2 see_V2))) with_Prep) (PrepNP in_Prep (DetCN (DetSg
|
||||
(DefArt) NoOrd) (UseN rain_N)))))));
|
||||
|
||||
|
||||
ex4 = UttNP (DetCN someSg_Det (RelCN (UseN day_N) (UseRCl TFut ASimul PPos
|
||||
(RelCl (ExistNP (AdvNP (DetCN (DetSg ( IndefArt) NoOrd)
|
||||
(UseN peace_N)) (PrepNP on_Prep (DetCN (DetSg ( IndefArt)
|
||||
NoOrd) (UseN earth_N)))))))));
|
||||
|
||||
ex5 = UseCl TPres ASimul PPos (PredVP (UsePron they_Pron) (AdvVP
|
||||
(ProgrVP (UseV play_V)) (ComparAdvAdjS less_CAdv clever_A
|
||||
(UseCl TPres ASimul PPos (GenericCl (UseV think_V))))));
|
||||
|
||||
ex6 = UseCl TPres ASimul PPos (CleftAdv (AdvSC (EmbedVP (AdVVP always_AdV
|
||||
(UseV stop_V)))) (UseCl TPres ASimul PPos (PredVP (UsePron we_Pron)
|
||||
(ComplV2 beg_V2V (UsePron youPl_Pron)))));
|
||||
|
||||
ex7 = UseCl TCond ASimul PNeg (PredVP (UsePron i_Pron) (ComplV3 give_V3
|
||||
(DetCN (DetPl ( IndefArt) (AdNum (AdnCAdv more_CAdv)
|
||||
(NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n3))))))) NoOrd)
|
||||
(UseN star_N)) (DetCN (DetSg ( this_Quant) NoOrd)
|
||||
(UseN restaurant_N))));
|
||||
|
||||
ex8 = UttImpSg PPos (ImpVP (ComplV2A paint_V2A (DetCN (DetSg ( DefArt)
|
||||
NoOrd) (UseN earth_N)) (DConjAP both7and_DConj (BaseAP (ComparA
|
||||
small_A (DetCN (DetSg ( DefArt) NoOrd) (UseN sun_N)))
|
||||
(ComparA big_A (DetCN (DetSg ( DefArt) NoOrd) (UseN moon_N
|
||||
))))))) ;
|
||||
|
||||
ex9 = UseCl TPres ASimul PPos (PredVP everybody_NP (ComplVQ wonder_VQ
|
||||
(UseQCl TPres ASimul PPos (QuestSlash whatSg_IP (SlashV2 (UsePron
|
||||
youSg_Pron)love_V2)))));
|
||||
|
||||
ex10 = UseCl TPres ASimul PPos (PredSCVP (EmbedS (UseCl TPres ASimul PNeg
|
||||
(PredVP (UsePron i_Pron) (UseComp (CompAP (ReflA2 married_A2))))))
|
||||
(ComplV2 kill_V2 (UsePron i_Pron)));
|
||||
|
||||
ex11 = TQuestMark (PhrUtt (PConjConj and_Conj) (UttQS (UseQCl TPres ASimul
|
||||
PNeg (QuestIAdv why_IAdv (PredVP (DetCN (DetSg MassDet NoOrd)
|
||||
(UseN art_N)) (UseComp (CompAP (ComparA (UseA2 easy_A2V)
|
||||
(DetCN (DetSg MassDet NoOrd) (UseN science_N))))))))) NoVoc) TEmpty;
|
||||
|
||||
ex12 = UseCl TPres ASimul PPos (CleftNP (DetCN (DetSg ( IndefArt)
|
||||
NoOrd) (UseN dog_N)) (UseRCl TPres ASimul PPos (RelSlash (FunRP
|
||||
with_Prep (DetCN (DetSg ( IndefArt) NoOrd) (UseN friend_N))
|
||||
IdRP) (SlashVVV2 (DetCN (DetSg ( (PossPron i_Pron)) NoOrd)
|
||||
(UseN2 brother_N2)) can_VV play_V2))));
|
||||
|
||||
ex13 = ImpPl1 (ComplVS hope_VS (DConjS either7or_DConj (BaseS (UseCl
|
||||
TPres ASimul PPos (PredVP (DetCN (DetSg ( DefArt) NoOrd)
|
||||
(ComplN2 father_N2 (DetCN (DetSg ( DefArt) NoOrd)
|
||||
(UseN baby_N)))) (UseV run_V))) (UseCl TPres ASimul PPos (PredVP
|
||||
(DetCN (DetSg ( DefArt) NoOrd)(UseN3 distance_N3))
|
||||
(UseComp (CompAP (PositA small_A))))))));
|
||||
|
||||
ex14 = UseCl TPres ASimul PNeg (PredVP (UsePron i_Pron) (AdvVP (ReflV2
|
||||
(UseVS fear_VS)) now_Adv));
|
||||
|
||||
ex15 = UseCl TPres ASimul PPos (PredVP (UsePron i_Pron) (ComplV2 (UseVQ
|
||||
wonder_VQ) (ConjNP or_Conj (BaseNP somebody_NP something_NP))));
|
||||
|
||||
ex16 = UseCl TPres ASimul PPos (PredVP (DetCN every_Det (UseN baby_N))
|
||||
(UseComp (CompNP (DConjNP either7or_DConj (BaseNP (DetCN (DetSg
|
||||
( IndefArt) NoOrd) (UseN boy_N)) (DetCN (DetSg (
|
||||
IndefArt) NoOrd) (UseN girl_N)))))));
|
||||
|
||||
ex17 = TQuestMark (PhrUtt NoPConj (UttQS (UseQCl TPres ASimul PPos (QuestVP
|
||||
(IDetCN whichSg_IDet NoNum NoOrd (ApposCN (ComplN2 (ComplN3 distance_N3
|
||||
(DetCN (DetSg ( DefArt) NoOrd) (UseN house_N))) (DetCN (DetSg
|
||||
( DefArt) NoOrd) (UseN bank_N))) (DetCN (DetSg (
|
||||
DefArt) (OrdSuperl short_A)) (UseN road_N)))) (PassV2 find_V2))))
|
||||
NoVoc) TEmpty;
|
||||
|
||||
ex18 = TQuestMark (PhrUtt NoPConj ( UttQS (UseQCl TPres ASimul PPos
|
||||
(QuestIComp (CompIAdv where_IAdv) (DetCN (DetSg ( DefArt)
|
||||
NoOrd) (RelCN (UseN teacher_N) (UseRCl TPres ASimul PPos
|
||||
(RelVP IdRP (ComplV3 sell_V3 (PPartNP (DetCN (DetPl ( DefArt)
|
||||
NoNum NoOrd) (UseN book_N)) read_V2) (DetCN (DetPl ( IndefArt)
|
||||
NoNum NoOrd) (UseN student_N)))))))))) NoVoc) TEmpty;
|
||||
|
||||
ex19 = UttIAdv (PrepIP with_Prep (AdvIP whoSg_IP (ConjAdv and_Conj (BaseAdv
|
||||
(PositAdvAdj cold_A) (PositAdvAdj warm_A)))));
|
||||
|
||||
ex20 = UttAdv (DConjAdv either7or_DConj (ConsAdv here7from_Adv (BaseAdv
|
||||
there_Adv everywhere_Adv)));
|
||||
|
||||
ex21 = TExclMark (PhrUtt NoPConj (UttImpPl PNeg (ImpVP (UseV die_V)))
|
||||
please_Voc) TEmpty;
|
||||
|
||||
ex22 = TQuestMark (PhrUtt NoPConj (UttIP (IDetCN how8many_IDet NoNum NoOrd
|
||||
(UseN year_N))) (VocNP (DetCN (DetSg ( (PossPron i_Pron))
|
||||
NoOrd) (UseN friend_N)))) TEmpty;
|
||||
|
||||
ex23 = UttVP (PassV2 know_V2);
|
||||
|
||||
ex24 = UseCl TPres ASimul PPos (PredVP (DetCN (DetSg MassDet NoOrd) (SentCN
|
||||
(UseN song_N) (EmbedVP (UseV sing_V)))) (UseComp (CompAP
|
||||
(PositA (UseA2 easy_A2V)))));
|
||||
|
||||
ex25 = UseCl TPast ASimul PNeg (PredVP (UsePron she_Pron) (ComplV2 know_V2
|
||||
(DetCN (DetSg MassDet NoOrd) (AdvCN (UseN industry_N) (PrepNP
|
||||
before_Prep (DetCN (DetSg ( DefArt) NoOrd) (UseN university_N)))))));
|
||||
|
||||
ex26 = UseCl TPres ASimul PPos (PredVP (UsePron she_Pron) (UseComp (CompAP
|
||||
(AdAP almost_AdA (SentAP (ComplA2 married_A2 (DetCN (DetSg (
|
||||
(PossPron she_Pron)) NoOrd) (UseN cousin_N))) (EmbedQS (UseQCl
|
||||
TPast ASimul PPos (QuestCl (PredVP (UsePron youPol_Pron)
|
||||
(ComplV2 watch_V2 (DetCN (DetSg ( DefArt) NoOrd)
|
||||
(UseN television_N))))))))))));
|
||||
|
||||
ex27 = UseCl TPres ASimul PPos (ImpersCl (ComplVV can8know_VV (UseComp
|
||||
(CompAdv (PositAdvAdj important_A)))));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
33
lib/resource-1.3/Examples/ResExamplesEng.gf
Normal file
33
lib/resource-1.3/Examples/ResExamplesEng.gf
Normal file
@@ -0,0 +1,33 @@
|
||||
--# -path=.:../abstract:../english:../common:../../prelude
|
||||
|
||||
concrete ResExamplesEng of ResExamples = LangEng ** {
|
||||
|
||||
lin
|
||||
ex1 = {s = ["Example 1."]};
|
||||
ex2 = {s = ["Example 2."]};
|
||||
ex3 = {s = ["Example 3."]};
|
||||
ex4 = {s = ["Example 4."]};
|
||||
ex5 = {s = ["Example 5."]};
|
||||
ex6 = {s = ["Example 6."]};
|
||||
ex7 = {s = ["Example 7."]};
|
||||
ex8 = {s = ["Example 8."]};
|
||||
ex9 = {s = ["Example 9."]};
|
||||
ex10 = {s = ["Example 10."]};
|
||||
ex11 = {s = ["Example 11."]};
|
||||
ex12 = {s = ["Example 12."]};
|
||||
ex13 = {s = ["Example 13."]};
|
||||
ex14 = {s = ["Example 14."]};
|
||||
ex15 = {s = ["Example 15."]};
|
||||
ex16 = {s = ["Example 16."]};
|
||||
ex17 = {s = ["Example 17."]};
|
||||
ex18 = {s = ["Example 18."]};
|
||||
ex19 = {s = ["Example 19."]};
|
||||
ex20 = {s = ["Example 20."]};
|
||||
ex21 = {s = ["Example 21."]};
|
||||
ex22 = {s = ["Example 22."]};
|
||||
ex23 = {s = ["Example 23."]};
|
||||
ex24 = {s = ["Example 24."]};
|
||||
ex25 = {s = ["Example 25."]};
|
||||
ex26 = {s = ["Example 26."]};
|
||||
ex27 = {s = ["Example 27."]};
|
||||
}
|
||||
34
lib/resource-1.3/Examples/ResExamplesRus.gf
Normal file
34
lib/resource-1.3/Examples/ResExamplesRus.gf
Normal file
@@ -0,0 +1,34 @@
|
||||
--# -path=.:../abstract:../russian:../common:../../prelude
|
||||
|
||||
concrete ResExamplesRus of ResExamples = LangRus ** {
|
||||
|
||||
lin
|
||||
ex1 = {s = ["Example 1."]};
|
||||
ex2 = {s = ["Example 2."]};
|
||||
ex3 = {s = ["Example 3."]};
|
||||
ex4 = {s = ["Example 4."]};
|
||||
ex5 = {s = ["Example 5."]};
|
||||
ex6 = {s = ["Example 6."]};
|
||||
ex7 = {s = ["Example 7."]};
|
||||
ex8 = {s = ["Example 8."]};
|
||||
ex9 = {s = ["Example 9."]};
|
||||
ex10 = {s = ["Example 10."]};
|
||||
ex11 = {s = ["Example 11."]};
|
||||
ex12 = {s = ["Example 12."]};
|
||||
ex13 = {s = ["Example 13."]};
|
||||
ex14 = {s = ["Example 14."]};
|
||||
ex15 = {s = ["Example 15."]};
|
||||
ex16 = {s = ["Example 16."]};
|
||||
ex17 = {s = ["Example 17."]};
|
||||
ex18 = {s = ["Example 18."]};
|
||||
ex19 = {s = ["Example 19."]};
|
||||
ex20 = {s = ["Example 20."]};
|
||||
ex21 = {s = ["Example 21."]};
|
||||
ex22 = {s = ["Example 22."]};
|
||||
ex23 = {s = ["Example 23."]};
|
||||
ex24 = {s = ["Example 24."]};
|
||||
ex25 = {s = ["Example 25."]};
|
||||
ex26 = {s = ["Example 26."]};
|
||||
ex27 = {s = ["Example 27."]};
|
||||
|
||||
}
|
||||
27
lib/resource-1.3/Examples/examples-Dan.txt
Normal file
27
lib/resource-1.3/Examples/examples-Dan.txt
Normal file
@@ -0,0 +1,27 @@
|
||||
han synger næsten rigtigt .
|
||||
når alle var unge og smukke og alt blev sandsynligt .
|
||||
det findes kun to kvinder med hvilke jeg ville ville blive set i regnet .
|
||||
nogen dag sådan at det vil findes fred på jorden .
|
||||
de er ved å spille mindre flinkt end man tænker .
|
||||
det er at altid standse som vi beder jer .
|
||||
jeg ville ikke give mer end tre stjerner til denne restaurant .
|
||||
mal jorden både mindre end solen og større end månen .
|
||||
alle undres hvad du elsker .
|
||||
at hun ikke er gift med sig dræber mig .
|
||||
og hvorfor er kunst ikke nemere end videnskab ?
|
||||
det er en hund en ven med hvilken min broder kan spille .
|
||||
lad os håbe at enten fadren til babyen løber eller afstanden er lille .
|
||||
jeg frygter ikke mig nu .
|
||||
jeg undres nogen eller noget .
|
||||
hver baby er enten en dreng eller en pige .
|
||||
hvilken afstand fra huset til banken den korteste vejen bliver fundet ?
|
||||
hver er læreren som sælger bøgene læste til studenter ?
|
||||
med hvem koldt og varmt .
|
||||
enten herfra , der eller overalt .
|
||||
dø ikke tak !
|
||||
hur mange år , min ven ?
|
||||
at blive vidst .
|
||||
en sang at synge er nem .
|
||||
hun vidste ikke industri før universitetet .
|
||||
hun er næsten gift med hendes fætter hvis Dere så på fjernsynet .
|
||||
det kan være vigtigt .
|
||||
27
lib/resource-1.3/Examples/examples-Eng.txt
Normal file
27
lib/resource-1.3/Examples/examples-Eng.txt
Normal file
@@ -0,0 +1,27 @@
|
||||
he sings almost correctly .
|
||||
when everybody was young and beautiful and everything became probable .
|
||||
there are only two women with which I would want to be seen in the rain .
|
||||
some day such that there will be peace on the earth .
|
||||
they are playing less cleverly than one thinks .
|
||||
it is always to stop we beg you .
|
||||
I wouldn't give more than three stars to this restaurant .
|
||||
paint the earth both smaller than the sun and bigger than the moon .
|
||||
everybody wonders what you love .
|
||||
that she isn't married to itself kills me .
|
||||
and why isn't art easier than science ?
|
||||
it is a dog a friend with which my brother can play .
|
||||
let's hope that either the father of the baby runs or the distance is small .
|
||||
I don't fear myself now .
|
||||
I wonder somebody or something .
|
||||
every baby is either a boy or a girl .
|
||||
which distance from the house to the bank the shortest road is found ?
|
||||
where is the teacher that sells the books read to students ?
|
||||
with who coldly and warmly .
|
||||
either from here , there or everywhere .
|
||||
don't die please !
|
||||
how many years , my friend ?
|
||||
to be known .
|
||||
a song to sing is easy .
|
||||
she didn't know industry before the university .
|
||||
she is almost married to her cousin if you watched the television .
|
||||
it can be important .
|
||||
27
lib/resource-1.3/Examples/examples-Fin.txt
Normal file
27
lib/resource-1.3/Examples/examples-Fin.txt
Normal file
@@ -0,0 +1,27 @@
|
||||
hän laulaa melkein oikeasti .
|
||||
kun jokainen oli nuori ja kaunis ja kaikki tuli todennäköiseksi .
|
||||
on olemassa vain kaksi naista jonka kanssa minut tahtoisi nähdään sateessa .
|
||||
joku päivä siten että on olemassa rauha maalla .
|
||||
he ovat pelaamassa vähemmän viisaasti kuin ajatellaan .
|
||||
se on pysähtyä aina kun me pyydämme teitä .
|
||||
minä en antaisi enemmän kuin kolmea tähteä tälle ravintolalle .
|
||||
maalaa maa sekä pienemmäksi kuin aurinko että suuremmaksi kuin kuu .
|
||||
jokainen ihmettelee miä sinä rakastat .
|
||||
että hän ei ole avioitunut itsensa kanssa tappaa minut .
|
||||
ja miksi taide ei ole helpompi kuin tiede ?
|
||||
se on koira jonka kanssa ystävää minun velj &+ ni voi pelata .
|
||||
toivotaan että joko vauvan isä juoksee tai etäisyys on pieni .
|
||||
minä en pelkää itseäni nyt .
|
||||
minä ihmettelen jonkun tai jonkin .
|
||||
jokainen vauva on joko poika tai tyttö .
|
||||
mikä pankkiin talosta etäisyys lyhyin tie löydetään ?
|
||||
missä opettaja joka myy kirjat luettuina opiskelijoille on ?
|
||||
kuan kylmästi ja lämpimästi kanssa .
|
||||
joko täältä , siellä tai kaikkialla .
|
||||
älkää kuolko ole hyvä !
|
||||
kuinka moni vuosi , minun ystävä &+ ni ?
|
||||
tiedetään .
|
||||
laulu laulaa on helppo .
|
||||
hän ei tietänyt teollisuutta ennen yliopistoa .
|
||||
hän on melkein avioitunut hänen serkku &+ nsa kanssa jos te katselitte televisiota .
|
||||
osaa olla tärkeä .
|
||||
27
lib/resource-1.3/Examples/examples-Fre.txt
Normal file
27
lib/resource-1.3/Examples/examples-Fre.txt
Normal file
@@ -0,0 +1,27 @@
|
||||
il chante presque correctement .
|
||||
quand tout le monde était jeune et joli et tout devenait probable .
|
||||
il y a seulement deux femmes avec que je voudrais être vu dans la pluie .
|
||||
quelque jour tel qu' il y aura de la paix sur la terre .
|
||||
ils sont en train de jouer moins sagement qu' on pense .
|
||||
c' est s' arrêter toujours que nous vous demandons .
|
||||
je ne donnerais pas plus que trois étoiles à ce restaurant .
|
||||
peins la terre en et plus petit que le soleil et plus grand que la lune .
|
||||
tout le monde s' étonne quoi tu aimes .
|
||||
qu' elle n' est pas mariée à soi me tue .
|
||||
et pourquoi n' est pas de l' art plus facile que de la science ?
|
||||
c' est un chien un ami avec lequel mon frère peut jouer .
|
||||
espérons qu' ou le père du bébé court ou la distance est petite .
|
||||
je ne me crains pas maintenant .
|
||||
je m' étonne quelqu'un ou quelque chose .
|
||||
chaque bébé est ou un garçon ou une fille .
|
||||
quelle distance de la maison à la banque la plus courte route est trouvée ?
|
||||
où est le professeur qui vend les livres lus à des étudiants ?
|
||||
avec qui froidement et chaudement .
|
||||
ou d'ici , là ou partout .
|
||||
ne mourez pas s'il vous plaît !
|
||||
combien d' ans , mon ami ?
|
||||
être connue .
|
||||
une chanson chanter est facile .
|
||||
elle ne connaissait pas de l' industrie avant l' université .
|
||||
elle est presque mariée à son cousin si vous regardiez la télévision .
|
||||
il sait être important .
|
||||
27
lib/resource-1.3/Examples/examples-Ger.txt
Normal file
27
lib/resource-1.3/Examples/examples-Ger.txt
Normal file
@@ -0,0 +1,27 @@
|
||||
er singt fast richtig .
|
||||
wenn jeder jung und schön war und alles wahrscheinlich wurde .
|
||||
es gibt nur zwei Frauen mit denen ich werden wollen würde gesehen in dem Regen .
|
||||
ein Tag derart daß es Frieden auf der Erde geben wird .
|
||||
sie spielen eben weniger klug als man denkt .
|
||||
es ist immer zu halten daß wir euch bitten .
|
||||
ich würde mehr als drei Sternen diesem Restaurant nicht geben .
|
||||
male die Erde sowohl kleiner als die Sonne als auch größer als der Mond .
|
||||
jeder wundert sich was du liebst .
|
||||
daß sie nicht verheiratet mit sich ist tötet mich .
|
||||
und warum ist Kunst nicht leichter als Wissenschaft ?
|
||||
es ist einen Hund einen Freund mit dem mein Bruder spielen kann .
|
||||
hoffen wir daß entweder der Vater von dem Baby läuft oder die Entfernung klein ist .
|
||||
ich fürchte mich nicht jetzt .
|
||||
ich wundere mich jemanden oder etwas .
|
||||
jedes Baby ist entweder ein Junge oder ein Mädchen .
|
||||
welche Entfernung von dem Haus zu der Bank die kürzeste Straße wird gefunden ?
|
||||
wo ist der Lehrer der die Bücher gelesen Studenten verkauft ?
|
||||
mit wem kalt und warm .
|
||||
entweder hieraus , da oder überall .
|
||||
sterbt nicht bitte !
|
||||
wieviele Jahre , mein Freund ?
|
||||
gewußt werden .
|
||||
ein Lied zu singen ist leicht .
|
||||
sie wußte Industrie vor der Universität nicht .
|
||||
sie ist fast verheiratet mit ihrem Vetter wenn Sie an das Fernsehen schauten .
|
||||
es kann wichtig sein .
|
||||
27
lib/resource-1.3/Examples/examples-Ita.txt
Normal file
27
lib/resource-1.3/Examples/examples-Ita.txt
Normal file
@@ -0,0 +1,27 @@
|
||||
canta quasi correttamente .
|
||||
quando tutti erano giovani e belli e tutto diventava probabile .
|
||||
ci sono soltanto due donne con cui vorrei venire visto nella pioggia .
|
||||
qualche giorno tale che ci sarà della pace sulla terra .
|
||||
stanno giocando meno saggiamente che si pensi .
|
||||
è fermar &+ si sempre che vi preghiamo .
|
||||
non darei più che tre stelle a questo ristorante .
|
||||
pingi la terra in e più piccolo che il sole e più grande che la luna .
|
||||
tutti si domandano che cosa ami .
|
||||
che non è sposata a se mi uccide .
|
||||
e perché non è dell' arte più facile che della scienza ?
|
||||
è un cane un amico con cui il mio fratello può giocare .
|
||||
speriamo che o il padre del bambino corre o la distanza è piccola .
|
||||
non mi temo adesso .
|
||||
mi domando qualcuno o qualche cosa .
|
||||
ogni bambino è o un ragazzo o una ragazza .
|
||||
quale distanza della casa alla banca la più corta strada viene trovata ?
|
||||
dove è il professore che vende i libri letti a studenti ?
|
||||
con chi freddamente e caldamente .
|
||||
o da quì , là o dappertutto .
|
||||
non morite per favore !
|
||||
quanti anni , il mio amico ?
|
||||
venire conosciuta .
|
||||
una canzone cantare è facile .
|
||||
non conosceva dell' industria prima l' università .
|
||||
è quasi sposata al suo cugino se guardava la televisione .
|
||||
sa essere importante .
|
||||
27
lib/resource-1.3/Examples/examples-Nor.txt
Normal file
27
lib/resource-1.3/Examples/examples-Nor.txt
Normal file
@@ -0,0 +1,27 @@
|
||||
han synger nesten riktig .
|
||||
når alle var unge og vakre og alt ble sannsynlig .
|
||||
det finnes kun to kvinner med hvilke jeg ville ville bli sett i regnet .
|
||||
noen dag sådan at det vil finnes fred på jorda .
|
||||
de er ved å leke mindre klokt enn man tenker .
|
||||
det er å altid stanse som vi ber dere .
|
||||
jeg ville ikke gi mer enn tre stjerner til denne restauranten .
|
||||
mal jorda både mindre enn sola og større enn månen .
|
||||
alle undrer hva du elsker .
|
||||
at hun ikke er gift med seg dreper meg .
|
||||
og hvorfor er kunst ikke greiere enn vitenskap ?
|
||||
det er en hund en venn med hvilken min bror kan spille .
|
||||
lat oss håpe at enten faren til babyen springer eller avstanden er liten .
|
||||
jeg frykter ikke meg nå .
|
||||
jeg undrer noen eller noe .
|
||||
hver baby er enten en gutt eller ei jente .
|
||||
hvilken avstand fra huset til banken den korteste veien blir funnet ?
|
||||
hver er læreren som selger bøkene leste til studenter ?
|
||||
med hvem kaldt og varmt .
|
||||
enten herfra , der eller overalt .
|
||||
dø ikke takk !
|
||||
hur mange år , min venn ?
|
||||
å bli visst .
|
||||
en sang å synge er grei .
|
||||
hun visste ikke industri før universitetet .
|
||||
hun er nesten gift med hennes fetter hvis Dere så på fjernsynet .
|
||||
det kan være viktig .
|
||||
27
lib/resource-1.3/Examples/examples-Rus.txt
Normal file
27
lib/resource-1.3/Examples/examples-Rus.txt
Normal file
@@ -0,0 +1,27 @@
|
||||
он поёт почти правильно .
|
||||
когда все были молодые и красивые и всё стало возможным .
|
||||
существует единственные два женщины , с которыми я хотел бы видеться в дожде .
|
||||
некоторый день , такой что будет существовать мир на земле .
|
||||
они играют менее умно чем ты думаешь .
|
||||
это всегда останавливать , мы просим вас .
|
||||
я не давал бы более чем три звезды этому ресторану .
|
||||
рисуй землю как меньше солнца , так и больше луны .
|
||||
все интересуют что ты любдишь .
|
||||
что она не замужем за собой убивает меня .
|
||||
и почему искусство не легче науки ?
|
||||
это собака , c другом с которой мой брат может играть .
|
||||
давайте будем надеять , что либо отец малыша бегает , либо расстояние маленькое .
|
||||
я не бою себя сейчас .
|
||||
я интересую кого-то или что-то .
|
||||
каждый малыш либо мальчик , либо девочка .
|
||||
которое расстояние от дома к банку короткая дорога находится ?
|
||||
где учитель , который продаёт книги читать студентам ?
|
||||
с кто холодно и тёпло .
|
||||
либо отсюда , там , либо везде .
|
||||
не умирайте пожалуйста !
|
||||
сколько годов , мой друг ?
|
||||
знаться .
|
||||
песня петь лёгкая .
|
||||
она не знала производство перед университетом .
|
||||
она почти замужем за её кузеном , если вы смотрели телевидение .
|
||||
может быть важным .
|
||||
27
lib/resource-1.3/Examples/examples-Spa.txt
Normal file
27
lib/resource-1.3/Examples/examples-Spa.txt
Normal file
@@ -0,0 +1,27 @@
|
||||
canta casi correctamente .
|
||||
cuando todos eran jovenes y bellos y todo se convertía probable .
|
||||
hay solamente dos mujeres con que querría ser visto en la lluvia .
|
||||
algun día tál que habrá paz sobre la tierra .
|
||||
están jugando meno inteligentemente que se pense .
|
||||
es parar siempre que vos rogamos .
|
||||
no daría mas que tres estrellas a este restaurante .
|
||||
pinta la tierra en y más pequeño que el sol y más grande que la luna .
|
||||
todos se preguntan qué amas .
|
||||
que no es casada a sí me mata .
|
||||
¿ y porqué no es arte más fácil que ciencia ?
|
||||
es un perro un amigo con que mi hermano puede jugar .
|
||||
esperemos que o el padre del bebé corre o la distancia es pequeña .
|
||||
no me temo ahora .
|
||||
me pregunto algún o algo .
|
||||
cada bebé es o un niño o una niña .
|
||||
¿ qué distancia de la casa al banco la más corta calle es encontrada ?
|
||||
¿ donde es el maestro que vende los libros leídos a unos estudiantes ?
|
||||
con quién fríamente y tibiamente .
|
||||
o de acá , allí o en todas partes .
|
||||
¡ no morid por favor !
|
||||
¿ cuantos años , mi amigo ?
|
||||
ser sabida .
|
||||
una canción cantar es fácil .
|
||||
no sabía industria antes de la universidad .
|
||||
es casi casada a su primo si miraba la televisión .
|
||||
sabe ser importante .
|
||||
27
lib/resource-1.3/Examples/examples-Swe.txt
Normal file
27
lib/resource-1.3/Examples/examples-Swe.txt
Normal file
@@ -0,0 +1,27 @@
|
||||
han sjunger nästan riktigt .
|
||||
när alla var unga och vackra och allting blev sannolikt .
|
||||
det finns bara två kvinnor med vilka jag skulle vilja bli sedd i regnet .
|
||||
någon dag sådan att det ska finnas fred på jorden .
|
||||
de håller på att leka mindre klokt än man tänker .
|
||||
det är att alltid stanna som vi ber er .
|
||||
jag skulle inte ge mer än tre stjärnor till den här restaurangen .
|
||||
måla jorden både mindre än solen och större än månen .
|
||||
alla undrar vad du älskar .
|
||||
att hon inte är gift med sig dödar mig .
|
||||
och varför är konst inte lättare än vetenskap ?
|
||||
det är en hund en vän med vilken min bror kan spela .
|
||||
låt oss hoppas att antingen fadern till bebisen springer eller avståndet är litet .
|
||||
jag fruktar inte mig nu .
|
||||
jag undrar någon eller något .
|
||||
varje bebis är antingen en pojke eller en flicka .
|
||||
vilket avstånd från huset till banken den kortaste vägen blir funnet ?
|
||||
var är läraren som säljer böckerna lästa till studenter ?
|
||||
med vem kallt och varmt .
|
||||
antingen härifrån , där eller överallt .
|
||||
dö inte tack !
|
||||
hur många år , min vän ?
|
||||
att bli visst .
|
||||
en sång att sjunga är lätt .
|
||||
hon visste inte industri före universitetet .
|
||||
hon är nästan gift med hennes kusin om ni tittade på televisionen .
|
||||
det kan vara viktigt .
|
||||
86
lib/resource-1.3/Examples/examples.Abs.gf
Normal file
86
lib/resource-1.3/Examples/examples.Abs.gf
Normal file
@@ -0,0 +1,86 @@
|
||||
--include test.Abs.gf;
|
||||
include ../test.Abs.gf;
|
||||
|
||||
cat Text ;
|
||||
|
||||
fun
|
||||
onePhraseText : Phr -> Text ;
|
||||
combine: Text -> Text -> Text ;
|
||||
ex1, ex2, ex3, ex4, ex5, ex6, ex7, ex8, ex9, ex10, ex11,
|
||||
ex12, ex13, ex14, ex15, ex16, ex17, ex18, ex19: Text ;
|
||||
russian : Adj1 ;
|
||||
parkedNear : Adj2 ;
|
||||
|
||||
def
|
||||
ex1 = onePhraseText (IndicPhrase (PredVP HeNP (PosVS Say (PredVP ThouNP (AdvVP (PosV Run ) Well))))) ;
|
||||
|
||||
ex2 = onePhraseText (IndicPhrase (PredVP SheNP (NegTV Send (DefOneNP (ModAdj (ConjAP OrConj (ConsAP
|
||||
(TwoAP (PositAdjP Big ) (PositAdjP Small ) ) (ConjDAP EitherOr
|
||||
(TwoAP (PositAdjP Old ) (PositAdjP Young ) ) ) ) ) (UseN Car)))))) ;
|
||||
|
||||
ex3 = onePhraseText (IndicPhrase (SubjS IfSubj (PredVP (UsePN John ) (AdvVP (NegV Walk ) Always )) (PredVP
|
||||
WeNP (AdvVP (PosTV SwitchOn (IndefOneNP (UseN Light ) ))
|
||||
(LocNP (DetNP EveryDet (ModAdj (PositAdjP Old ) (UseN House ))))))));
|
||||
|
||||
ex4 = onePhraseText (IndicPhrase (ConjDS EitherOr (TwoS (PredVP TheyNP (PosA (ComparAdjP Young YeNP )))
|
||||
(PredVP INP (PosCN (AppFun Mother (SuperlNP Big (UseN Man ))))))));
|
||||
|
||||
ex5 = onePhraseText (IndicPhrase (PredVP (ModGenMany YeNP (AdvCN (UseFun
|
||||
Mother ) Always ) ) (PosVS Prove (PredVP YeNP (PosA (PositAdjP
|
||||
Small) ) ) ) ) );
|
||||
|
||||
ex6 = onePhraseText (IndicPhrase (PredVP (IndefManyNP (ModRC (UseN Man ) ( RelSuch ( PredVP (ModGenMany
|
||||
TheyNP(UseFun Uncle ) ) (PosTV Love(ConjDNP NeitherNor (TwoNP
|
||||
(DefManyNP (UseN Car )) (DefManyNP (UseN House ) ) ))) ) ) ) )
|
||||
(NegA (PositAdjP Old )))) ;
|
||||
|
||||
ex7 = onePhraseText (QuestPhrase (SubjQu WhenSubj (PredVP (IndefOneNP
|
||||
(ModRC (UseN Man ) (RelVP IdRP (NegV Run ))))(PosV Walk ))
|
||||
(IntVP WhoOne (PosV Run ) ) ) ) ;
|
||||
|
||||
ex8 = onePhraseText (IndicPhrase (ConjS AndConj (ConsS (TwoS
|
||||
(PredVP (DefOneNP (UseN Car)) (NegA (PositAdjP Big )))
|
||||
(PredVP (DefOneNP (UseN House)) (PosA (PositAdjP Small ))))
|
||||
(PredVP SheNP (PosA (PositAdjP Old)) )))) ;
|
||||
|
||||
ex9 = onePhraseText (ImperMany (SubjImper WhenSubj (PredVP YeNP
|
||||
(PosA (PositAdjP Young ) ) ) (ImperVP (PosV Walk) ) ) );
|
||||
|
||||
ex10 = onePhraseText (QuestPhrase (IntSlash (FunIP Uncle (NounIPMany
|
||||
(UseN Woman ) ) ) (PosSlashTV INP Wait ) ) ) ;
|
||||
|
||||
ex11 = onePhraseText (QuestPhrase (QuestAdv WhyIAdv TheyNP (PosTV
|
||||
Love (UsePN Mary ) ) ) ) ;
|
||||
|
||||
ex12 = onePhraseText (QuestPhrase (QuestVP WeNP (PosCN (UseN Man ) ) ) );
|
||||
|
||||
ex13 = combine (combine (onePhraseText PhrYes ) (onePhraseText
|
||||
(PhrNP (DetNP MostDet (UseN Car ) ) ) ) ) (combine
|
||||
(onePhraseText (PhrManyCN (ModAdj (PositAdjP Old ) (UseN House
|
||||
) ) ) ) (onePhraseText (PhrIAdv HowIAdv ) ) ) ;
|
||||
|
||||
ex14 = onePhraseText (IndicPhrase (PredVP SheNP (PosNP (IndefOneNP (ModRC
|
||||
(UseN Woman) (RelSlash(FunRP Mother IdRP)(PosSlashTV HeNP Wait)))))));
|
||||
|
||||
ex15 = onePhraseText (IndicPhrase (PredVP (ConjNP OrConj (ConsNP (TwoNP
|
||||
(UsePN Mary ) (UsePN John ) ) (ConjDNP EitherOr (TwoNP YouNP INP
|
||||
) ) ) ) (PosA (PositAdjP Young ) ) ) );
|
||||
|
||||
ex16 = onePhraseText (IndicPhrase (PredVP INP (PosTV Love (ConjNP AndConj
|
||||
(TwoNP (IndefManyNP (ModAdj (PositAdjP Old ) (UseN House )))
|
||||
(IndefManyNP (ModAdj (PositAdjP Young) (UseN Woman ) ))))))) ;
|
||||
|
||||
ex18 = combine ex1 (combine ex2 (combine ex3 (combine ex4 (combine ex5
|
||||
(combine ex6 (combine ex7 (combine ex8 (combine ex9 (combine ex10
|
||||
(combine ex11 (combine ex12 (combine ex14 (combine ex15
|
||||
( combine ex16 ex13)))))))))))))) ;
|
||||
|
||||
ex17 = onePhraseText (PhrManyCN (ModAdj (ComplAdj parkedNear (DefOneNP
|
||||
(ModAdj (AdjP1 russian ) (UseN House ) ) ) )(UseN Car ) ) ) ;
|
||||
|
||||
ex19 = combine ex1 (combine ex2 (combine ex3 (combine ex4 (combine ex5
|
||||
(combine ex6 (combine ex7 (combine ex8 (combine ex9 (combine ex10
|
||||
(combine ex11 (combine ex12 (combine ex14 (combine ex15
|
||||
( combine ex16 (combine ex17 ex13))))))))))))))) ;
|
||||
|
||||
|
||||
33
lib/resource-1.3/Examples/examples.Deu.gf
Normal file
33
lib/resource-1.3/Examples/examples.Deu.gf
Normal file
@@ -0,0 +1,33 @@
|
||||
include
|
||||
examples.Abs.gf;
|
||||
-- test.Deu.gf;
|
||||
../test.Deu.gf;
|
||||
|
||||
lincat
|
||||
Text = SS;
|
||||
|
||||
lin
|
||||
onePhraseText t = t ;
|
||||
combine txt1 txt2 = { s = txt1.s ++ "<p>" ++ txt2.s } ;
|
||||
-- combine txt1 txt2 = { s = txt1.s ++ txt2.s } ;
|
||||
|
||||
ex1 = {s = ["Beispiel 1."]};
|
||||
ex2 = {s = ["Beispiel 2."]};
|
||||
ex3 = {s = ["Beispiel 3."]};
|
||||
ex4 = {s = ["Beispiel 4."]};
|
||||
ex5 = {s = ["Beispiel 5."]};
|
||||
ex6 = {s = ["Beispiel 6."]};
|
||||
ex7 = {s = ["Beispiel 7."]};
|
||||
ex8 = {s = ["Beispiel 8."]};
|
||||
ex9 = {s = ["Beispiel 9."]};
|
||||
ex10 = {s = ["Beispiel 10."]};
|
||||
ex11 = {s = ["Beispiel 11."]};
|
||||
ex12 = {s = ["Beispiel 12."]};
|
||||
ex13 = {s = ["Beispiel 13."]};
|
||||
ex14 = {s = ["Beispiel 14."]};
|
||||
ex15 = {s = ["Beispiel 15."]};
|
||||
ex16 = {s = ["Beispiel 16."]};
|
||||
ex17 = {s = ["Beispiel 17."]};
|
||||
ex18 = {s = ["Beispiel 18. A combination of ex1-ex16"]};
|
||||
ex19 = {s = ["Beispiel 19. A combination of ex1-ex17"]};
|
||||
|
||||
33
lib/resource-1.3/Examples/examples.Eng.gf
Normal file
33
lib/resource-1.3/Examples/examples.Eng.gf
Normal file
@@ -0,0 +1,33 @@
|
||||
include
|
||||
examples.Abs.gf;
|
||||
-- test.Eng.gf;
|
||||
../test.Eng.gf;
|
||||
|
||||
lincat
|
||||
Text = SS;
|
||||
|
||||
lin
|
||||
onePhraseText t = t ;
|
||||
combine txt1 txt2 = { s = txt1.s ++ "<p>" ++ txt2.s } ;
|
||||
russian = simpleAdj "Russian";
|
||||
parkedNear = (simpleAdj "parked") ** { s2 = "near" };
|
||||
|
||||
ex1 = {s = ["Example 1."]};
|
||||
ex2 = {s = ["Example 2."]};
|
||||
ex3 = {s = ["Example 3."]};
|
||||
ex4 = {s = ["Example 4."]};
|
||||
ex5 = {s = ["Example 5."]};
|
||||
ex6 = {s = ["Example 6."]};
|
||||
ex7 = {s = ["Example 7."]};
|
||||
ex8 = {s = ["Example 8."]};
|
||||
ex9 = {s = ["Example 9."]};
|
||||
ex10 = {s = ["Example 10."]};
|
||||
ex11 = {s = ["Example 11."]};
|
||||
ex12 = {s = ["Example 12."]};
|
||||
ex13 = {s = ["Example 13."]};
|
||||
ex14 = {s = ["Example 14."]};
|
||||
ex15 = {s = ["Example 15."]};
|
||||
ex16 = {s = ["Example 16."]};
|
||||
ex17 = {s = ["Example 17."]};
|
||||
ex18 = {s = ["Example 18. A combination of ex1-ex16"]};
|
||||
ex19 = {s = ["Example 19. A combination of ex1-ex17"]};
|
||||
35
lib/resource-1.3/Examples/examples.Fra.gf
Normal file
35
lib/resource-1.3/Examples/examples.Fra.gf
Normal file
@@ -0,0 +1,35 @@
|
||||
include
|
||||
examples.Abs.gf;
|
||||
-- test.Fra.gf;
|
||||
../test.Fra.gf;
|
||||
|
||||
lincat
|
||||
Text = SS;
|
||||
|
||||
lin
|
||||
onePhraseText t = t ;
|
||||
combine txt1 txt2 = { s = txt1.s ++ "<p>" ++ txt2.s } ;
|
||||
-- combine txt1 txt2 = { s = txt1.s ++ txt2.s } ;
|
||||
russian = mkAdjective (adjJeune "russe") adjPost ;
|
||||
parkedNear = mkAdjective (adjGrand "garé") adjPost **
|
||||
{s2 = "prés"; c = genitive};
|
||||
|
||||
ex1 = {s = ["Example 1."]};
|
||||
ex2 = {s = ["Exemple 2."]};
|
||||
ex3 = {s = ["Exemple 3."]};
|
||||
ex4 = {s = ["Exemple 4."]};
|
||||
ex5 = {s = ["Exemple 5."]};
|
||||
ex6 = {s = ["Exemple 6."]};
|
||||
ex7 = {s = ["Exemple 7."]};
|
||||
ex8 = {s = ["Exemple 8."]};
|
||||
ex9 = {s = ["Exemple 9."]};
|
||||
ex10 = {s = ["Exemple 10."]};
|
||||
ex11 = {s = ["Exemple 11."]};
|
||||
ex12 = {s = ["Exemple 12."]};
|
||||
ex13 = {s = ["Exemple 13."]};
|
||||
ex14 = {s = ["Exemple 14."]};
|
||||
ex15 = {s = ["Exemple 15."]};
|
||||
ex16 = {s = ["Exemple 16."]};
|
||||
ex17 = {s = ["Exemple 17."]};
|
||||
ex18 = {s = ["Exemple 18. Une combination de ex1-ex16"]};
|
||||
ex19 = {s = ["Exemple 19. Une combination de ex1-ex17"]};
|
||||
33
lib/resource-1.3/Examples/examples.Ita.gf
Normal file
33
lib/resource-1.3/Examples/examples.Ita.gf
Normal file
@@ -0,0 +1,33 @@
|
||||
include
|
||||
examples.Abs.gf;
|
||||
-- test.Ita.gf;
|
||||
../test.Ita.gf;
|
||||
|
||||
lincat
|
||||
Text = SS;
|
||||
|
||||
lin
|
||||
onePhraseText t = t ;
|
||||
combine txt1 txt2 = { s = txt1.s ++ "<p>" ++ txt2.s } ;
|
||||
-- combine txt1 txt2 = { s = txt1.s ++ txt2.s } ;
|
||||
|
||||
ex1 = {s = ["Esempio 1."]};
|
||||
ex2 = {s = ["Esempio 2."]};
|
||||
ex3 = {s = ["Esempio 3."]};
|
||||
ex4 = {s = ["Esempio 4."]};
|
||||
ex5 = {s = ["Esempio 5."]};
|
||||
ex6 = {s = ["Esempio 6."]};
|
||||
ex7 = {s = ["Esempio 7."]};
|
||||
ex8 = {s = ["Esempio 8."]};
|
||||
ex9 = {s = ["Esempio 9."]};
|
||||
ex10 = {s = ["Esempio 10."]};
|
||||
ex11 = {s = ["Esempio 11."]};
|
||||
ex12 = {s = ["Esempio 12."]};
|
||||
ex13 = {s = ["Esempio 13."]};
|
||||
ex14 = {s = ["Esempio 14."]};
|
||||
ex15 = {s = ["Esempio 15."]};
|
||||
ex16 = {s = ["Esempio 16."]};
|
||||
ex17 = {s = ["Esempio 17."]};
|
||||
ex18 = {s = ["Esempio 18. A combination of ex1-ex16"]};
|
||||
ex19 = {s = ["Esempio 19. A combination of ex1-ex17"]};
|
||||
|
||||
38
lib/resource-1.3/Examples/examples.RusU.gf
Normal file
38
lib/resource-1.3/Examples/examples.RusU.gf
Normal file
@@ -0,0 +1,38 @@
|
||||
include
|
||||
examples.Abs.gf;
|
||||
-- test.RusU.gf;
|
||||
../test.RusU.gf;
|
||||
|
||||
|
||||
lincat
|
||||
Text = SS;
|
||||
|
||||
lin
|
||||
onePhraseText t = t ;
|
||||
combine txt1 txt2 = { s = txt1.s ++ "<p>" ++ txt2.s } ;
|
||||
-- combine txt1 txt2 = { s = txt1.s ++ txt2.s } ;
|
||||
russian = russkij;
|
||||
-- parkedNear = mkAdj2 (adjEnd_uyj "запаркованн" ) "около" Gen ;
|
||||
|
||||
parkedNear = (uy_j_EndDecl "запаркованн" ) ** { s2 = "около";
|
||||
c= Gen };
|
||||
|
||||
ex1 = {s = ["Example 1."]};
|
||||
ex2 = {s = ["Example 2."]};
|
||||
ex3 = {s = ["Example 3."]};
|
||||
ex4 = {s = ["Example 4."]};
|
||||
ex5 = {s = ["Example 5."]};
|
||||
ex6 = {s = ["Example 6."]};
|
||||
ex7 = {s = ["Example 7."]};
|
||||
ex8 = {s = ["Example 8."]};
|
||||
ex9 = {s = ["Example 9."]};
|
||||
ex10 = {s = ["Example 10."]};
|
||||
ex11 = {s = ["Example 11."]};
|
||||
ex12 = {s = ["Example 12."]};
|
||||
ex13 = {s = ["Example 13."]};
|
||||
ex14 = {s = ["Example 14."]};
|
||||
ex15 = {s = ["Example 15."]};
|
||||
ex16 = {s = ["Example 16."]};
|
||||
ex17 = {s = ["Example 17."]};
|
||||
ex18 = {s = ["Example 18. A combination of ex1-ex16"]};
|
||||
ex19 = {s = ["Example 19. A combination of ex1-ex17"]};
|
||||
34
lib/resource-1.3/Examples/examples.Swe.gf
Normal file
34
lib/resource-1.3/Examples/examples.Swe.gf
Normal file
@@ -0,0 +1,34 @@
|
||||
include
|
||||
examples.Abs.gf;
|
||||
-- test.Swe.gf;
|
||||
../test.Swe.gf;
|
||||
|
||||
lincat
|
||||
Text = SS;
|
||||
|
||||
lin
|
||||
onePhraseText t = t ;
|
||||
combine txt1 txt2 = { s = txt1.s ++ "<p>" ++ txt2.s } ;
|
||||
-- combine txt1 txt2 = { s = txt1.s ++ txt2.s } ;
|
||||
russian = extAdjective (aFin "rysk");
|
||||
parkedNear = extAdjective (aFin "parkerad") ** { s2 = "vid" };
|
||||
|
||||
ex1 = {s = ["Exempel 1."]};
|
||||
ex2 = {s = ["Exempel 2."]};
|
||||
ex3 = {s = ["Exempel 3."]};
|
||||
ex4 = {s = ["Exempel 4."]};
|
||||
ex5 = {s = ["Exempel 5."]};
|
||||
ex6 = {s = ["Exempel 6."]};
|
||||
ex7 = {s = ["Exempel 7."]};
|
||||
ex8 = {s = ["Exempel 8."]};
|
||||
ex9 = {s = ["Exempel 9."]};
|
||||
ex10 = {s = ["Exempel 10."]};
|
||||
ex11 = {s = ["Exempel 11."]};
|
||||
ex12 = {s = ["Exempel 12."]};
|
||||
ex13 = {s = ["Exempel 13."]};
|
||||
ex14 = {s = ["Exempel 14."]};
|
||||
ex15 = {s = ["Exempel 15."]};
|
||||
ex16 = {s = ["Exempel 16."]};
|
||||
ex17 = {s = ["Exempel 17."]};
|
||||
ex18 = {s = ["Exempel 18. En combination av ex1-ex16"]};
|
||||
ex19 = {s = ["Exempel 19. En combination av ex1-ex17"]};
|
||||
17
lib/resource-1.3/Examples/testexamples
Normal file
17
lib/resource-1.3/Examples/testexamples
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
DIR="."
|
||||
LANGS=`ls $DIR/Examples???.gf | perl -pe 's/.*(\w{3})\.gf/$1/'`
|
||||
|
||||
LATIN1_LANGS="Dan Fin Fre Ger Ita Nor Spa Swe"
|
||||
|
||||
for L in $LANGS; do
|
||||
echo "gt | l | wf tmp.txt" | gf -s -batch -nocpu $DIR/Examples${L}.gf
|
||||
grep -v '^$' tmp.txt > examples-$L.txt
|
||||
echo "Wrote examples-$L.txt..."
|
||||
done
|
||||
|
||||
for L in $LATIN1_LANGS; do
|
||||
iconv -f iso-8859-1 -t utf8 examples-${L}.txt > tmp.txt
|
||||
mv tmp.txt examples-${L}.txt
|
||||
done
|
||||
165
lib/resource-1.3/LICENSE
Normal file
165
lib/resource-1.3/LICENSE
Normal file
@@ -0,0 +1,165 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
247
lib/resource-1.3/Makefile
Normal file
247
lib/resource-1.3/Makefile
Normal file
@@ -0,0 +1,247 @@
|
||||
GF=gf -s
|
||||
|
||||
RTS=+RTS -M2000M -K200M -RTS
|
||||
|
||||
GFNewC=gfc -s $(RTS)
|
||||
GFNew=$(GFNewC) -src
|
||||
GFNewMake=$(GFNew) --make
|
||||
GFNewPres=$(GFNew) -preproc=./mkPresent
|
||||
GFNewPresC=$(GFNewC) -preproc=./mkPresent
|
||||
|
||||
GFCA=$(GF) -nocf
|
||||
GFCC=$(GF) -nocf -make $(RTS)
|
||||
GFC=$(GFCC) -src
|
||||
|
||||
# comment the first and uncomment the second in Windows
|
||||
GFCP=$(GFC) -preproc=./mkPresent
|
||||
|
||||
GFCCP=$(GFCC) -preproc=./mkPresent
|
||||
|
||||
#GFCP=$(GFC) -preproc=mkPresent
|
||||
|
||||
|
||||
.PHONY: show-path all prelude test alltenses pretest langs present mathematical multimodal time compiled treebank stat gfdoc clean api
|
||||
|
||||
new:
|
||||
export GF='../../bin/gf -s' ; export GF_LIB_PATH='..'; $(MAKE) -e all
|
||||
|
||||
all: chmod show-path prelude present alltenses
|
||||
|
||||
chmod:
|
||||
chmod a+x mkPresent
|
||||
|
||||
show-path:
|
||||
@echo GF_LIB_PATH=$(GF_LIB_PATH)
|
||||
|
||||
test:
|
||||
echo "gr -cat=Text -number=11 -prob | tb" | $(GF) -nocf -probs=lang.gfprob langs.gfcm
|
||||
|
||||
pretest:
|
||||
echo "gr -cat=Cl -number=11 -prob | tb" | $(GF) -probs=lang.gfprob -path=present:prelude -nocf ../present/Lang???.gfc
|
||||
|
||||
prelude:
|
||||
$(GFC) ../src/*.gf
|
||||
cp -p ../src/*.gf? ../prelude
|
||||
|
||||
alltenses:
|
||||
# $(GFC) arabic/GrammarAra.gf
|
||||
# $(GFC) catalan/Catalan.gf
|
||||
$(GFC) danish/Danish.gf
|
||||
$(GFC) english/English.gf
|
||||
$(GFC) finnish/Finnish.gf
|
||||
$(GFC) french/French.gf
|
||||
$(GFC) german/German.gf
|
||||
$(GFC) italian/Italian.gf
|
||||
$(GFC) norwegian/Norwegian.gf
|
||||
$(GFC) russian/Russian.gf
|
||||
$(GFC) spanish/Spanish.gf
|
||||
$(GFC) swedish/Swedish.gf
|
||||
$(GFC) common/ConstructX.gf
|
||||
cp -p */*.gf? ../alltenses
|
||||
touch api/Constructors.gf
|
||||
$(GFCC) api/Syntax???.gf
|
||||
cp -p api/Constructors*.gf? ../alltenses
|
||||
cp -p api/Syntax*.gf? ../alltenses
|
||||
$(GFCC) api/Try???.gf
|
||||
$(GFCC) -path=alltenses:prelude:api:api/toplevel api/toplevel/OverLangEng.gf
|
||||
mv api/toplevel/Over*.gfc api/Try*.gf? ../alltenses
|
||||
|
||||
langs:
|
||||
echo "s ;; pm | wf langs.gfcm" | $(GFCA) -path=present:prelude ../present/Lang???.gfc
|
||||
mv langs.gfcm ../present
|
||||
echo "s ;; pm | wf langs.gfcm" | $(GFCA) -path=alltenses:prelude ../alltenses/Lang???.gfc
|
||||
mv langs.gfcm ../alltenses
|
||||
|
||||
api:
|
||||
# $(GFCC) api/Constructors???.gf
|
||||
$(GFCC) api/Combinators???.gf
|
||||
$(GFCC) api/Symbolic???.gf
|
||||
cp -p api/*.gf? ../api
|
||||
|
||||
arabic: chmod
|
||||
$(GFCP) arabic/GrammarAra.gf
|
||||
$(GFC) arabic/GrammarAra.gf
|
||||
|
||||
catalan: chmod
|
||||
$(GFCP) catalan/Catalan.gf
|
||||
$(GFC) catalan/Catalan.gf
|
||||
|
||||
present: chmod
|
||||
# $(GFCP) arabic/GrammarAra.gf
|
||||
# $(GFCP) catalan/Catalan.gf
|
||||
$(GFCP) danish/Danish.gf
|
||||
$(GFCP) english/English.gf
|
||||
$(GFCP) finnish/Finnish.gf
|
||||
$(GFCP) french/French.gf
|
||||
$(GFCP) german/German.gf
|
||||
$(GFCP) italian/Italian.gf
|
||||
$(GFCP) norwegian/Norwegian.gf
|
||||
$(GFCP) russian/Russian.gf
|
||||
$(GFCP) spanish/Spanish.gf
|
||||
$(GFCP) swedish/Swedish.gf
|
||||
$(GFCP) common/ConstructX.gf
|
||||
mv */*.gf? ../present
|
||||
touch api/Constructors.gf
|
||||
$(GFCCP) -path=api:present:prelude api/Syntax???.gf
|
||||
mv api/Constructors*.gf? ../present
|
||||
mv api/Syntax*.gf? ../present
|
||||
$(GFCCP) -path=api:present:prelude api/Try???.gf
|
||||
$(GFCCP) -path=present:prelude:api:api/toplevel api/toplevel/OverLangEng.gf
|
||||
mv api/toplevel/Over*.gfc api/Try???.gf? ../present
|
||||
|
||||
|
||||
mathematical:
|
||||
$(GFCC) mathematical/MathematicalEng.gf
|
||||
$(GFCC) mathematical/MathematicalNor.gf
|
||||
$(GFCC) mathematical/MathematicalGer.gf
|
||||
$(GFCC) mathematical/MathematicalSpa.gf
|
||||
$(GFCC) mathematical/MathematicalIta.gf
|
||||
$(GFCC) mathematical/MathematicalFre.gf
|
||||
$(GFCC) mathematical/MathematicalSwe.gf
|
||||
$(GFCC) mathematical/MathematicalFin.gf
|
||||
mv mathematical/*.gfc ../mathematical
|
||||
|
||||
#doesn't compile 18/12/2007:
|
||||
multimodal:
|
||||
$(GF) -make -nocf multimodal/Multi???.gf
|
||||
mv multimodal/*.gfc ../multimodal
|
||||
|
||||
time:
|
||||
$(GFCC) time/TimeEng.gf
|
||||
mv time/*.gfc ../time
|
||||
|
||||
compiled: prelude present alltenses mathematical
|
||||
cd .. ; tar cfz compiled.tgz alltenses/ mathematical/ present/ prelude/*.gf?
|
||||
|
||||
treebank:
|
||||
gf <mkTreebank.gfs
|
||||
|
||||
stat:
|
||||
wc */*.gfc
|
||||
|
||||
gfdoc:
|
||||
gfdoc -txthtml abstract/*.gf
|
||||
gfdoc -txthtml */Paradigms*.gf
|
||||
gfdoc -txthtml mathematical/Mathematical.gf
|
||||
gfdoc -txthtml mathematical/Symbol.gf
|
||||
gfdoc -txthtml mathematical/Predication.gf
|
||||
gfdoc -txthtml multimodal/Multi.gf
|
||||
gfdoc -txthtml ../prelude/*.gf
|
||||
gfdoc -txthtml api/Combinators.gf
|
||||
gfdoc -txthtml api/Constructors.gf
|
||||
gfdoc -txthtml api/Symbolic.gf
|
||||
mv abstract/*.html doc/gfdoc
|
||||
mv mathematical/*.html doc/gfdoc
|
||||
mv multimodal/*.html doc/gfdoc
|
||||
mv api/*.html doc/gfdoc
|
||||
mv */Paradigms*.html doc/gfdoc
|
||||
cp */Irreg???.gf doc/gfdoc
|
||||
mv ../prelude/*.html doc/gfdoc
|
||||
|
||||
gf3:
|
||||
export GF_LIB_PATH=..; $(MAKE) -e gf3prelude gf3present gf3alltenses
|
||||
|
||||
gf3prelude:
|
||||
$(GFNew) ../src/*.gf
|
||||
cp -p ../src/*.gfo ../prelude
|
||||
|
||||
gf3alltenses:
|
||||
# $(GFNew) arabic/GrammarAra.gf
|
||||
# $(GFNew) catalan/Catalan.gf
|
||||
$(GFNew) danish/Danish.gf
|
||||
$(GFNew) english/English.gf
|
||||
$(GFNew) finnish/Finnish.gf
|
||||
$(GFNew) french/French.gf
|
||||
$(GFNew) german/German.gf
|
||||
$(GFNew) italian/Italian.gf
|
||||
$(GFNew) norwegian/Norwegian.gf
|
||||
$(GFNew) russian/Russian.gf
|
||||
$(GFNew) spanish/Spanish.gf
|
||||
$(GFNew) swedish/Swedish.gf
|
||||
$(GFNew) common/ConstructX.gf
|
||||
cp -p */*.gfo ../alltenses
|
||||
touch api/Constructors.gf
|
||||
$(GFNewC) api/Syntax???.gf
|
||||
cp -p api/Constructors*.gfo ../alltenses
|
||||
cp -p api/Syntax*.gfo ../alltenses
|
||||
# $(GFNewC) api/Try???.gf
|
||||
# $(GFNewC) -path=alltenses:prelude:api:api/toplevel api/toplevel/OverLangEng.gf
|
||||
# mv api/toplevel/Over*.gfc api/Try*.gf? ../alltenses
|
||||
|
||||
gf3present:
|
||||
# $(GFNewPres) arabic/GrammarAra.gf
|
||||
# $(GFNewPres) catalan/Catalan.gf
|
||||
$(GFNewPres) danish/Danish.gf
|
||||
$(GFNewPres) english/English.gf
|
||||
$(GFNewPres) finnish/Finnish.gf
|
||||
$(GFNewPres) french/French.gf
|
||||
$(GFNewPres) german/German.gf
|
||||
$(GFNewPres) italian/Italian.gf
|
||||
$(GFNewPres) norwegian/Norwegian.gf
|
||||
$(GFNewPres) russian/Russian.gf
|
||||
$(GFNewPres) spanish/Spanish.gf
|
||||
$(GFNewPres) swedish/Swedish.gf
|
||||
$(GFNewPres) common/ConstructX.gf
|
||||
cp -p */*.gfo ../present
|
||||
touch api/Constructors.gf
|
||||
$(GFNewPresC) -path=present:prelude:api api/Syntax???.gf
|
||||
cp -p api/Constructors*.gfo ../present
|
||||
cp -p api/Syntax*.gfo ../present
|
||||
# $(GFNewPresC) api/Try???.gf
|
||||
# $(GFNewPresC) -path=present:prelude:api:api/toplevel api/toplevel/OverLangEng.gf
|
||||
# mv api/toplevel/Over*.gfc api/Try*.gf? ../present
|
||||
|
||||
gf3mathematical:
|
||||
$(GFNew) mathematical/MathematicalEng.gf
|
||||
$(GFNew) mathematical/MathematicalNor.gf
|
||||
$(GFNew) mathematical/MathematicalGer.gf
|
||||
$(GFNew) mathematical/MathematicalSpa.gf
|
||||
$(GFNew) mathematical/MathematicalIta.gf
|
||||
$(GFNew) mathematical/MathematicalFre.gf
|
||||
$(GFNew) mathematical/MathematicalSwe.gf
|
||||
$(GFNew) mathematical/MathematicalFin.gf
|
||||
mv mathematical/*.gfo ../mathematical
|
||||
|
||||
gf3time:
|
||||
$(GFNew) time/TimeEng.gf
|
||||
mv time/*.gfo ../time
|
||||
|
||||
gf3langs:
|
||||
mv ../present/LangSpa.gfo tmpLangSpa.gfo
|
||||
$(GFNew) -path=present:prelude -target=langs --make ../present/Lang???.gfo $(RTSS)
|
||||
mv langs.gfcc ../present
|
||||
mv tmpLangSpa.gfo ../present/LangSpa.gfo
|
||||
# mv ../alltenses/LangSpa.gfo tmpLangSpa.gfo
|
||||
# $(GFNew) -path=alltenses:prelude -target=langs --make ../alltenses/Lang???.gfo $(RTSS)
|
||||
# mv langs.gfcc ../alltenses
|
||||
# mv tmpLangSpa.gfo ../alltenses/LangSpa.gfo
|
||||
|
||||
|
||||
overljs:
|
||||
gfc --make -js -jsref api/toplevel/OverLangEng.gf api/toplevel/OverLangSwe.gf api/toplevel/OverLangRus.gf +RTS -K100M
|
||||
mv grammar.js grammarReference.js ../../js/overl
|
||||
|
||||
clean:
|
||||
-rm -f */*.gfc */*.gfr */*.gf~ ../*/*.gfc ../*/*.gfr ../*/*.gf~ ../*/langs.gfcm ../compiled.tgz
|
||||
|
||||
|
||||
101
lib/resource-1.3/README
Normal file
101
lib/resource-1.3/README
Normal file
@@ -0,0 +1,101 @@
|
||||
LICENSE: This library is free software licensed under GNU General
|
||||
Public License (GPL), see LICENSE.
|
||||
|
||||
Author (c) Aarne Ranta 2005-2006.
|
||||
|
||||
-- file GF/lib/resource-1.0/README
|
||||
-- created Thu Dec 1 22:21:21 CET 2005
|
||||
-- by A. Ranta, aarne@cs.chalmers.se
|
||||
|
||||
This is a working directory for the next version of GF resource
|
||||
grammar library, incomplete in many ways but aimed to become the
|
||||
first "mature" release. The old releases (resource-0.6 and resource)
|
||||
will be kept available, but 'resource' will be renamed 'resource-0.9',
|
||||
and 'resource' will probably be made into a symbolic link to the
|
||||
current version.
|
||||
|
||||
To compile:
|
||||
|
||||
make
|
||||
|
||||
For translation from Eng to all others, try e.g.
|
||||
|
||||
gf -nocf langs.gfcm
|
||||
> p -cat=Phr -fcfg "I haven't seen her" | l -multi
|
||||
|
||||
To link to the library, use the precompiled packages
|
||||
|
||||
- ``lib/alltenses`` the complete ground-API library with all forms
|
||||
- ``lib/present`` a pruned ground-API library with present tense only
|
||||
- ``lib/mathematical`` special-purpose API for mathematical applications
|
||||
- ``lib/multimodal`` special-purpose API for multimodal dialogue applications
|
||||
|
||||
The main changes from 0.9 to 1.0 are
|
||||
|
||||
1. Refactoring of module structure: there are many more modules now.
|
||||
However, the full API is still available as LangX.
|
||||
|
||||
2. Increased coverage. We have used the second CLE book ("Spoken
|
||||
Language Translation", by M. Rayner, D. Carter, P. Bouillon
|
||||
V. Digalakis, and M. Wirén, Cambridge UP, 2000) as guideline and
|
||||
goal.
|
||||
|
||||
3. Some constructions have been dropped out or modified. This concerns
|
||||
in particular the determiner structure in the module Noun. Also the
|
||||
number of verb subcategorization patterns is lower: predication can
|
||||
be done by adding adverbs instead. Also the division between A and ADeg
|
||||
is eliminated.
|
||||
|
||||
4. The implementation is more direct; there is no "SyntaxX" variant of
|
||||
each rule as in 0.9. The ease to find definitions and change them
|
||||
weighs many times more than the abstraction attained by indirection,
|
||||
in this case. Also compilation time and amount of generated code (gfr)
|
||||
decreases quite a bit.
|
||||
|
||||
5. The result is a lighter and more efficient resource library, just
|
||||
because of lessons learned from earlier implementations.
|
||||
Compared to 0.9, compilation times and gfc sizes have dropped by
|
||||
50% up to 70%.
|
||||
|
||||
Version 0.9 is hereby "frozen" to its current state, which means that
|
||||
extensions and bug fixes are not carried over to it. However, if
|
||||
requested, we might provide a reimplementation of the old API using
|
||||
the new.
|
||||
|
||||
When will it be ready? Today (25 February 2006) the implementation
|
||||
is complete for 8 languages (which excludes Danish and Russian).
|
||||
A number of bugs wait to be fixes, and a SourceForge release will
|
||||
be made some time in March.
|
||||
|
||||
BUT WE ALREADY RECOMMEND USING 1.0 INSTEAD OF THE OLDER VERSIONS.
|
||||
Notice that GF v.
|
||||
|
||||
---------- later history and status:
|
||||
|
||||
16/6 Close to complete, with 10 languages and a substantial part of
|
||||
Arabic.
|
||||
|
||||
25/2 Added directories for precompiled libraries directly under lib.
|
||||
See doc/index.html for more information.
|
||||
|
||||
21/2 Added modules Text and Idiom. Many bugs fixed, see TODO.
|
||||
|
||||
7/2 Finnish added.
|
||||
|
||||
3/2 Spanish added, except ordinal numerals. Much remains to do in Spa & Ita clitics.
|
||||
|
||||
1/2 Italian added.
|
||||
|
||||
26/1 Norwegian added.
|
||||
|
||||
24/1 French complete, as well as the Romance parametrized modules.
|
||||
|
||||
20/1 Main difficulties of French and Romance implemented. Also
|
||||
ParadigmsFre and fragments of LangFre.
|
||||
|
||||
17/1 All of English, Swedish, and German implemented. Some known bugs
|
||||
remain, also some ToDo API functions.
|
||||
|
||||
13/1/2006 All of English, most of Scandinavian/Swedish, and TestGer
|
||||
have now been implemented. Most abstract/ modules have been documented
|
||||
using gfdoc.
|
||||
47
lib/resource-1.3/TODO
Normal file
47
lib/resource-1.3/TODO
Normal file
@@ -0,0 +1,47 @@
|
||||
TODO in Resource 1.0 implementation
|
||||
|
||||
6/2/2006
|
||||
|
||||
%Eng: non-contracted negations
|
||||
|
||||
%Eng: auxiliaries in standard API
|
||||
|
||||
%API: idiomatic expressions: ExistNP, ProgressiveVP, ImpersonalVP
|
||||
|
||||
%Spa: clitic order and changes
|
||||
|
||||
%Ita: clitic order and changes
|
||||
|
||||
%Ita: infinitive contractions
|
||||
|
||||
%Ita: articles in possessives
|
||||
|
||||
%Ger: constituents of infinitive VP
|
||||
|
||||
%Spa: ordinal numbers
|
||||
|
||||
%Nor: Ext: possessives
|
||||
|
||||
%Spa: zero subjects
|
||||
|
||||
%Ita: zero subjects
|
||||
|
||||
Fin: zero subjects
|
||||
|
||||
%Spa: verb constructors in Paradigms or list of irregular verbs
|
||||
|
||||
%Ita: verb constructors in Paradigms
|
||||
|
||||
API: mathematical/: math-specific lexicon
|
||||
|
||||
API: multimodal/: dialogue-specific lexicon
|
||||
|
||||
%API: swadesh/: build a swadesh-related API and migrate lexica
|
||||
|
||||
%API: mathematical/: symbolic formulas as Cl
|
||||
|
||||
%API: text construction
|
||||
|
||||
%All: punctuation
|
||||
|
||||
%API: apposition, e.g. Det -> CN -> [PN] -> NP
|
||||
30
lib/resource-1.3/abstract/Adjective.gf
Normal file
30
lib/resource-1.3/abstract/Adjective.gf
Normal file
@@ -0,0 +1,30 @@
|
||||
--1 Adjective: Adjectives and Adjectival Phrases
|
||||
|
||||
abstract Adjective = Cat ** {
|
||||
|
||||
fun
|
||||
|
||||
-- The principal ways of forming an adjectival phrase are
|
||||
-- positive, comparative, relational, reflexive-relational, and
|
||||
-- elliptic-relational.
|
||||
-- (The superlative use is covered in [Noun Noun.html].$SuperlA$.)
|
||||
|
||||
PositA : A -> AP ; -- warm
|
||||
ComparA : A -> NP -> AP ; -- warmer than Spain
|
||||
ComplA2 : A2 -> NP -> AP ; -- divisible by 2
|
||||
ReflA2 : A2 -> AP ; -- divisible by itself
|
||||
UseA2 : A2 -> A ; -- divisible
|
||||
|
||||
-- Sentence and question complements defined for all adjectival
|
||||
-- phrases, although the semantics is only clear for some adjectives.
|
||||
|
||||
SentAP : AP -> SC -> AP ; -- great that she won, uncertain if she did
|
||||
|
||||
-- An adjectival phrase can be modified by an *adadjective*, such as "very".
|
||||
|
||||
AdAP : AdA -> AP -> AP ; -- very uncertain
|
||||
|
||||
-- The formation of adverbs from adjective (e.g. "quickly") is covered
|
||||
-- by [Adverb Adverb.html].
|
||||
|
||||
}
|
||||
33
lib/resource-1.3/abstract/Adverb.gf
Normal file
33
lib/resource-1.3/abstract/Adverb.gf
Normal file
@@ -0,0 +1,33 @@
|
||||
--1 Adverb: Adverbs and Adverbial Phrases
|
||||
|
||||
abstract Adverb = Cat ** {
|
||||
|
||||
fun
|
||||
|
||||
-- The two main ways of forming adverbs are from adjectives and by
|
||||
-- prepositions from noun phrases.
|
||||
|
||||
PositAdvAdj : A -> Adv ; -- quickly
|
||||
PrepNP : Prep -> NP -> Adv ; -- in the house
|
||||
|
||||
-- Comparative adverbs have a noun phrase or a sentence as object of
|
||||
-- comparison.
|
||||
|
||||
ComparAdvAdj : CAdv -> A -> NP -> Adv ; -- more quickly than John
|
||||
ComparAdvAdjS : CAdv -> A -> S -> Adv ; -- more quickly than he runs
|
||||
|
||||
-- Adverbs can be modified by 'adadjectives', just like adjectives.
|
||||
|
||||
AdAdv : AdA -> Adv -> Adv ; -- very quickly
|
||||
|
||||
-- Subordinate clauses can function as adverbs.
|
||||
|
||||
SubjS : Subj -> S -> Adv ; -- when he arrives
|
||||
AdvSC : SC -> Adv ; -- that he arrives ---- REMOVE?
|
||||
|
||||
-- Comparison adverbs also work as numeral adverbs.
|
||||
|
||||
AdnCAdv : CAdv -> AdN ; -- more (than five)
|
||||
|
||||
|
||||
}
|
||||
130
lib/resource-1.3/abstract/Cat.gf
Normal file
130
lib/resource-1.3/abstract/Cat.gf
Normal file
@@ -0,0 +1,130 @@
|
||||
--1 Cat: the Category System
|
||||
|
||||
-- The category system is central to the library in the sense
|
||||
-- that the other modules ($Adjective$, $Adverb$, $Noun$, $Verb$ etc)
|
||||
-- communicate through it. This means that a e.g. a function using
|
||||
-- $NP$s in $Verb$ need not know how $NP$s are constructed in $Noun$:
|
||||
-- it is enough that both $Verb$ and $Noun$ use the same type $NP$,
|
||||
-- which is given here in $Cat$.
|
||||
--
|
||||
-- Some categories are inherited from [``Common`` Common.html].
|
||||
-- The reason they are defined there is that they have the same
|
||||
-- implementation in all languages in the resource (typically,
|
||||
-- just a string). These categories are
|
||||
-- $AdA, AdN, AdV, Adv, Ant, CAdv, IAdv, PConj, Phr$,
|
||||
-- $Pol, SC, Tense, Text, Utt, Voc$.
|
||||
--
|
||||
-- Moreover, the list categories $ListAdv, ListAP, ListNP, ListS$
|
||||
-- are defined on $Conjunction$ and only used locally there.
|
||||
|
||||
|
||||
abstract Cat = Common ** {
|
||||
|
||||
cat
|
||||
|
||||
--2 Sentences and clauses
|
||||
|
||||
-- Constructed in [Sentence Sentence.html], and also in
|
||||
-- [Idiom Idiom.html].
|
||||
|
||||
S ; -- declarative sentence e.g. "she lived here"
|
||||
QS ; -- question e.g. "where did she live"
|
||||
RS ; -- relative e.g. "in which she lived"
|
||||
Cl ; -- declarative clause, with all tenses e.g. "she looks at this"
|
||||
Slash ; -- clause missing NP (S/NP in GPSG) e.g. "she looks at"
|
||||
SlashS ;-- sentence missing NP e.g. "she has looked at"
|
||||
Imp ; -- imperative e.g. "look at this"
|
||||
|
||||
--2 Questions and interrogatives
|
||||
|
||||
-- Constructed in [Question Question.html].
|
||||
|
||||
QCl ; -- question clause, with all tenses e.g. "why does she walk"
|
||||
IP ; -- interrogative pronoun e.g. "who"
|
||||
IComp ; -- interrogative complement of copula e.g. "where"
|
||||
IDet ; -- interrogative determiner e.g. "which"
|
||||
|
||||
--2 Relative clauses and pronouns
|
||||
|
||||
-- Constructed in [Relative Relative.html].
|
||||
|
||||
RCl ; -- relative clause, with all tenses e.g. "in which she lives"
|
||||
RP ; -- relative pronoun e.g. "in which"
|
||||
|
||||
--2 Verb phrases
|
||||
|
||||
-- Constructed in [Verb Verb.html].
|
||||
|
||||
VP ; -- verb phrase e.g. "is very warm"
|
||||
Comp ; -- complement of copula, such as AP e.g. "very warm"
|
||||
|
||||
--2 Adjectival phrases
|
||||
|
||||
-- Constructed in [Adjective Adjective.html].
|
||||
|
||||
AP ; -- adjectival phrase e.g. "very warm"
|
||||
|
||||
--2 Nouns and noun phrases
|
||||
|
||||
-- Constructed in [Noun Noun.html].
|
||||
-- Many atomic noun phrases e.g. "everybody"
|
||||
-- are constructed in [Structural Structural.html].
|
||||
-- The determiner structure is
|
||||
-- ``` Predet (QuantSg | QuantPl Num) Ord
|
||||
-- as defined in [Noun Noun.html].
|
||||
|
||||
CN ; -- common noun (without determiner) e.g. "red house"
|
||||
NP ; -- noun phrase (subject or object) e.g. "the red house"
|
||||
Pron ; -- personal pronoun e.g. "she"
|
||||
Det ; -- determiner phrase e.g. "those seven"
|
||||
Predet ; -- predeterminer (prefixed Quant) e.g. "all"
|
||||
Quant ; -- quantifier ('nucleus' of Det) e.g. "this/these"
|
||||
Num ; -- cardinal number (used with QuantPl) e.g. "seven"
|
||||
Ord ; -- ordinal number (used in Det) e.g. "seventh"
|
||||
|
||||
--2 Numerals
|
||||
|
||||
-- Constructed in [Numeral Numeral.html].
|
||||
|
||||
Numeral ; -- cardinal or ordinal in words e.g. "five/fifth"
|
||||
Digits ; -- cardinal or ordinal in digits e.g. "1,000/1,000th"
|
||||
|
||||
--2 Structural words
|
||||
|
||||
-- Constructed in [Structural Structural.html].
|
||||
|
||||
Conj ; -- conjunction e.g. "and"
|
||||
DConj ; -- distributed conjunction e.g. "both - and"
|
||||
Subj ; -- subjunction e.g. "if"
|
||||
Prep ; -- preposition, or just case e.g. "in"
|
||||
|
||||
--2 Words of open classes
|
||||
|
||||
-- These are constructed in [Lexicon Lexicon.html] and in
|
||||
-- additional lexicon modules.
|
||||
|
||||
V ; -- one-place verb e.g. "sleep"
|
||||
V2 ; -- two-place verb e.g. "love"
|
||||
V3 ; -- three-place verb e.g. "show"
|
||||
VV ; -- verb-phrase-complement verb e.g. "want"
|
||||
VS ; -- sentence-complement verb e.g. "claim"
|
||||
VQ ; -- question-complement verb e.g. "wonder"
|
||||
VA ; -- adjective-complement verb e.g. "look"
|
||||
V2V ; -- verb with NP and V complement e.g. "cause"
|
||||
V2S ; -- verb with NP and S complement e.g. "tell"
|
||||
V2Q ; -- verb with NP and Q complement e.g. "ask"
|
||||
V2A ; -- verb with NP and AP complement e.g. "paint"
|
||||
|
||||
A ; -- one-place adjective e.g. "warm"
|
||||
A2 ; -- two-place adjective e.g. "divisible"
|
||||
|
||||
N ; -- common noun e.g. "house"
|
||||
N2 ; -- relational noun e.g. "son"
|
||||
N3 ; -- three-place relational noun e.g. "connection"
|
||||
PN ; -- proper name e.g. "Paris"
|
||||
|
||||
-- DEPRECATED: QuantSg, QuantPl
|
||||
--- QuantSg ;-- quantifier ('nucleus' of sing. Det) e.g. "every"
|
||||
--- QuantPl ;-- quantifier ('nucleus' of plur. Det) e.g. "many"
|
||||
|
||||
}
|
||||
61
lib/resource-1.3/abstract/Common.gf
Normal file
61
lib/resource-1.3/abstract/Common.gf
Normal file
@@ -0,0 +1,61 @@
|
||||
--1 Common: Structures with Common Implementations.
|
||||
|
||||
-- This module defines the categories that uniformly have the linearization
|
||||
-- ${s : Str}$ in all languages.
|
||||
|
||||
-- Moreover, this module defines the abstract parameters of tense, polarity, and
|
||||
-- anteriority, which are used in [``Phrase`` Phrase.html] to generate different
|
||||
-- forms of sentences. Together they give 4 x 2 x 2 = 16 sentence forms.
|
||||
|
||||
-- These tenses are defined for all languages in the library. More tenses
|
||||
-- can be defined in the language extensions, e.g. the "passé simple" of
|
||||
-- Romance languages in [``ExtraRomance`` ../romance/ExtraRomance.gf].
|
||||
|
||||
abstract Common = {
|
||||
|
||||
cat
|
||||
|
||||
--2 Top-level units
|
||||
|
||||
-- Constructed in [``Text`` Text.html]: $Text$.
|
||||
|
||||
Text ; -- text consisting of several phrases e.g. "He is here. Why?"
|
||||
|
||||
-- Constructed in [``Phrase`` Phrase.html]:
|
||||
|
||||
Phr ; -- phrase in a text e.g. "but be quiet please"
|
||||
Utt ; -- sentence, question, word... e.g. "be quiet"
|
||||
Voc ; -- vocative or "please" e.g. "my darling"
|
||||
PConj ; -- phrase-beginning conjunction e.g. "therefore"
|
||||
|
||||
-- Constructed in [``Sentence`` Sentence.html]:
|
||||
|
||||
SC ; -- embedded sentence or question e.g. "that it rains"
|
||||
|
||||
--2 Adverbs
|
||||
|
||||
-- Constructed in [``Adverb`` Adverb.html].
|
||||
-- Many adverbs are constructed in [``Structural`` Structural.html].
|
||||
|
||||
Adv ; -- verb-phrase-modifying adverb e.g. "in the house"
|
||||
AdV ; -- adverb directly attached to verb e.g. "always"
|
||||
AdA ; -- adjective-modifying adverb e.g. "very"
|
||||
AdN ; -- numeral-modifying adverb e.g. "more than"
|
||||
IAdv ; -- interrogative adverb e.g. "why"
|
||||
CAdv ; -- comparative adverb e.g. "more"
|
||||
|
||||
--2 Tense, polarity, and anteriority
|
||||
|
||||
Tense ; -- tense e.g. present, past, future
|
||||
Pol ; -- polarity e.g. positive, negative
|
||||
Ant ; -- anteriority e.g. simultaneous, anterior
|
||||
|
||||
fun
|
||||
PPos, PNeg : Pol ; -- I sleep/don't sleep
|
||||
|
||||
TPres : Tense ;
|
||||
ASimul : Ant ;
|
||||
TPast, TFut, TCond : Tense ; -- I slept/will sleep/would sleep --# notpresent
|
||||
AAnter : Ant ; -- I have slept --# notpresent
|
||||
|
||||
}
|
||||
52
lib/resource-1.3/abstract/Conjunction.gf
Normal file
52
lib/resource-1.3/abstract/Conjunction.gf
Normal file
@@ -0,0 +1,52 @@
|
||||
--1 Conjunction: Coordination
|
||||
|
||||
-- Coordination is defined for many different categories; here is
|
||||
-- a sample. The rules apply to *lists* of two or more elements,
|
||||
-- and define two general patterns:
|
||||
-- - ordinary conjunction: X,...X and X
|
||||
-- - distributed conjunction: both X,...,X and X
|
||||
--
|
||||
--
|
||||
-- $VP$ conjunctions are not covered here, because their applicability
|
||||
-- depends on language. Some special cases are defined in
|
||||
-- [``Extra`` ../abstract/Extra.gf].
|
||||
|
||||
|
||||
abstract Conjunction = Cat ** {
|
||||
|
||||
--2 Rules
|
||||
|
||||
fun
|
||||
ConjS : Conj -> [S] -> S ; -- "John walks and Mary runs"
|
||||
ConjAP : Conj -> [AP] -> AP ; -- "even and prime"
|
||||
ConjNP : Conj -> [NP] -> NP ; -- "John or Mary"
|
||||
ConjAdv : Conj -> [Adv] -> Adv ; -- "quickly or slowly"
|
||||
|
||||
DConjS : DConj -> [S] -> S ; -- "either John walks or Mary runs"
|
||||
DConjAP : DConj -> [AP] -> AP ; -- "both even and prime"
|
||||
DConjNP : DConj -> [NP] -> NP ; -- "either John or Mary"
|
||||
DConjAdv : DConj -> [Adv] -> Adv; -- "both badly and slowly"
|
||||
|
||||
--2 Categories
|
||||
|
||||
-- These categories are only used in this module.
|
||||
|
||||
cat
|
||||
[S]{2} ;
|
||||
[Adv]{2} ;
|
||||
[NP]{2} ;
|
||||
[AP]{2} ;
|
||||
|
||||
--2 List constructors
|
||||
|
||||
-- The list constructors are derived from the list notation and therefore
|
||||
-- not given explicitly. But here are their type signatures:
|
||||
|
||||
-- BaseC : C -> C -> [C] ; -- for C = S, AP, NP, Adv
|
||||
-- ConsC : C -> [C] -> [C] ;
|
||||
}
|
||||
|
||||
--.
|
||||
-- *Note*. This module uses right-recursive lists. If backward
|
||||
-- compatibility with API 0.9 is needed, use
|
||||
-- [SeqConjunction SeqConjunction.html].
|
||||
30
lib/resource-1.3/abstract/Extra.gf
Normal file
30
lib/resource-1.3/abstract/Extra.gf
Normal file
@@ -0,0 +1,30 @@
|
||||
--1 More syntax rules
|
||||
|
||||
-- This module defines syntax rules that are not implemented in all
|
||||
-- languages, but in more than one, so that it makes sense to offer a
|
||||
-- common API.
|
||||
|
||||
abstract Extra = Cat ** {
|
||||
|
||||
fun
|
||||
GenNP : NP -> Quant ; -- this man's
|
||||
ComplBareVS : VS -> S -> VP ; -- know you go
|
||||
|
||||
StrandRelSlash : RP -> Slash -> RCl ; -- that he lives in
|
||||
EmptyRelSlash : RP -> Slash -> RCl ; -- he lives in
|
||||
StrandQuestSlash : IP -> Slash -> QCl ; -- whom does John live with
|
||||
|
||||
-- $VP$ conjunction, which has different fragments implemented in
|
||||
-- different languages - never a full $VP$, though.
|
||||
|
||||
cat
|
||||
VPI ;
|
||||
[VPI] {2} ;
|
||||
|
||||
fun
|
||||
MkVPI : VP -> VPI ;
|
||||
ConjVPI : Conj -> [VPI] -> VPI ;
|
||||
ComplVPIVV : VV -> VPI -> VP ;
|
||||
|
||||
|
||||
}
|
||||
22
lib/resource-1.3/abstract/Grammar.gf
Normal file
22
lib/resource-1.3/abstract/Grammar.gf
Normal file
@@ -0,0 +1,22 @@
|
||||
--1 Grammar: the Main Module of the Resource Grammar
|
||||
|
||||
-- This grammar is a collection of the different grammar modules,
|
||||
-- To test the resource, import [``Lang`` Lang.html], which also contains
|
||||
-- a lexicon.
|
||||
|
||||
abstract Grammar =
|
||||
Noun,
|
||||
Verb,
|
||||
Adjective,
|
||||
Adverb,
|
||||
Numeral,
|
||||
Sentence,
|
||||
Question,
|
||||
Relative,
|
||||
Conjunction,
|
||||
Phrase,
|
||||
Text,
|
||||
Structural,
|
||||
Idiom ;
|
||||
|
||||
|
||||
22
lib/resource-1.3/abstract/Idiom.gf
Normal file
22
lib/resource-1.3/abstract/Idiom.gf
Normal file
@@ -0,0 +1,22 @@
|
||||
--1 Idiom: Idiomatic Expressions
|
||||
|
||||
abstract Idiom = Cat ** {
|
||||
|
||||
-- This module defines constructions that are formed in fixed ways,
|
||||
-- often different even in closely related languages.
|
||||
|
||||
fun
|
||||
ImpersCl : VP -> Cl ; -- it rains
|
||||
GenericCl : VP -> Cl ; -- one sleeps
|
||||
|
||||
CleftNP : NP -> RS -> Cl ; -- it is you who did it
|
||||
CleftAdv : Adv -> S -> Cl ; -- it is yesterday she arrived
|
||||
|
||||
ExistNP : NP -> Cl ; -- there is a house
|
||||
ExistIP : IP -> QCl ; -- which houses are there
|
||||
|
||||
ProgrVP : VP -> VP ; -- be sleeping
|
||||
|
||||
ImpPl1 : VP -> Utt ; -- let's go
|
||||
|
||||
}
|
||||
13
lib/resource-1.3/abstract/Lang.gf
Normal file
13
lib/resource-1.3/abstract/Lang.gf
Normal file
@@ -0,0 +1,13 @@
|
||||
--1 Lang: a Test Module for the Resource Grammar
|
||||
|
||||
-- This grammar is for testing the resource as included in the
|
||||
-- language-independent API, consisting of a grammar and a lexicon.
|
||||
-- The grammar without a lexicon is [``Grammar`` Grammar.html],
|
||||
-- which may be more suitable to open in applications.
|
||||
|
||||
abstract Lang =
|
||||
Grammar,
|
||||
Lexicon
|
||||
** {
|
||||
flags startcat=Phr ;
|
||||
} ;
|
||||
356
lib/resource-1.3/abstract/Lexicon.gf
Normal file
356
lib/resource-1.3/abstract/Lexicon.gf
Normal file
@@ -0,0 +1,356 @@
|
||||
abstract Lexicon = Cat ** {
|
||||
fun
|
||||
add_V3 : V3 ;
|
||||
airplane_N : N ;
|
||||
already_Adv : Adv ;
|
||||
animal_N : N ;
|
||||
answer_V2S : V2S ;
|
||||
apartment_N : N ;
|
||||
apple_N : N ;
|
||||
art_N : N ;
|
||||
ashes_N : N ;
|
||||
ask_V2Q : V2Q ;
|
||||
baby_N : N ;
|
||||
back_N : N ;
|
||||
bad_A : A ;
|
||||
bank_N : N ;
|
||||
bark_N : N ;
|
||||
beautiful_A : A ;
|
||||
become_VA : VA ;
|
||||
beer_N : N ;
|
||||
beg_V2V : V2V ;
|
||||
belly_N : N ;
|
||||
big_A : A ;
|
||||
bike_N : N ;
|
||||
bird_N : N ;
|
||||
bite_V2 : V2 ;
|
||||
black_A : A ;
|
||||
blood_N : N ;
|
||||
blow_V : V ;
|
||||
blue_A : A ;
|
||||
boat_N : N ;
|
||||
bone_N : N ;
|
||||
book_N : N ;
|
||||
boot_N : N ;
|
||||
boss_N : N ;
|
||||
boy_N : N ;
|
||||
bread_N : N ;
|
||||
break_V2 : V2 ;
|
||||
breast_N : N ;
|
||||
breathe_V : V ;
|
||||
broad_A : A ;
|
||||
brother_N2 : N2 ;
|
||||
brown_A : A ;
|
||||
burn_V : V ;
|
||||
butter_N : N ;
|
||||
buy_V2 : V2 ;
|
||||
camera_N : N ;
|
||||
cap_N : N ;
|
||||
car_N : N ;
|
||||
carpet_N : N ;
|
||||
cat_N : N ;
|
||||
ceiling_N : N ;
|
||||
chair_N : N ;
|
||||
cheese_N : N ;
|
||||
child_N : N ;
|
||||
church_N : N ;
|
||||
city_N : N ;
|
||||
clean_A : A ;
|
||||
clever_A : A ;
|
||||
close_V2 : V2 ;
|
||||
cloud_N : N ;
|
||||
coat_N : N ;
|
||||
cold_A : A ;
|
||||
come_V : V ;
|
||||
computer_N : N ;
|
||||
correct_A : A ;
|
||||
country_N : N ;
|
||||
count_V2 : V2 ;
|
||||
cousin_N : N ;
|
||||
cow_N : N ;
|
||||
cut_V2 : V2 ;
|
||||
day_N : N ;
|
||||
die_V : V ;
|
||||
dig_V : V ;
|
||||
dirty_A : A ;
|
||||
distance_N3 : N3 ;
|
||||
doctor_N : N ;
|
||||
dog_N : N ;
|
||||
door_N : N ;
|
||||
do_V2 : V2 ;
|
||||
drink_V2 : V2 ;
|
||||
drink_V2 : V2 ;
|
||||
dry_A : A ;
|
||||
dull_A : A ;
|
||||
dust_N : N ;
|
||||
ear_N : N ;
|
||||
earth_N : N ;
|
||||
easy_A2V : A2 ;
|
||||
eat_V2 : V2 ;
|
||||
eat_V2 : V2 ;
|
||||
egg_N : N ;
|
||||
empty_A : A ;
|
||||
enemy_N : N ;
|
||||
eye_N : N ;
|
||||
factory_N : N ;
|
||||
fall_V : V ;
|
||||
far_Adv : Adv ;
|
||||
father_N2 : N2 ;
|
||||
fat_N : N ;
|
||||
fear_VS : VS ;
|
||||
fear_V2 : V2 ;
|
||||
feather_N : N ;
|
||||
fight_V2 : V2 ;
|
||||
find_V2 : V2 ;
|
||||
fingernail_N : N ;
|
||||
fire_N : N ;
|
||||
fish_N : N ;
|
||||
float_V : V ;
|
||||
floor_N : N ;
|
||||
flower_N : N ;
|
||||
flow_V : V ;
|
||||
fly_V : V ;
|
||||
fog_N : N ;
|
||||
foot_N : N ;
|
||||
forest_N : N ;
|
||||
forget_V2 : V2 ;
|
||||
freeze_V : V ;
|
||||
fridge_N : N ;
|
||||
friend_N : N ;
|
||||
fruit_N : N ;
|
||||
full_A : A ;
|
||||
fun
|
||||
fun_AV : A ;
|
||||
garden_N : N ;
|
||||
girl_N : N ;
|
||||
give_V3 : V3 ;
|
||||
glove_N : N ;
|
||||
gold_N : N ;
|
||||
good_A : A ;
|
||||
go_V : V ;
|
||||
grammar_N : N ;
|
||||
grass_N : N ;
|
||||
green_A : A ;
|
||||
guts_N : N ;
|
||||
hair_N : N ;
|
||||
hand_N : N ;
|
||||
harbour_N : N ;
|
||||
hate_V2 : V2 ;
|
||||
hat_N : N ;
|
||||
have_V2 : V2 ;
|
||||
head_N : N ;
|
||||
heart_N : N ;
|
||||
hear_V2 : V2 ;
|
||||
hear_V2 : V2 ;
|
||||
heavy_A : A ;
|
||||
hill_N : N ;
|
||||
hit_V2 : V2 ;
|
||||
hold_V2 : V2 ;
|
||||
hope_VS : VS ;
|
||||
horn_N : N ;
|
||||
horse_N : N ;
|
||||
hot_A : A ;
|
||||
house_N : N ;
|
||||
hunt_V2 : V2 ;
|
||||
husband_N : N ;
|
||||
ice_N : N ;
|
||||
important_A : A ;
|
||||
industry_N : N ;
|
||||
iron_N : N ;
|
||||
john_PN : PN ;
|
||||
jump_V : V ;
|
||||
kill_V2 : V2 ;
|
||||
king_N : N ;
|
||||
knee_N : N ;
|
||||
know_V2 : V2 ;
|
||||
know_V2 : V2 ;
|
||||
lake_N : N ;
|
||||
lamp_N : N ;
|
||||
language_N : N ;
|
||||
laugh_V : V ;
|
||||
leaf_N : N ;
|
||||
learn_V2 : V2 ;
|
||||
leather_N : N ;
|
||||
leave_V2 : V2 ;
|
||||
left_Ord : Ord ;
|
||||
leg_N : N ;
|
||||
lie_V : V ;
|
||||
like_V2 : V2 ;
|
||||
listen_V2 : V2 ;
|
||||
liver_N : N ;
|
||||
live_V : V ;
|
||||
long_A : A ;
|
||||
lose_V2 : V2 ;
|
||||
louse_N : N ;
|
||||
love_N : N ;
|
||||
love_V2 : V2 ;
|
||||
man_N : N ;
|
||||
married_A2 : A2 ;
|
||||
meat_N : N ;
|
||||
milk_N : N ;
|
||||
moon_N : N ;
|
||||
mother_N2 : N2 ;
|
||||
mountain_N : N ;
|
||||
mouth_N : N ;
|
||||
music_N : N ;
|
||||
name_N : N ;
|
||||
narrow_A : A ;
|
||||
near_A : A ;
|
||||
neck_N : N ;
|
||||
new_A : A ;
|
||||
newspaper_N : N ;
|
||||
night_N : N ;
|
||||
nose_N : N ;
|
||||
now_Adv : Adv ;
|
||||
number_N : N ;
|
||||
oil_N : N ;
|
||||
old_A : A ;
|
||||
open_V2 : V2 ;
|
||||
paint_V2A : V2A ;
|
||||
paper_N : N ;
|
||||
paris_PN : PN ;
|
||||
peace_N : N ;
|
||||
pen_N : N ;
|
||||
person_N : N ;
|
||||
planet_N : N ;
|
||||
plastic_N : N ;
|
||||
play_V2 : V2 ;
|
||||
play_V : V ;
|
||||
policeman_N : N ;
|
||||
priest_N : N ;
|
||||
probable_AS : A ;
|
||||
pull_V2 : V2 ;
|
||||
push_V2 : V2 ;
|
||||
put_V2 : V2 ;
|
||||
queen_N : N ;
|
||||
question_N : N ;
|
||||
radio_N : N ;
|
||||
rain_N : N ;
|
||||
rain_V0 : V ;
|
||||
read_V2 : V2 ;
|
||||
ready_A : A ;
|
||||
reason_N : N ;
|
||||
red_A : A ;
|
||||
religion_N : N ;
|
||||
restaurant_N : N ;
|
||||
right_Ord : Ord ;
|
||||
river_N : N ;
|
||||
road_N : N ;
|
||||
rock_N : N ;
|
||||
roof_N : N ;
|
||||
root_N : N ;
|
||||
rope_N : N ;
|
||||
rotten_A : A ;
|
||||
round_A : A ;
|
||||
rubber_N : N ;
|
||||
rub_V2 : V2 ;
|
||||
rule_N : N ;
|
||||
run_V : V ;
|
||||
salt_N : N ;
|
||||
sand_N : N ;
|
||||
say_VS : VS ;
|
||||
school_N : N ;
|
||||
science_N : N ;
|
||||
scratch_V2 : V2 ;
|
||||
sea_N : N ;
|
||||
seed_N : N ;
|
||||
seek_V2 : V2 ;
|
||||
see_V2 : V2 ;
|
||||
see_V2 : V2 ;
|
||||
sell_V3 : V3 ;
|
||||
send_V3 : V3 ;
|
||||
sew_V : V ;
|
||||
sharp_A : A ;
|
||||
sheep_N : N ;
|
||||
ship_N : N ;
|
||||
shirt_N : N ;
|
||||
shoe_N : N ;
|
||||
shop_N : N ;
|
||||
short_A : A ;
|
||||
silver_N : N ;
|
||||
sing_V : V ;
|
||||
sister_N : N ;
|
||||
sit_V : V ;
|
||||
skin_N : N ;
|
||||
sky_N : N ;
|
||||
sleep_V : V ;
|
||||
small_A : A ;
|
||||
smell_V : V ;
|
||||
smoke_N : N ;
|
||||
smooth_A : A ;
|
||||
snake_N : N ;
|
||||
snow_N : N ;
|
||||
sock_N : N ;
|
||||
song_N : N ;
|
||||
speak_V2 : V2 ;
|
||||
spit_V : V ;
|
||||
split_V2 : V2 ;
|
||||
squeeze_V2 : V2 ;
|
||||
stab_V2 : V2 ;
|
||||
stand_V : V ;
|
||||
star_N : N ;
|
||||
steel_N : N ;
|
||||
stick_N : N ;
|
||||
stone_N : N ;
|
||||
stop_V : V ;
|
||||
stove_N : N ;
|
||||
straight_A : A ;
|
||||
student_N : N ;
|
||||
stupid_A : A ;
|
||||
suck_V2 : V2 ;
|
||||
sun_N : N ;
|
||||
swell_V : V ;
|
||||
swim_V : V ;
|
||||
switch8off_V2 : V2 ;
|
||||
switch8on_V2 : V2 ;
|
||||
table_N : N ;
|
||||
tail_N : N ;
|
||||
talk_V3 : V3 ;
|
||||
teacher_N : N ;
|
||||
teach_V2 : V2 ;
|
||||
television_N : N ;
|
||||
thick_A : A ;
|
||||
thin_A : A ;
|
||||
think_V : V ;
|
||||
throw_V2 : V2 ;
|
||||
tie_V2 : V2 ;
|
||||
today_Adv : Adv ;
|
||||
tongue_N : N ;
|
||||
tooth_N : N ;
|
||||
train_N : N ;
|
||||
travel_V : V ;
|
||||
tree_N : N ;
|
||||
turn_V : V ;
|
||||
ugly_A : A ;
|
||||
uncertain_A : A ;
|
||||
understand_V2 : V2 ;
|
||||
university_N : N ;
|
||||
village_N : N ;
|
||||
vomit_V : V ;
|
||||
wait_V2 : V2 ;
|
||||
walk_V : V ;
|
||||
warm_A : A ;
|
||||
war_N : N ;
|
||||
wash_V2 : V2 ;
|
||||
watch_V2 : V2 ;
|
||||
water_N : N ;
|
||||
wet_A : A ;
|
||||
white_A : A ;
|
||||
wide_A : A ;
|
||||
wife_N : N ;
|
||||
wind_N : N ;
|
||||
window_N : N ;
|
||||
wine_N : N ;
|
||||
wing_N : N ;
|
||||
win_V2 : V2 ;
|
||||
wipe_V2 : V2 ;
|
||||
woman_N : N ;
|
||||
wonder_VQ : VQ ;
|
||||
wood_N : N ;
|
||||
worm_N : N ;
|
||||
write_V2 : V2 ;
|
||||
year_N : N ;
|
||||
yellow_A : A ;
|
||||
young_A : A ;
|
||||
|
||||
}
|
||||
140
lib/resource-1.3/abstract/Noun.gf
Normal file
140
lib/resource-1.3/abstract/Noun.gf
Normal file
@@ -0,0 +1,140 @@
|
||||
--1 Noun: Nouns, noun phrases, and determiners
|
||||
|
||||
abstract Noun = Cat ** {
|
||||
|
||||
--2 Noun phrases
|
||||
|
||||
-- The three main types of noun phrases are
|
||||
-- - common nouns with determiners
|
||||
-- - proper names
|
||||
-- - pronouns
|
||||
--
|
||||
--
|
||||
fun
|
||||
DetCN : Det -> CN -> NP ; -- the man
|
||||
UsePN : PN -> NP ; -- John
|
||||
UsePron : Pron -> NP ; -- he
|
||||
|
||||
-- Pronouns are defined in the module [``Structural`` Structural.html].
|
||||
|
||||
-- A noun phrase already formed can be modified by a $Predet$erminer.
|
||||
|
||||
PredetNP : Predet -> NP -> NP; -- only the man
|
||||
|
||||
-- A noun phrase can also be postmodified by the past participle of a
|
||||
-- verb or by an adverb.
|
||||
|
||||
PPartNP : NP -> V2 -> NP ; -- the number squared
|
||||
AdvNP : NP -> Adv -> NP ; -- Paris at midnight
|
||||
|
||||
--2 Determiners
|
||||
|
||||
-- The determiner has a fine-grained structure, in which a 'nucleus'
|
||||
-- quantifier and two optional parts can be discerned.
|
||||
-- The cardinal numeral is only available for plural determiners.
|
||||
-- (This is modified from CLE by further dividing their $Num$ into
|
||||
-- cardinal and ordinal.)
|
||||
|
||||
DetSg : Quant -> Ord -> Det ; -- this best man
|
||||
DetPl : Quant -> Num -> Ord -> Det ; -- these five best men
|
||||
|
||||
-- Notice that $DetPl$ can still result in a singular determiner, because
|
||||
-- "one" is a numeral: "this one man".
|
||||
|
||||
-- Quantifiers that have both forms can be used in both ways.
|
||||
|
||||
--- DEPRECATED: no longer needed
|
||||
--- SgQuant : Quant -> QuantSg ; -- this
|
||||
--- PlQuant : Quant -> QuantPl ; -- these
|
||||
|
||||
-- Pronouns have possessive forms. Genitives of other kinds
|
||||
-- of noun phrases are not given here, since they are not possible
|
||||
-- in e.g. Romance languages. They can be found in
|
||||
-- [``Extra`` ../abstract/Extra.gf].
|
||||
|
||||
PossPron : Pron -> Quant ; -- my (house)
|
||||
|
||||
-- All parts of the determiner can be empty, except $Quant$, which is
|
||||
-- the "kernel" of a determiner.
|
||||
|
||||
NoNum : Num ;
|
||||
NoOrd : Ord ;
|
||||
|
||||
-- $Num$ consists of either digits or numeral words.
|
||||
|
||||
NumInt : Int -> Num ; -- 51 (DEPRECATED)
|
||||
NumDigits : Digits -> Num ; -- 51
|
||||
NumNumeral : Numeral -> Num ; -- fifty-one
|
||||
|
||||
-- The construction of numerals is defined in [Numeral Numeral.html].
|
||||
|
||||
-- $Num$ can be modified by certain adverbs.
|
||||
|
||||
AdNum : AdN -> Num -> Num ; -- almost 51
|
||||
|
||||
-- $Ord$ consists of either digits or numeral words.
|
||||
|
||||
OrdInt : Int -> Ord ; -- 51st (DEPRECATED)
|
||||
OrdDigits : Digits -> Ord ; -- 51st
|
||||
OrdNumeral : Numeral -> Ord ; -- fifty-first
|
||||
|
||||
-- Superlative forms of adjectives behave syntactically in the same way as
|
||||
-- ordinals.
|
||||
|
||||
OrdSuperl : A -> Ord ; -- largest
|
||||
|
||||
-- Definite and indefinite constructions are sometimes realized as
|
||||
-- neatly distinct words (Spanish "un, unos ; el, los") but also without
|
||||
-- any particular word (Finnish; Swedish definites).
|
||||
|
||||
DefArt : Quant ; -- the (house), the (houses)
|
||||
IndefArt : Quant ; -- a (house), (houses)
|
||||
|
||||
-- Nouns can be used without an article as mass nouns. The resource does
|
||||
-- not distinguish mass nouns from other common nouns, which can result
|
||||
-- in semantically odd expressions.
|
||||
|
||||
MassDet : Quant ; -- (beer)
|
||||
|
||||
-- Other determiners are defined in [Structural Structural.html].
|
||||
|
||||
|
||||
|
||||
--2 Common nouns
|
||||
|
||||
-- Simple nouns can be used as nouns outright.
|
||||
|
||||
UseN : N -> CN ; -- house
|
||||
|
||||
-- Relational nouns take one or two arguments.
|
||||
|
||||
ComplN2 : N2 -> NP -> CN ; -- son of the king
|
||||
ComplN3 : N3 -> NP -> N2 ; -- flight from Moscow (to Paris)
|
||||
|
||||
-- Relational nouns can also be used without their arguments.
|
||||
-- The semantics is typically derivative of the relational meaning.
|
||||
|
||||
UseN2 : N2 -> CN ; -- son
|
||||
UseN3 : N3 -> CN ; -- flight
|
||||
|
||||
-- Nouns can be modified by adjectives, relative clauses, and adverbs
|
||||
-- (the last rule will give rise to many 'PP attachment' ambiguities
|
||||
-- when used in connection with verb phrases).
|
||||
|
||||
AdjCN : AP -> CN -> CN ; -- big house
|
||||
RelCN : CN -> RS -> CN ; -- house that John owns
|
||||
AdvCN : CN -> Adv -> CN ; -- house on the hill
|
||||
|
||||
-- Nouns can also be modified by embedded sentences and questions.
|
||||
-- For some nouns this makes little sense, but we leave this for applications
|
||||
-- to decide. Sentential complements are defined in [Verb Verb.html].
|
||||
|
||||
SentCN : CN -> SC -> CN ; -- fact that John smokes, question if he does
|
||||
|
||||
--2 Apposition
|
||||
|
||||
-- This is certainly overgenerating.
|
||||
|
||||
ApposCN : CN -> NP -> CN ; -- number x, numbers x and y
|
||||
|
||||
} ;
|
||||
60
lib/resource-1.3/abstract/Numeral.gf
Normal file
60
lib/resource-1.3/abstract/Numeral.gf
Normal file
@@ -0,0 +1,60 @@
|
||||
--1 Numerals
|
||||
|
||||
-- This grammar defines numerals from 1 to 999999.
|
||||
-- The implementations are adapted from the
|
||||
-- [numerals library http://www.cs.chalmers.se/~aarne/GF/examples/numerals/]
|
||||
-- which defines numerals for 88 languages.
|
||||
-- The resource grammar implementations add to this inflection (if needed)
|
||||
-- and ordinal numbers.
|
||||
--
|
||||
-- *Note* 1. Number 1 as defined
|
||||
-- in the category $Numeral$ here should not be used in the formation of
|
||||
-- noun phrases, and should therefore be removed. Instead, one should use
|
||||
-- [Structural Structural.html]$.one_Quant$. This makes the grammar simpler
|
||||
-- because we can assume that numbers form plural noun phrases.
|
||||
--
|
||||
-- *Note* 2. The implementations introduce spaces between
|
||||
-- parts of a numeral, which is often incorrect - more work on
|
||||
-- (un)lexing is needed to solve this problem.
|
||||
|
||||
abstract Numeral = Cat ** {
|
||||
|
||||
cat
|
||||
Digit ; -- 2..9
|
||||
Sub10 ; -- 1..9
|
||||
Sub100 ; -- 1..99
|
||||
Sub1000 ; -- 1..999
|
||||
Sub1000000 ; -- 1..999999
|
||||
|
||||
fun
|
||||
num : Sub1000000 -> Numeral ;
|
||||
|
||||
n2, n3, n4, n5, n6, n7, n8, n9 : Digit ;
|
||||
|
||||
pot01 : Sub10 ; -- 1
|
||||
pot0 : Digit -> Sub10 ; -- d * 1
|
||||
pot110 : Sub100 ; -- 10
|
||||
pot111 : Sub100 ; -- 11
|
||||
pot1to19 : Digit -> Sub100 ; -- 10 + d
|
||||
pot0as1 : Sub10 -> Sub100 ; -- coercion of 1..9
|
||||
pot1 : Digit -> Sub100 ; -- d * 10
|
||||
pot1plus : Digit -> Sub10 -> Sub100 ; -- d * 10 + n
|
||||
pot1as2 : Sub100 -> Sub1000 ; -- coercion of 1..99
|
||||
pot2 : Sub10 -> Sub1000 ; -- m * 100
|
||||
pot2plus : Sub10 -> Sub100 -> Sub1000 ; -- m * 100 + n
|
||||
pot2as3 : Sub1000 -> Sub1000000 ; -- coercion of 1..999
|
||||
pot3 : Sub1000 -> Sub1000000 ; -- m * 1000
|
||||
pot3plus : Sub1000 -> Sub1000 -> Sub1000000 ; -- m * 1000 + n
|
||||
|
||||
-- Numerals as sequences of digits have a separate, simpler grammar
|
||||
|
||||
cat
|
||||
Dig ;
|
||||
|
||||
fun
|
||||
IDig : Dig -> Digits ;
|
||||
IIDig : Dig -> Digits -> Digits ;
|
||||
|
||||
D_0, D_1, D_2, D_3, D_4, D_5, D_6, D_7, D_8, D_9 : Dig ;
|
||||
|
||||
}
|
||||
44
lib/resource-1.3/abstract/Phrase.gf
Normal file
44
lib/resource-1.3/abstract/Phrase.gf
Normal file
@@ -0,0 +1,44 @@
|
||||
--1 Phrase: Phrases and Utterances
|
||||
|
||||
abstract Phrase = Cat ** {
|
||||
|
||||
-- When a phrase is built from an utterance it can be prefixed
|
||||
-- with a phrasal conjunction (such as "but", "therefore")
|
||||
-- and suffixing with a vocative (typically a noun phrase).
|
||||
|
||||
fun
|
||||
PhrUtt : PConj -> Utt -> Voc -> Phr ; -- But go home my friend.
|
||||
|
||||
-- Utterances are formed from sentences, questions, and imperatives.
|
||||
|
||||
UttS : S -> Utt ; -- John walks
|
||||
UttQS : QS -> Utt ; -- is it good
|
||||
UttImpSg : Pol -> Imp -> Utt; -- (don't) help yourself
|
||||
UttImpPl : Pol -> Imp -> Utt; -- (don't) help yourselves
|
||||
UttImpPol : Pol -> Imp -> Utt ; -- (don't) help (polite)
|
||||
|
||||
-- There are also 'one-word utterances'. A typical use of them is
|
||||
-- as answers to questions.
|
||||
-- *Note*. This list is incomplete. More categories could be covered.
|
||||
-- Moreover, in many languages e.g. noun phrases in different cases
|
||||
-- can be used.
|
||||
|
||||
UttIP : IP -> Utt ; -- who
|
||||
UttIAdv : IAdv -> Utt ; -- why
|
||||
UttNP : NP -> Utt ; -- this man
|
||||
UttAdv : Adv -> Utt ; -- here
|
||||
UttVP : VP -> Utt ; -- to sleep
|
||||
|
||||
-- The phrasal conjunction is optional. A sentence conjunction
|
||||
-- can also used to prefix an utterance.
|
||||
|
||||
NoPConj : PConj ;
|
||||
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 ;
|
||||
VocNP : NP -> Voc ; -- my friend
|
||||
|
||||
}
|
||||
29
lib/resource-1.3/abstract/Question.gf
Normal file
29
lib/resource-1.3/abstract/Question.gf
Normal file
@@ -0,0 +1,29 @@
|
||||
--1 Question: Questions and Interrogative Pronouns
|
||||
|
||||
abstract Question = Cat ** {
|
||||
|
||||
-- A question can be formed from a clause ('yes-no question') or
|
||||
-- with an interrogative.
|
||||
|
||||
fun
|
||||
QuestCl : Cl -> QCl ; -- does John walk
|
||||
QuestVP : IP -> VP -> QCl ; -- who walks
|
||||
QuestSlash : IP -> Slash -> QCl ; -- who does John love
|
||||
QuestIAdv : IAdv -> Cl -> QCl ; -- why does John walk
|
||||
QuestIComp : IComp -> NP -> QCl ; -- where is John
|
||||
|
||||
-- Interrogative pronouns can be formed with interrogative
|
||||
-- determiners.
|
||||
|
||||
IDetCN : IDet -> Num -> Ord -> CN -> IP; -- which five best songs
|
||||
AdvIP : IP -> Adv -> IP ; -- who in Europe
|
||||
|
||||
PrepIP : Prep -> IP -> IAdv ; -- with whom
|
||||
|
||||
CompIAdv : IAdv -> IComp ; -- where
|
||||
|
||||
|
||||
-- More $IP$, $IDet$, and $IAdv$ are defined in
|
||||
-- [``Structural`` Structural.html].
|
||||
|
||||
}
|
||||
26
lib/resource-1.3/abstract/Relative.gf
Normal file
26
lib/resource-1.3/abstract/Relative.gf
Normal file
@@ -0,0 +1,26 @@
|
||||
--1 Relative clauses and pronouns
|
||||
|
||||
abstract Relative = Cat ** {
|
||||
|
||||
fun
|
||||
|
||||
-- The simplest way to form a relative clause is from a clause by
|
||||
-- a pronoun similar to "such that".
|
||||
|
||||
RelCl : Cl -> RCl ; -- such that John loves her
|
||||
|
||||
-- The more proper ways are from a verb phrase
|
||||
-- (formed in [``Verb`` Verb.html]) or a sentence
|
||||
-- with a missing noun phrase (formed in [``Sentence`` Sentence.html]).
|
||||
|
||||
RelVP : RP -> VP -> RCl ; -- who loves John
|
||||
RelSlash : RP -> Slash -> RCl ; -- whom John loves
|
||||
|
||||
-- Relative pronouns are formed from an 'identity element' by prefixing
|
||||
-- or suffixing (depending on language) prepositional phrases.
|
||||
|
||||
IdRP : RP ; -- which
|
||||
FunRP : Prep -> NP -> RP -> RP ; -- all the roots of which
|
||||
|
||||
}
|
||||
|
||||
96
lib/resource-1.3/abstract/Sentence.gf
Normal file
96
lib/resource-1.3/abstract/Sentence.gf
Normal file
@@ -0,0 +1,96 @@
|
||||
--1 Sentence: Sentences, Clauses, and Imperatives
|
||||
|
||||
abstract Sentence = Cat ** {
|
||||
|
||||
--2 Clauses
|
||||
|
||||
-- The $NP VP$ predication rule form a clause whose linearization
|
||||
-- gives a table of all tense variants, positive and negative.
|
||||
-- Clauses are converted to $S$ (with fixed tense) with the
|
||||
-- $UseCl$ function below.
|
||||
|
||||
fun
|
||||
PredVP : NP -> VP -> Cl ; -- John walks
|
||||
|
||||
-- Using an embedded sentence as a subject is treated separately.
|
||||
-- This can be overgenerating. E.g. "whether you go" as subject
|
||||
-- is only meaningful for some verb phrases.
|
||||
|
||||
PredSCVP : SC -> VP -> Cl ; -- that you go makes me happy
|
||||
|
||||
--2 Clauses missing object noun phrases
|
||||
|
||||
-- This category is a variant of the 'slash category' $S/NP$ of
|
||||
-- GPSG and categorial grammars, which in turn replaces
|
||||
-- movement transformations in the formation of questions
|
||||
-- and relative clauses. Except $SlashV2$, the construction
|
||||
-- rules can be seen as special cases of function composition, in
|
||||
-- the style of CCG.
|
||||
-- *Note* the set is not complete and lacks e.g. verbs with more than 2 places.
|
||||
|
||||
SlashV2 : NP -> V2 -> Slash ; -- (whom) he sees
|
||||
SlashVVV2 : NP -> VV -> V2 -> Slash; -- (whom) he wants to see
|
||||
AdvSlash : Slash -> Adv -> Slash ; -- (whom) he sees tomorrow
|
||||
SlashPrep : Cl -> Prep -> Slash ; -- (with whom) he walks
|
||||
|
||||
SlashVS : NP -> VS -> SlashS -> Slash ; -- (whom) he says that she loves
|
||||
|
||||
--2 Imperatives
|
||||
|
||||
-- An imperative is straightforwardly formed from a verb phrase.
|
||||
-- It has variation over positive and negative, singular and plural.
|
||||
-- To fix these parameters, see [Phrase Phrase.html].
|
||||
|
||||
ImpVP : VP -> Imp ; -- go
|
||||
|
||||
--2 Embedded sentences
|
||||
|
||||
-- Sentences, questions, and infinitival phrases can be used as
|
||||
-- subjects and (adverbial) complements.
|
||||
|
||||
EmbedS : S -> SC ; -- that you go
|
||||
EmbedQS : QS -> SC ; -- whether you go
|
||||
EmbedVP : VP -> SC ; -- to go
|
||||
|
||||
--2 Sentences
|
||||
|
||||
-- These are the 2 x 4 x 4 = 16 forms generated by different
|
||||
-- combinations of tense, polarity, and
|
||||
-- anteriority, which are defined in [``Common`` Common.html].
|
||||
|
||||
fun
|
||||
UseCl : Tense -> Ant -> Pol -> Cl -> S ;
|
||||
UseQCl : Tense -> Ant -> Pol -> QCl -> QS ;
|
||||
UseRCl : Tense -> Ant -> Pol -> RCl -> RS ;
|
||||
UseSlash : Tense -> Ant -> Pol -> Slash -> SlashS ;
|
||||
|
||||
-- An adverb can be added to the beginning of a sentence.
|
||||
|
||||
AdvS : Adv -> S -> S ; -- today, I will go home
|
||||
|
||||
}
|
||||
|
||||
--.
|
||||
|
||||
--- todo: tense of embedded Slash
|
||||
-- SlashVSS : NP -> VS -> Slash -> Slash; -- (whom) I think he sees
|
||||
|
||||
-- Examples for English $S$/$Cl$:
|
||||
{-
|
||||
Pres Simul Pos ODir : he sleeps
|
||||
Pres Simul Neg ODir : he doesn't sleep
|
||||
Pres Anter Pos ODir : he has slept
|
||||
Pres Anter Neg ODir : he hasn't slept
|
||||
Past Simul Pos ODir : he slept
|
||||
Past Simul Neg ODir : he didn't sleep
|
||||
Past Anter Pos ODir : he had slept
|
||||
Past Anter Neg ODir : he hadn't slept
|
||||
Fut Simul Pos ODir : he will sleep
|
||||
Fut Simul Neg ODir : he won't sleep
|
||||
Fut Anter Pos ODir : he will have slept
|
||||
Fut Anter Neg ODir : he won't have slept
|
||||
Cond Simul Pos ODir : he would sleep
|
||||
Cond Simul Neg ODir : he wouldn't sleep
|
||||
Cond Anter Pos ODir : he would have slept
|
||||
Cond Anter Neg ODir : he wouldn't have slept
|
||||
-}
|
||||
112
lib/resource-1.3/abstract/Structural.gf
Normal file
112
lib/resource-1.3/abstract/Structural.gf
Normal file
@@ -0,0 +1,112 @@
|
||||
--1 Structural: Structural Words
|
||||
--
|
||||
-- Here we have some words belonging to closed classes and appearing
|
||||
-- in all languages we have considered.
|
||||
-- Sometimes more distinctions are needed, e.g. $we_Pron$ in Spanish
|
||||
-- should be replaced by masculine and feminine variants, found in
|
||||
-- [``ExtraSpa`` ../spanish/ExtraSpa.gf].
|
||||
|
||||
abstract Structural = Cat ** {
|
||||
|
||||
fun
|
||||
|
||||
-- This is an alphabetical list of structural words
|
||||
|
||||
above_Prep : Prep ;
|
||||
after_Prep : Prep ;
|
||||
all_Predet : Predet ;
|
||||
almost_AdA : AdA ;
|
||||
almost_AdN : AdN ;
|
||||
although_Subj : Subj ;
|
||||
always_AdV : AdV ;
|
||||
and_Conj : Conj ;
|
||||
because_Subj : Subj ;
|
||||
before_Prep : Prep ;
|
||||
behind_Prep : Prep ;
|
||||
between_Prep : Prep ;
|
||||
both7and_DConj : DConj ;
|
||||
but_PConj : PConj ;
|
||||
by8agent_Prep : Prep ;
|
||||
by8means_Prep : Prep ;
|
||||
can8know_VV : VV ;
|
||||
can_VV : VV ;
|
||||
during_Prep : Prep ;
|
||||
either7or_DConj : DConj ;
|
||||
every_Det : Det ;
|
||||
everybody_NP : NP ;
|
||||
everything_NP : NP ;
|
||||
everywhere_Adv : Adv ;
|
||||
--- first_Ord : Ord ; DEPRECATED
|
||||
few_Det : Det ;
|
||||
for_Prep : Prep ;
|
||||
from_Prep : Prep ;
|
||||
he_Pron : Pron ;
|
||||
here_Adv : Adv ;
|
||||
here7to_Adv : Adv ;
|
||||
here7from_Adv : Adv ;
|
||||
how_IAdv : IAdv ;
|
||||
how8many_IDet : IDet ;
|
||||
i_Pron : Pron ;
|
||||
if_Subj : Subj ;
|
||||
in8front_Prep : Prep ;
|
||||
in_Prep : Prep ;
|
||||
it_Pron : Pron ;
|
||||
less_CAdv : CAdv ;
|
||||
many_Det : Det ;
|
||||
more_CAdv : CAdv ;
|
||||
most_Predet : Predet ;
|
||||
much_Det : Det ;
|
||||
must_VV : VV ;
|
||||
no_Phr : Phr ;
|
||||
on_Prep : Prep ;
|
||||
--- one_Quant : QuantSg ; DEPRECATED
|
||||
only_Predet : Predet ;
|
||||
or_Conj : Conj ;
|
||||
otherwise_PConj : PConj ;
|
||||
part_Prep : Prep ;
|
||||
please_Voc : Voc ;
|
||||
possess_Prep : Prep ;
|
||||
quite_Adv : AdA ;
|
||||
she_Pron : Pron ;
|
||||
so_AdA : AdA ;
|
||||
someSg_Det : Det ;
|
||||
somePl_Det : Det ;
|
||||
somebody_NP : NP ;
|
||||
something_NP : NP ;
|
||||
somewhere_Adv : Adv ;
|
||||
that_Quant : Quant ;
|
||||
that_NP : NP ;
|
||||
there_Adv : Adv ;
|
||||
there7to_Adv : Adv ;
|
||||
there7from_Adv : Adv ;
|
||||
therefore_PConj : PConj ;
|
||||
these_NP : NP ;
|
||||
they_Pron : Pron ;
|
||||
this_Quant : Quant ;
|
||||
this_NP : NP ;
|
||||
those_NP : NP ;
|
||||
through_Prep : Prep ;
|
||||
to_Prep : Prep ;
|
||||
too_AdA : AdA ;
|
||||
under_Prep : Prep ;
|
||||
very_AdA : AdA ;
|
||||
want_VV : VV ;
|
||||
we_Pron : Pron ;
|
||||
whatPl_IP : IP ;
|
||||
whatSg_IP : IP ;
|
||||
when_IAdv : IAdv ;
|
||||
when_Subj : Subj ;
|
||||
where_IAdv : IAdv ;
|
||||
whichPl_IDet : IDet ;
|
||||
whichSg_IDet : IDet ;
|
||||
whoPl_IP : IP ;
|
||||
whoSg_IP : IP ;
|
||||
why_IAdv : IAdv ;
|
||||
with_Prep : Prep ;
|
||||
without_Prep : Prep ;
|
||||
yes_Phr : Phr ;
|
||||
youSg_Pron : Pron ;
|
||||
youPl_Pron : Pron ;
|
||||
youPol_Pron : Pron ;
|
||||
|
||||
}
|
||||
15
lib/resource-1.3/abstract/Text.gf
Normal file
15
lib/resource-1.3/abstract/Text.gf
Normal file
@@ -0,0 +1,15 @@
|
||||
--1 Text: Texts
|
||||
|
||||
-- Texts are built from an empty text by adding $Phr$ases,
|
||||
-- using as constructors the punctuation marks ".", "?", and "!".
|
||||
-- Any punctuation mark can be attached to any kind of phrase.
|
||||
|
||||
abstract Text = Common ** {
|
||||
|
||||
fun
|
||||
TEmpty : Text ; --
|
||||
TFullStop : Phr -> Text -> Text ; -- John walks. ...
|
||||
TQuestMark : Phr -> Text -> Text ; -- Are you OK? ...
|
||||
TExclMark : Phr -> Text -> Text ; -- John walks! ...
|
||||
|
||||
}
|
||||
74
lib/resource-1.3/abstract/Verb.gf
Normal file
74
lib/resource-1.3/abstract/Verb.gf
Normal file
@@ -0,0 +1,74 @@
|
||||
--1 The construction of verb phrases
|
||||
|
||||
abstract Verb = Cat ** {
|
||||
|
||||
--2 Complementization rules
|
||||
|
||||
-- Verb phrases are constructed from verbs by providing their
|
||||
-- complements. There is one rule for each verb category.
|
||||
|
||||
fun
|
||||
UseV : V -> VP ; -- sleep
|
||||
ComplV2 : V2 -> NP -> VP ; -- use it
|
||||
ComplV3 : V3 -> NP -> NP -> VP ; -- send a message to her
|
||||
|
||||
ComplVV : VV -> VP -> VP ; -- want to run
|
||||
ComplVS : VS -> S -> VP ; -- know that she runs
|
||||
ComplVQ : VQ -> QS -> VP ; -- wonder if she runs
|
||||
ComplVA : VA -> AP -> VP ; -- look red
|
||||
|
||||
ComplV2V : V2V -> NP -> VP -> VP ; -- cause it to burn
|
||||
ComplV2S : V2S -> NP -> S -> VP ; -- tell me that it rains
|
||||
ComplV2Q : V2Q -> NP -> QS -> VP ; -- ask me who came
|
||||
ComplV2A : V2A -> NP -> AP -> VP ; -- paint it red
|
||||
|
||||
|
||||
--2 Other ways of forming verb phrases
|
||||
|
||||
-- Verb phrases can also be constructed reflexively and from
|
||||
-- copula-preceded complements.
|
||||
|
||||
ReflV2 : V2 -> VP ; -- use itself
|
||||
UseComp : Comp -> VP ; -- be warm
|
||||
|
||||
-- Passivization of two-place verbs is another way to use
|
||||
-- them. In many languages, the result is a participle that
|
||||
-- is used as complement to a copula ("is used"), but other
|
||||
-- auxiliary verbs are possible (Ger. "wird angewendet", It.
|
||||
-- "viene usato"), as well as special verb forms (Fin. "käytetään",
|
||||
-- Swe. "används").
|
||||
--
|
||||
-- *Note*. the rule can be overgenerating, since the $V2$ need not
|
||||
-- take a direct object.
|
||||
|
||||
PassV2 : V2 -> VP ; -- be used
|
||||
|
||||
-- Adverbs can be added to verb phrases. Many languages make
|
||||
-- a distinction between adverbs that are attached in the end
|
||||
-- vs. next to (or before) the verb.
|
||||
|
||||
AdvVP : VP -> Adv -> VP ; -- sleep here
|
||||
AdVVP : AdV -> VP -> VP ; -- always sleep
|
||||
|
||||
-- *Agents of passives* are constructed as adverbs with the
|
||||
-- preposition [Structural Structural.html]$.8agent_Prep$.
|
||||
|
||||
|
||||
--2 Complements to copula
|
||||
|
||||
-- Adjectival phrases, noun phrases, and adverbs can be used.
|
||||
|
||||
CompAP : AP -> Comp ; -- (be) small
|
||||
CompNP : NP -> Comp ; -- (be) a soldier
|
||||
CompAdv : Adv -> Comp ; -- (be) here
|
||||
|
||||
--2 Coercions
|
||||
|
||||
-- Verbs can change subcategorization patterns in systematic ways,
|
||||
-- but this is very much language-dependent. The following two
|
||||
-- work in all the languages we cover.
|
||||
|
||||
UseVQ : VQ -> V2 ; -- ask (a question)
|
||||
UseVS : VS -> V2 ; -- know (a secret)
|
||||
|
||||
}
|
||||
214
lib/resource-1.3/api/Combinators.gf
Normal file
214
lib/resource-1.3/api/Combinators.gf
Normal file
@@ -0,0 +1,214 @@
|
||||
--1 Combinators: a High-Level Syntax API
|
||||
|
||||
-- This module defines some "grammatical functions" that give shortcuts to
|
||||
-- typical constructions. [``Constructors`` Constructors.html] and the
|
||||
-- language-specific ``Paradigms`` modules are usually needed
|
||||
-- to construct arguments of these functions.
|
||||
|
||||
incomplete resource Combinators = open Grammar in {
|
||||
|
||||
oper
|
||||
|
||||
--2 Predication
|
||||
|
||||
pred : overload {
|
||||
pred : V -> NP -> Cl ; -- x converges
|
||||
pred : V2 -> NP -> NP -> Cl ; -- x intersects y
|
||||
pred : V3 -> NP -> NP -> NP -> Cl ; -- x intersects y at z
|
||||
pred : V -> NP -> NP -> Cl ; -- x and y intersect
|
||||
pred : A -> NP -> Cl ; -- x is even
|
||||
pred : A2 -> NP -> NP -> Cl ; -- x is divisible by y
|
||||
pred : A -> NP -> NP -> Cl ; -- x and y are equal
|
||||
pred : N -> NP -> Cl ; -- x is a maximum
|
||||
pred : CN -> NP -> Cl ; -- x is a local maximum
|
||||
pred : NP -> NP -> Cl ; -- x is the neutral element
|
||||
pred : N -> NP -> NP -> Cl ; -- x and y are inverses
|
||||
pred : Adv -> NP -> Cl ; -- x is in scope
|
||||
pred : Prep -> NP -> NP -> Cl -- x is outside y
|
||||
} ;
|
||||
|
||||
--2 Function application
|
||||
|
||||
app : overload {
|
||||
app : N -> NP ;
|
||||
app : N2 -> NP -> NP ;
|
||||
app : N3 -> NP -> NP -> NP ;
|
||||
app : N2 -> NP -> NP -> NP ;
|
||||
app : N2 -> N -> CN
|
||||
} ;
|
||||
|
||||
--2 Coordination
|
||||
|
||||
coord : overload {
|
||||
coord : Conj -> Adv -> Adv -> Adv ;
|
||||
coord : Conj -> AP -> AP -> AP ;
|
||||
coord : Conj -> NP -> NP -> NP ;
|
||||
coord : Conj -> S -> S -> S ;
|
||||
coord : DConj -> Adv -> Adv -> Adv ;
|
||||
coord : DConj -> AP -> AP -> AP ;
|
||||
coord : DConj -> NP -> NP -> NP ;
|
||||
coord : DConj -> S -> S -> S ;
|
||||
coord : Conj -> ListAdv -> Adv ;
|
||||
coord : Conj -> ListAP -> AP ;
|
||||
coord : Conj -> ListNP -> NP ;
|
||||
coord : Conj -> ListS -> S ;
|
||||
coord : DConj -> ListAdv -> Adv ;
|
||||
coord : DConj -> ListAP -> AP ;
|
||||
coord : DConj -> ListNP -> NP ;
|
||||
coord : DConj -> ListS -> S
|
||||
|
||||
} ;
|
||||
|
||||
--2 Modification
|
||||
|
||||
mod : overload {
|
||||
mod : A -> N -> CN ;
|
||||
mod : AP -> CN -> CN ;
|
||||
mod : AdA -> A -> AP ;
|
||||
mod : Det -> N -> NP ;
|
||||
mod : Det -> CN -> NP ;
|
||||
mod : Quant -> N -> NP ;
|
||||
mod : Quant -> CN -> NP ;
|
||||
mod : Predet -> N -> NP ;
|
||||
mod : Numeral -> N -> NP
|
||||
|
||||
|
||||
} ;
|
||||
|
||||
--2 Negation
|
||||
|
||||
neg : overload {
|
||||
neg : Imp -> Utt ;
|
||||
neg : Cl -> S ;
|
||||
neg : QCl -> QS ;
|
||||
neg : RCl -> RS
|
||||
};
|
||||
|
||||
--2 Text append
|
||||
|
||||
-- This is not in ground API, because it would destroy parsing.
|
||||
|
||||
appendText : Text -> Text -> Text ;
|
||||
|
||||
--.
|
||||
|
||||
pred = overload {
|
||||
pred : V -> NP -> Cl
|
||||
= \v,np -> PredVP np (UseV v) ;
|
||||
pred : V2 -> NP -> NP -> Cl
|
||||
= \v,np,ob -> PredVP np (ComplV2 v ob) ;
|
||||
pred : V3 -> NP -> NP -> NP -> Cl
|
||||
= \v,np,ob,ob2 ->
|
||||
PredVP np (ComplV3 v ob ob2) ;
|
||||
pred : V -> NP -> NP -> Cl
|
||||
= \v,x,y -> PredVP (ConjNP and_Conj (BaseNP x y)) (UseV v) ;
|
||||
pred : A -> NP -> Cl
|
||||
= \a,np -> PredVP np (UseComp (CompAP (PositA a))) ;
|
||||
pred : A2 -> NP -> NP -> Cl
|
||||
= \a,x,y -> PredVP x (UseComp (CompAP (ComplA2 a y))) ;
|
||||
pred : A -> NP -> NP -> Cl
|
||||
= \a,x,y -> PredVP (ConjNP and_Conj (BaseNP x y)) (UseComp (CompAP (PositA a))) ;
|
||||
pred : N -> NP -> Cl
|
||||
= \n,x -> PredVP x (UseComp (CompNP (DetCN (DetSg (IndefArt) NoOrd) (UseN n)))) ;
|
||||
pred : CN -> NP -> Cl
|
||||
= \n,x -> PredVP x (UseComp (CompNP (DetCN (DetSg (IndefArt) NoOrd) n))) ;
|
||||
pred : NP -> NP -> Cl
|
||||
= \n,x -> PredVP x (UseComp (CompNP n)) ; pred : N2 -> NP -> NP -> Cl
|
||||
= \n,x,y -> PredVP x (UseComp (CompNP (DetCN (DetSg (IndefArt) NoOrd) (ComplN2 n y)))) ;
|
||||
pred : N -> NP -> NP -> Cl
|
||||
= \n,x,y -> PredVP (ConjNP and_Conj (BaseNP x y)) (UseComp (CompNP (DetCN (DetPl (IndefArt) NoNum NoOrd) (UseN n)))) ;
|
||||
pred : Adv -> NP -> Cl
|
||||
= \a,x -> PredVP x (UseComp (CompAdv a)) ;
|
||||
pred : Prep -> NP -> NP -> Cl
|
||||
= \p,x,y -> PredVP x (UseComp (CompAdv (PrepNP p y)))
|
||||
|
||||
} ;
|
||||
|
||||
app = overload {
|
||||
app : N -> NP
|
||||
= \n -> DetCN (DetSg (DefArt) NoOrd) (UseN n) ;
|
||||
app : N2 -> NP -> NP
|
||||
= \n,x -> DetCN (DetSg (DefArt) NoOrd) (ComplN2 n x) ;
|
||||
app : N3 -> NP -> NP -> NP
|
||||
= \n,x,y -> DetCN (DetSg (DefArt) NoOrd) (ComplN2 (ComplN3 n x) y) ;
|
||||
app : N2 -> NP -> NP -> NP
|
||||
= \n,x,y -> DetCN (DetSg (DefArt) NoOrd) (ComplN2 n (ConjNP and_Conj (BaseNP x y))) ;
|
||||
app : N2 -> N -> CN
|
||||
= \f,n -> ComplN2 f (DetCN (DetPl (IndefArt) NoNum NoOrd) (UseN n))
|
||||
} ;
|
||||
|
||||
coord = overload {
|
||||
coord : Conj -> Adv -> Adv -> Adv
|
||||
= \c,x,y -> ConjAdv c (BaseAdv x y) ;
|
||||
coord : Conj -> AP -> AP -> AP
|
||||
= \c,x,y -> ConjAP c (BaseAP x y) ;
|
||||
coord : Conj -> NP -> NP -> NP
|
||||
= \c,x,y -> ConjNP c (BaseNP x y) ;
|
||||
coord : Conj -> S -> S -> S
|
||||
= \c,x,y -> ConjS c (BaseS x y) ;
|
||||
coord : DConj -> Adv -> Adv -> Adv
|
||||
= \c,x,y -> DConjAdv c (BaseAdv x y) ;
|
||||
coord : DConj -> AP -> AP -> AP
|
||||
= \c,x,y -> DConjAP c (BaseAP x y) ;
|
||||
coord : DConj -> NP -> NP -> NP
|
||||
= \c,x,y -> DConjNP c (BaseNP x y) ;
|
||||
coord : DConj -> S -> S -> S
|
||||
= \c,x,y -> DConjS c (BaseS x y) ;
|
||||
coord : Conj -> ListAdv -> Adv
|
||||
= \c,xy -> ConjAdv c xy ;
|
||||
coord : Conj -> ListAP -> AP
|
||||
= \c,xy -> ConjAP c xy ;
|
||||
coord : Conj -> ListNP -> NP
|
||||
= \c,xy -> ConjNP c xy ;
|
||||
coord : Conj -> ListS -> S
|
||||
= \c,xy -> ConjS c xy ;
|
||||
coord : DConj -> ListAdv -> Adv
|
||||
= \c,xy -> DConjAdv c xy ;
|
||||
coord : DConj -> ListAP -> AP
|
||||
= \c,xy -> DConjAP c xy ;
|
||||
coord : DConj -> ListNP -> NP
|
||||
= \c,xy -> DConjNP c xy ;
|
||||
coord : DConj -> ListS -> S
|
||||
= \c,xy -> DConjS c xy
|
||||
} ;
|
||||
|
||||
mod = overload {
|
||||
mod : A -> N -> CN
|
||||
= \a,n -> AdjCN (PositA a) (UseN n) ;
|
||||
mod : AP -> CN -> CN
|
||||
= \a,n -> AdjCN a n ;
|
||||
mod : AdA -> A -> AP
|
||||
= \m,a -> AdAP m (PositA a) ;
|
||||
|
||||
mod : Det -> N -> NP
|
||||
= \d,n -> DetCN d (UseN n) ;
|
||||
mod : Det -> CN -> NP
|
||||
= \d,n -> DetCN d n ;
|
||||
mod : Quant -> N -> NP
|
||||
= \q,n -> DetCN (DetSg (q) NoOrd) (UseN n) ;
|
||||
mod : Quant -> CN -> NP
|
||||
= \q,n -> DetCN (DetSg (q) NoOrd) n ;
|
||||
mod : Predet -> N -> NP
|
||||
= \q,n -> PredetNP q (DetCN (DetPl (IndefArt) NoNum NoOrd) (UseN n)) ;
|
||||
mod : Numeral -> N -> NP
|
||||
= \nu,n -> DetCN (DetPl (IndefArt) (NumNumeral nu) NoOrd) (UseN n)
|
||||
|
||||
} ;
|
||||
|
||||
neg = overload {
|
||||
neg : Imp -> Utt
|
||||
= UttImpSg PNeg ;
|
||||
neg : Cl -> S
|
||||
= UseCl TPres ASimul PNeg;
|
||||
neg : QCl -> QS
|
||||
= UseQCl TPres ASimul PNeg;
|
||||
neg : RCl -> RS
|
||||
= UseRCl TPres ASimul PNeg
|
||||
};
|
||||
|
||||
-- This is not in ground API, because it would destroy parsing.
|
||||
|
||||
appendText : Text -> Text -> Text
|
||||
= \x,y -> {s = x.s ++ y.s ; lock_Text = <>} ;
|
||||
|
||||
}
|
||||
3
lib/resource-1.3/api/CombinatorsDan.gf
Normal file
3
lib/resource-1.3/api/CombinatorsDan.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsDan = Combinators with (Grammar = GrammarDan) ;
|
||||
3
lib/resource-1.3/api/CombinatorsEng.gf
Normal file
3
lib/resource-1.3/api/CombinatorsEng.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsEng = Combinators with (Grammar = GrammarEng) ;
|
||||
3
lib/resource-1.3/api/CombinatorsFin.gf
Normal file
3
lib/resource-1.3/api/CombinatorsFin.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsFin = Combinators with (Grammar = GrammarFin) ;
|
||||
3
lib/resource-1.3/api/CombinatorsFre.gf
Normal file
3
lib/resource-1.3/api/CombinatorsFre.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsFre = Combinators with (Grammar = GrammarFre) ;
|
||||
3
lib/resource-1.3/api/CombinatorsGer.gf
Normal file
3
lib/resource-1.3/api/CombinatorsGer.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsGer = Combinators with (Grammar = GrammarGer) ;
|
||||
3
lib/resource-1.3/api/CombinatorsIta.gf
Normal file
3
lib/resource-1.3/api/CombinatorsIta.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsIta = Combinators with (Grammar = GrammarIta) ;
|
||||
3
lib/resource-1.3/api/CombinatorsNor.gf
Normal file
3
lib/resource-1.3/api/CombinatorsNor.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsNor = Combinators with (Grammar = GrammarNor) ;
|
||||
3
lib/resource-1.3/api/CombinatorsRus.gf
Normal file
3
lib/resource-1.3/api/CombinatorsRus.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsRus = Combinators with (Grammar = GrammarRus) ;
|
||||
3
lib/resource-1.3/api/CombinatorsSpa.gf
Normal file
3
lib/resource-1.3/api/CombinatorsSpa.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsSpa = Combinators with (Grammar = GrammarSpa) ;
|
||||
3
lib/resource-1.3/api/CombinatorsSwe.gf
Normal file
3
lib/resource-1.3/api/CombinatorsSwe.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsSwe = Combinators with (Grammar = GrammarSwe) ;
|
||||
1553
lib/resource-1.3/api/Constructors.gf
Normal file
1553
lib/resource-1.3/api/Constructors.gf
Normal file
File diff suppressed because it is too large
Load Diff
3
lib/resource-1.3/api/ConstructorsDan.gf
Normal file
3
lib/resource-1.3/api/ConstructorsDan.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource ConstructorsDan = Constructors with (Grammar = GrammarDan) ;
|
||||
3
lib/resource-1.3/api/ConstructorsEng.gf
Normal file
3
lib/resource-1.3/api/ConstructorsEng.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource ConstructorsEng = Constructors with (Grammar = GrammarEng) ;
|
||||
3
lib/resource-1.3/api/ConstructorsFin.gf
Normal file
3
lib/resource-1.3/api/ConstructorsFin.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource ConstructorsFin = Constructors with (Grammar = GrammarFin) ;
|
||||
3
lib/resource-1.3/api/ConstructorsFre.gf
Normal file
3
lib/resource-1.3/api/ConstructorsFre.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource ConstructorsFre = Constructors with (Grammar = GrammarFre) ;
|
||||
3
lib/resource-1.3/api/ConstructorsGer.gf
Normal file
3
lib/resource-1.3/api/ConstructorsGer.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource ConstructorsGer = Constructors with (Grammar = GrammarGer) ;
|
||||
3
lib/resource-1.3/api/ConstructorsIta.gf
Normal file
3
lib/resource-1.3/api/ConstructorsIta.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource ConstructorsIta = Constructors with (Grammar = GrammarIta) ;
|
||||
3
lib/resource-1.3/api/ConstructorsNor.gf
Normal file
3
lib/resource-1.3/api/ConstructorsNor.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource ConstructorsNor = Constructors with (Grammar = GrammarNor) ;
|
||||
3
lib/resource-1.3/api/ConstructorsRus.gf
Normal file
3
lib/resource-1.3/api/ConstructorsRus.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource ConstructorsRus = Constructors with (Grammar = GrammarRus) ;
|
||||
3
lib/resource-1.3/api/ConstructorsSpa.gf
Normal file
3
lib/resource-1.3/api/ConstructorsSpa.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource ConstructorsSpa = Constructors with (Grammar = GrammarSpa) ;
|
||||
3
lib/resource-1.3/api/ConstructorsSwe.gf
Normal file
3
lib/resource-1.3/api/ConstructorsSwe.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource ConstructorsSwe = Constructors with (Grammar = GrammarSwe) ;
|
||||
5
lib/resource-1.3/api/Koe.gf
Normal file
5
lib/resource-1.3/api/Koe.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
abstract Koe = Cat ** {
|
||||
|
||||
fun ex1, ex2, ex3 : Phr ;
|
||||
|
||||
}
|
||||
10
lib/resource-1.3/api/KoeEng.gf
Normal file
10
lib/resource-1.3/api/KoeEng.gf
Normal file
@@ -0,0 +1,10 @@
|
||||
--# -path=.:../abstract:../common:../english:prelude
|
||||
|
||||
concrete KoeEng of Koe = CatEng **
|
||||
open ParadigmsEng, ConstructorsEng, CombinatorsEng, GrammarEng in {
|
||||
|
||||
lin
|
||||
ex1 = mkPhr (mkS (mkCl (mkNP (regPN "John")) (mkVP (regV "walk")))) ;
|
||||
ex2 = mkPhr (mkS (pred (regV "walk") (mkNP (regPN "John")))) ;
|
||||
ex3 = mkPhr (mkS (mkCl (mkNP and_Conj (mkNP (regPN "John"))(mkNP (regPN "Mary"))) (mkVP (regV "walk")))) ;
|
||||
}
|
||||
14
lib/resource-1.3/api/MkOverload.hs
Normal file
14
lib/resource-1.3/api/MkOverload.hs
Normal file
@@ -0,0 +1,14 @@
|
||||
import List
|
||||
|
||||
main = do
|
||||
s <- readFile "constrs"
|
||||
mapM_ (putStrLn . mkOne) $ lines s
|
||||
|
||||
mkOne [] = []
|
||||
mkOne s =
|
||||
" mk" ++ cons ++ " " ++ rest ++
|
||||
"\n =" ++ fun ++ " ;"
|
||||
where
|
||||
(fun,rest) = span (/=':') s
|
||||
cons = last $ takeWhile (/="--") $ words rest
|
||||
|
||||
39
lib/resource-1.3/api/Port.hs
Normal file
39
lib/resource-1.3/api/Port.hs
Normal file
@@ -0,0 +1,39 @@
|
||||
import System
|
||||
|
||||
main = mapM_ (\la -> mapM_ (\fi -> port "Eng" fi la) files) languages
|
||||
|
||||
languages = words "Dan Eng Fin Fre Ger Ita Nor Rus Spa Swe"
|
||||
langlong = words
|
||||
"danish english finnish french german italian norwegian russian spanish swedish"
|
||||
families = [
|
||||
("romance", ["french", "italian", "spanish"]),
|
||||
("scandinavian",["danish","norwegian","swedish"])
|
||||
]
|
||||
|
||||
longname lang =
|
||||
maybe (error ("no " ++ lang)) id $ lookup lang $ zip languages langlong
|
||||
|
||||
files = words "Combinators Constructors Symbolic"
|
||||
|
||||
port src file dst
|
||||
| src == dst = return ()
|
||||
| otherwise = do
|
||||
let fdst = file ++ dst ++ ".gf"
|
||||
system $ "cp " ++ file ++ src ++ ".gf " ++ fdst
|
||||
let longsrc = longname src
|
||||
let longdst = longname dst
|
||||
-- putStrLn $ "sed -i 's/" ++ longsrc ++ "/" ++ longdst ++ "/g' " ++ fdst
|
||||
-- system $ "sed -i 's/" ++ longsrc ++ "/" ++ longdst ++ "/g' " ++ fdst
|
||||
putStrLn $ "sed -i 's/" ++ src ++ "/" ++ dst ++ "/g' " ++ fdst
|
||||
system $ "sed -i 's/" ++ src ++ "/" ++ dst ++ "/g' " ++ fdst
|
||||
-- addFamily longdst fdst
|
||||
return ()
|
||||
|
||||
addFamily ldst fdst = maybe (return ()) add $ lookup ldst fams where
|
||||
fams = [(l,f) | (f,ls) <- families, l <- ls]
|
||||
add fam = do
|
||||
putStrLn $
|
||||
"sed -i 's/" ++ ldst ++ "/" ++ ldst ++ ":\\.\\.\\/" ++ fam ++ "/g' " ++ fdst
|
||||
system $
|
||||
"sed -i 's/" ++ ldst ++ "/" ++ ldst ++ ":\\.\\.\\/" ++ fam ++ "/g' " ++ fdst
|
||||
return ()
|
||||
48
lib/resource-1.3/api/Symbolic.gf
Normal file
48
lib/resource-1.3/api/Symbolic.gf
Normal file
@@ -0,0 +1,48 @@
|
||||
--1 Symbolic: Noun Phrases with mathematical symbols
|
||||
|
||||
incomplete resource Symbolic = open Symbol, Grammar in {
|
||||
|
||||
oper
|
||||
symb : overload {
|
||||
symb : Str -> NP ; -- x
|
||||
symb : Int -> NP ; -- 23
|
||||
symb : Float -> NP ; -- 0.99
|
||||
symb : N -> Int -> NP ; -- level 4
|
||||
symb : N -> Num -> NP ; -- level four
|
||||
symb : CN -> Num -> NP ; -- difficult level four
|
||||
symb : Det -> N -> Num -> NP ; -- the number four
|
||||
symb : Det -> CN -> Num -> NP ; -- the even number four
|
||||
symb : Det -> N -> Str -> Str -> NP ; -- the levels i and j
|
||||
symb : Det -> CN -> [Symb] -> NP -- the basic levels i, j, and k
|
||||
} ;
|
||||
|
||||
mkSymb : Str -> Symb ;
|
||||
|
||||
--.
|
||||
|
||||
symb = overload {
|
||||
symb : Str -> NP
|
||||
= \s -> UsePN (SymbPN (mkSymb s)) ;
|
||||
symb : Int -> NP
|
||||
= \i -> UsePN (IntPN i) ;
|
||||
symb : Float -> NP
|
||||
= \i -> UsePN (FloatPN i) ;
|
||||
symb : N -> Int -> NP
|
||||
= \c,i -> CNNumNP (UseN c) (NumInt i) ;
|
||||
symb : N -> Num -> NP
|
||||
= \c,n -> CNNumNP (UseN c) n ;
|
||||
symb : CN -> Num -> NP
|
||||
= \c,n -> CNNumNP c n ;
|
||||
symb : Det -> N -> Num -> NP
|
||||
= \d,n,x -> DetCN d (ApposCN (UseN n) (UsePN (NumPN x))) ;
|
||||
symb : Det -> CN -> Num -> NP
|
||||
= \d,n,x -> DetCN d (ApposCN n (UsePN (NumPN x))) ;
|
||||
symb : Det -> N -> Str -> Str -> NP
|
||||
= \c,n,x,y -> CNSymbNP c (UseN n) (BaseSymb (mkSymb x) (mkSymb y)) ;
|
||||
symb : Det -> CN -> [Symb] -> NP
|
||||
= CNSymbNP
|
||||
} ;
|
||||
|
||||
mkSymb : Str -> Symb = \s -> {s = s ; lock_Symb = <>} ;
|
||||
|
||||
}
|
||||
5
lib/resource-1.3/api/SymbolicEng.gf
Normal file
5
lib/resource-1.3/api/SymbolicEng.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:mathematical:prelude
|
||||
|
||||
resource SymbolicEng = Symbolic with
|
||||
(Symbol = SymbolEng),
|
||||
(Grammar = GrammarEng) ;
|
||||
5
lib/resource-1.3/api/SymbolicFin.gf
Normal file
5
lib/resource-1.3/api/SymbolicFin.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:mathematical:prelude
|
||||
|
||||
resource SymbolicFin = Symbolic with
|
||||
(Symbol = SymbolFin),
|
||||
(Grammar = GrammarFin) ;
|
||||
5
lib/resource-1.3/api/SymbolicFre.gf
Normal file
5
lib/resource-1.3/api/SymbolicFre.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:mathematical:prelude
|
||||
|
||||
resource SymbolicFre = Symbolic with
|
||||
(Symbol = SymbolFre),
|
||||
(Grammar = GrammarFre) ;
|
||||
5
lib/resource-1.3/api/SymbolicGer.gf
Normal file
5
lib/resource-1.3/api/SymbolicGer.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:mathematical:prelude
|
||||
|
||||
resource SymbolicGer = Symbolic with
|
||||
(Symbol = SymbolGer),
|
||||
(Grammar = GrammarGer) ;
|
||||
5
lib/resource-1.3/api/SymbolicIta.gf
Normal file
5
lib/resource-1.3/api/SymbolicIta.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:mathematical:prelude
|
||||
|
||||
resource SymbolicIta = Symbolic with
|
||||
(Symbol = SymbolIta),
|
||||
(Grammar = GrammarIta) ;
|
||||
5
lib/resource-1.3/api/SymbolicNor.gf
Normal file
5
lib/resource-1.3/api/SymbolicNor.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:mathematical:prelude
|
||||
|
||||
resource SymbolicNor = Symbolic with
|
||||
(Symbol = SymbolNor),
|
||||
(Grammar = GrammarNor) ;
|
||||
5
lib/resource-1.3/api/SymbolicSpa.gf
Normal file
5
lib/resource-1.3/api/SymbolicSpa.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:mathematical:prelude
|
||||
|
||||
resource SymbolicSpa = Symbolic with
|
||||
(Symbol = SymbolSpa),
|
||||
(Grammar = GrammarSpa) ;
|
||||
5
lib/resource-1.3/api/SymbolicSwe.gf
Normal file
5
lib/resource-1.3/api/SymbolicSwe.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:mathematical:prelude
|
||||
|
||||
resource SymbolicSwe = Symbolic with
|
||||
(Symbol = SymbolSwe),
|
||||
(Grammar = GrammarSwe) ;
|
||||
4
lib/resource-1.3/api/Syntax.gf
Normal file
4
lib/resource-1.3/api/Syntax.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
interface Syntax = Constructors, Cat, Structural, Numeral ;
|
||||
|
||||
4
lib/resource-1.3/api/SyntaxDan.gf
Normal file
4
lib/resource-1.3/api/SyntaxDan.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
instance SyntaxDan of Syntax = ConstructorsDan, CatDan, StructuralDan, NumeralDan ;
|
||||
|
||||
4
lib/resource-1.3/api/SyntaxEng.gf
Normal file
4
lib/resource-1.3/api/SyntaxEng.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
instance SyntaxEng of Syntax = ConstructorsEng, CatEng, StructuralEng, NumeralEng ;
|
||||
|
||||
4
lib/resource-1.3/api/SyntaxFin.gf
Normal file
4
lib/resource-1.3/api/SyntaxFin.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
instance SyntaxFin of Syntax = ConstructorsFin, CatFin, StructuralFin, NumeralFin ;
|
||||
|
||||
4
lib/resource-1.3/api/SyntaxFre.gf
Normal file
4
lib/resource-1.3/api/SyntaxFre.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
instance SyntaxFre of Syntax = ConstructorsFre, CatFre, StructuralFre, NumeralFre ;
|
||||
|
||||
4
lib/resource-1.3/api/SyntaxGer.gf
Normal file
4
lib/resource-1.3/api/SyntaxGer.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
instance SyntaxGer of Syntax = ConstructorsGer, CatGer, StructuralGer, NumeralGer ;
|
||||
|
||||
4
lib/resource-1.3/api/SyntaxIta.gf
Normal file
4
lib/resource-1.3/api/SyntaxIta.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
instance SyntaxIta of Syntax = ConstructorsIta, CatIta, StructuralIta, NumeralIta ;
|
||||
|
||||
5
lib/resource-1.3/api/SyntaxNor.gf
Normal file
5
lib/resource-1.3/api/SyntaxNor.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
instance SyntaxNor of Syntax = ConstructorsNor, CatNor, StructuralNor, NumeralNor
|
||||
;
|
||||
|
||||
4
lib/resource-1.3/api/SyntaxRus.gf
Normal file
4
lib/resource-1.3/api/SyntaxRus.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
instance SyntaxRus of Syntax = ConstructorsRus, CatRus, StructuralRus, NumeralRus ;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user