1
0
forked from GitHub/gf-core

testing ParadigmsFre

This commit is contained in:
aarne
2004-11-11 14:41:51 +00:00
parent f36378a64b
commit be553eb951
3 changed files with 49 additions and 2 deletions

View File

@@ -0,0 +1,3 @@
--# -path=.:../newresource/abstract:../newresource/french:../prelude:../newresource/romance
concrete DatabaseFre of Database = DatabaseI with (Resource=ResourceFre) ;

View File

@@ -0,0 +1,33 @@
--# -path=.:../newresource/abstract:../newresource/french:../newresource/romance:../prelude
--- path names: resource in release, newresource in cvs
concrete RestaurantFre of Restaurant =
DatabaseFre ** open Prelude, ResourceFre, ParadigmsFre in {
lin
Restaurant = UseN (nReg "restaurant" masculine) ;
Bar = UseN (nReg "bar" masculine) ;
French = AdjP1 (adj1Anglais "français" postpos) ;
Italian = AdjP1 (adj1Italien "italien" postpos) ;
Indian = AdjP1 (adj1Italien "indien" postpos) ;
Japanese = AdjP1 (adj1Anglais "japonais" postpos) ;
address = funDe (nReg "adresse" feminine) ;
phone = funCNCase (AdvCN (UseN (nReg "numéro" masculine))
(PrepNP PossessPrep (MassNP (UseN (nReg "téléphone" masculine))))) genitive ;
priceLevel = funCNCase (AdvCN (UseN (nEau "niveau" masculine))
(PrepNP PossessPrep (MassNP (UseN (nCas "prix" masculine))))) genitive ;
Cheap = aReg "cher" postpos ; ----
Expensive = aReg ["pas cher"] postpos ; ----
WhoRecommend rest =
ss2 ["qui a recommandé"] rest.s ** {lock_Phr = <>} ;
WhoHellRecommend rest =
ss2 ["qui enfer a recommandé"] rest.s ** {lock_Phr = <>} ;
LucasCarton = mkPN ["Lucas Carton"] masculine ;
LaCoupole = mkPN ["La Coupole"] feminine ;
BurgerKing =mkPN ["Burger King"] masculine ;
}

View File

@@ -74,6 +74,10 @@ oper
funCase : N -> Case -> Fun ; funCase : N -> Case -> Fun ;
funDe : N -> Fun ; funDe : N -> Fun ;
-- Functions can also be built from compunt nouns ("le numéro téléphonique de")
funCNCase : CN -> Case -> Fun ;
-- Proper names, with their gender. -- Proper names, with their gender.
mkPN : Str -> Gender -> PN ; -- Jean, masculine mkPN : Str -> Gender -> PN ; -- Jean, masculine
@@ -100,6 +104,9 @@ oper
-- only need the masculine singular form. -- only need the masculine singular form.
adj1Reg : Str -> Position -> Adj1 ; adj1Reg : Str -> Position -> Adj1 ;
adj1Sale : Str -> Position -> Adj1 ;
adj1Anglais : Str -> Position -> Adj1 ;
adj1Italien : Str -> Position -> Adj1 ;
adj1Cher : (cher, chère : Str) -> Position -> Adj1 ; adj1Cher : (cher, chère : Str) -> Position -> Adj1 ;
-- Two-place adjectives need a preposition and a case as extra arguments. -- Two-place adjectives need a preposition and a case as extra arguments.
@@ -184,6 +191,7 @@ oper
funPrep = \n,p -> n ** complement p ** {lock_Fun = <>} ; funPrep = \n,p -> n ** complement p ** {lock_Fun = <>} ;
funCase = \n,p -> n ** complementCas p ** {lock_Fun = <>} ; funCase = \n,p -> n ** complementCas p ** {lock_Fun = <>} ;
funCNCase = \n,p -> n ** complementCas p ** {lock_Fun = <>} ;
funDe x = funCase x genitive ; funDe x = funCase x genitive ;
mkPN s g = mkProperName s g ** {lock_PN = <>} ; mkPN s g = mkProperName s g ** {lock_PN = <>} ;
mkCN = UseN ; mkCN = UseN ;
@@ -192,8 +200,11 @@ oper
Position = Prelude.Bool ; Position = Prelude.Bool ;
prepos = adjPre ; prepos = adjPre ;
postpos = adjPost ; postpos = adjPost ;
mkAdj1 = \x,y,z,u,p -> mkAdjective (mkAdj x y z u) p ** {lock_Adj1 = <>} ; mkAdj1 = \x,y,z,u,p -> mkAdjective (mkAdj x z y u) p ** {lock_Adj1 = <>} ;
adj1Reg = \lent -> mkAdj1 lent (lent+"e") (lent+"s") (lent+"ement") ; adj1Reg = \lent -> mkAdj1 lent (lent+"e") (lent+"s") (lent+"ement") ;
adj1Sale = \sale -> mkAdj1 sale sale (sale+"s") (sale+"ment") ;
adj1Anglais = \anglais -> mkAdj1 anglais (anglais+"e") anglais (anglais+"ement") ;
adj1Italien = \italien -> mkAdj1 italien (italien+"ne") (italien+"s") (italien+"nement") ;
adj1Cher = \cher,chere -> mkAdj1 cher chere (cher+"s") (chere + "ment") ; adj1Cher = \cher,chere -> mkAdj1 cher chere (cher+"s") (chere + "ment") ;
mkAdj2 = \a,p,c -> mkAdjCompl a postpos {s2 = p ; c = c} ** {lock_Adj2 = <>} ; mkAdj2 = \a,p,c -> mkAdjCompl a postpos {s2 = p ; c = c} ** {lock_Adj2 = <>} ;