1
0
forked from GitHub/gf-core

added a project for Portuguese as a copy of Spanish

This commit is contained in:
aarne
2016-04-25 19:58:18 +00:00
parent 1c2ab94ec5
commit 6267f9f71f
48 changed files with 89868 additions and 5 deletions

View File

@@ -22,7 +22,7 @@ change xx = case xx of
system "ls *.gf > files.tmp"
files <- readFile "files.tmp" >>= return . lines
mapM_ (changeIdents from to) files
mapM_ commentOut files
---- mapM_ commentOut files
comment -> do
files <- readFile "files.tmp" >>= return . lines
mapM_ commentOut files

View File

@@ -0,0 +1,15 @@
--# -path=.:alltenses:prelude
resource CombinatorsPor = Combinators - [appCN, appCNc] with
(Cat = CatPor),
(Structural = StructuralPor),
(Noun = NounPor),
(Constructors = ConstructorsPor) **
{
oper
appCN : CN -> NP -> NP
= \cn,x -> mkNP the_Art (PossNP cn x) ;
appCNc : CN -> [NP] -> NP
= \cn,xs -> let np : NP = mkNP and_Conj xs
in mkNP the_Art (PossNP cn np) ;
}

View File

@@ -0,0 +1,3 @@
--# -path=.:alltenses:prelude
resource ConstructorsPor = Constructors with (Grammar = GrammarPor) ;

View File

@@ -0,0 +1,5 @@
--# -path=.:../spanish:../romance:../common:../abstract:../prelude
resource SymbolicPor = Symbolic with
(Symbol = SymbolPor),
(Grammar = GrammarPor) ;

5
lib/src/api/SyntaxPor.gf Normal file
View File

@@ -0,0 +1,5 @@
--# -path=.:alltenses
instance SyntaxPor of Syntax =
ConstructorsPor, CatPor, StructuralPor, CombinatorsPor ;

3
lib/src/api/TryPor.gf Normal file
View File

@@ -0,0 +1,3 @@
--# -path=.:../spanish:../romance:../common:../abstract:../prelude
resource TryPor = SyntaxPor, LexiconPor, ParadigmsPor - [mkAdv,mkAdN] ;

View File

@@ -0,0 +1,2 @@
concrete AdjectivePor of Adjective = CatPor ** AdjectiveRomance with
(ResRomance = ResPor) ;

View File

@@ -0,0 +1,2 @@
concrete AdverbPor of Adverb = CatPor ** AdverbRomance with
(ResRomance = ResPor) ;

View File

@@ -0,0 +1,7 @@
--# -path=.:../romance:../abstract:../common:../api:../prelude
concrete AllPor of AllPorAbs =
LangPor,
IrregPor,
ExtraPor
** {} ;

View File

@@ -0,0 +1,5 @@
abstract AllPorAbs =
Lang,
IrregPorAbs,
ExtraPorAbs
** {} ;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,5 @@
--# -path=.:../romance:../abstract:../common:prelude
concrete CatPor of Cat = CommonX -
[SC,Temp,TTAnt,Tense,TPres,TPast,TFut,TCond,Pol] ** CatRomance with
(ResRomance = ResPor) ;

View File

@@ -0,0 +1,11 @@
--# -path=.:../romance:../abstract:../common:../prelude
concrete CompatibilityPor of Compatibility = CatPor ** open Prelude, CommonRomance in {
-- from Noun 19/4/2008
lin
NumInt n = {s = \\_ => n.s ; isNum = True ; n = Pl} ;
OrdInt n = {s = \\_ => n.s ++ "."} ; ---
}

View File

@@ -0,0 +1,2 @@
concrete ConjunctionPor of Conjunction = CatPor ** ConjunctionRomance with
(ResRomance = ResPor) ;

View File

@@ -0,0 +1,148 @@
--# -path=alltenses:.:../abstract
concrete ConstructionPor of Construction = CatPor **
open SyntaxPor, SymbolicPor, ParadigmsPor,
(L = LexiconPor), (E = ExtraPor), (I = IrregPor), (R = ResPor), (C = CommonRomance),
Prelude in {
flags coding=utf8 ;
lin
hungry_VP = E.ComplCN have_V2 (mkCN (mkN "hambre" feminine)) ;
thirsty_VP = E.ComplCN have_V2 (mkCN (mkN "sed" feminine)) ;
has_age_VP card = mkVP have_V2 (mkNP <lin Card card : Card> L.year_N) ;
have_name_Cl x y = mkCl x (mkV2 (reflV (mkV "llamar"))) y ;
married_Cl x y = mkCl (lin NP x) L.married_A2 (lin NP y) | mkCl (mkNP and_Conj (lin NP x) (lin NP y)) (mkA "casado") ;
what_name_QCl x = mkQCl how_IAdv (mkCl (lin NP x) (reflV (mkV "llamar"))) ;
how_old_QCl x = mkQCl (mkIP how8many_IDet L.year_N) x have_V2 ;
how_far_QCl x = mkQCl (lin IAdv (ss "a qué distancia")) (mkCl x I.estar_V) ;
-- some more things
weather_adjCl ap = mkCl (mkVP (mkVA I.hacer_V) (lin AP ap)) ;
is_right_VP = E.ComplCN have_V2 (mkCN (mkN "razón")) ;
is_wrong_VP = mkVP (mkVA I.estar_V) (mkAP (mkA "equivocado")) ;
n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> (lin CN cn)))) (lin A a) ;
bottle_of_CN np = mkCN (lin N2 (mkN2 (mkN "botella" feminine) part_Prep)) np ;
cup_of_CN np = mkCN (lin N2 (mkN2 (mkN "taza") part_Prep)) np ;
glass_of_CN np = mkCN (lin N2 (mkN2 (mkN "vaso") part_Prep)) np ; -- copa
{-
-- spatial deixis and motion verbs
where_go_QCl np = mkQCl where_IAdv (mkCl np (mkVP L.go_V)) ;
where_come_from_QCl np = mkQCl (lin IAdv (ss "de dónde")) (mkCl np (mkVP L.go_V)) ;
go_here_VP = mkVP (mkVP L.go_V) here_Adv ;
come_here_VP = mkVP (mkVP L.come_V) here_Adv ;
come_from_here_VP = mkVP (mkVP L.come_V) (mkAdv "de aquí") ;
go_there_VP = mkVP (mkVP L.go_V) there_Adv ;
come_there_VP = mkVP (mkVP L.come_V) there_Adv ;
come_from_there_VP = mkVP (mkVP L.come_V) (mkAdv "de allí") ; -- "de allá"
-}
lincat
Weekday = N ;
Monthday = NP ;
Month = N ;
Year = NP ;
oper
noPrep : Prep = mkPrep [] ;
lin
weekdayPunctualAdv w = lin Adv {s = w.s ! C.Sg} ; -- lundi
weekdayHabitualAdv w = SyntaxPor.mkAdv noPrep (mkNP the_Det w) ; -- il lunedí ----
weekdayLastAdv w = SyntaxPor.mkAdv noPrep (mkNP the_Det (mkCN (mkA "pasado") w)) ; -- il lunedí scorso
weekdayNextAdv w = SyntaxPor.mkAdv noPrep (mkNP the_Det (mkCN (mkA "próximo") w)) ; -- il lunedí prossimo
monthAdv m = lin Adv {s = "en" ++ m.s ! C.Sg} ; -- in mggio
yearAdv y = SyntaxPor.mkAdv (mkPrep "en") y ; ----
dayMonthAdv d m = ParadigmsPor.mkAdv ("el" ++ (d.s ! R.Nom).comp ++ m.s ! C.Sg) ; -- le 17 mai
monthYearAdv m y = lin Adv {s = "en" ++ m.s ! C.Sg ++ (y.s ! R.Nom).comp} ; -- in maggio 2012
dayMonthYearAdv d m y = ParadigmsPor.mkAdv ("el" ++ (d.s ! R.Nom).comp ++ m.s ! C.Sg ++ (y.s ! R.Nom).comp) ; -- il 17 maggio 2013
intYear = symb ;
intMonthday = symb ;
lincat Language = N ;
lin InLanguage l = SyntaxPor.mkAdv (mkPrep "en") (mkNP l) ;
lin
weekdayN w = w ;
weekdayPN w = mkPN w ;
monthPN m = mkPN m ;
languageNP l = mkNP l ;
languageCN l = mkCN l ;
oper mkLanguage : Str -> N = \s -> mkN s ;
----------------------------------------------
---- lexicon of special names
lin monday_Weekday = mkN "lunes" ;
lin tuesday_Weekday = mkN "martes" ;
lin wednesday_Weekday = mkN "miércoles" ;
lin thursday_Weekday = mkN "jueves" ;
lin friday_Weekday = mkN "viernes" ;
lin saturday_Weekday = mkN "sábado" ;
lin sunday_Weekday = mkN "domingo" ;
lin january_Month = mkN "enero" ;
lin february_Month = mkN "febrero" ;
lin march_Month = mkN "marzo" ;
lin april_Month = mkN "abril" ;
lin may_Month = mkN "mayo" ;
lin june_Month = mkN "junio" ;
lin july_Month = mkN "julio" ;
lin august_Month = mkN "agosto" ;
lin september_Month = mkN "septiembre" ;
lin october_Month = mkN "octubre" ;
lin november_Month = mkN "noviembre" ;
lin december_Month = mkN "diciembre" ;
lin afrikaans_Language = mkLanguage "afrikáans" ;
lin amharic_Language = mkLanguage "amárico" ;
lin arabic_Language = mkLanguage "árabe" ;
lin bulgarian_Language = mkLanguage "búlgaro" ;
lin catalan_Language = mkLanguage "catalán" ;
lin chinese_Language = mkLanguage "chino" ;
lin danish_Language = mkLanguage "danés" ;
lin dutch_Language = mkLanguage "neerlandés" ;
lin english_Language = mkLanguage "inglés" ;
lin estonian_Language = mkLanguage "estonio" ;
lin finnish_Language = mkLanguage "finés" ;
lin french_Language = mkLanguage "francés" ;
lin german_Language = mkLanguage "alemán" ;
lin greek_Language = mkLanguage "griego" ;
lin hebrew_Language = mkLanguage "ebreo" ;
lin hindi_Language = mkLanguage "hindi" ;
lin japanese_Language = mkLanguage "japonés" ;
lin italian_Language = mkLanguage "italiano" ;
lin latin_Language = mkLanguage "latín" ;
lin latvian_Language = mkLanguage "letón" ;
lin maltese_Language = mkLanguage "maltés" ;
lin nepali_Language = mkLanguage "nepalí" ;
lin norwegian_Language = mkLanguage "noruego" ;
lin persian_Language = mkLanguage "persa" ;
lin polish_Language = mkLanguage "polaco" ;
lin punjabi_Language = mkLanguage "punjabi" ;
lin romanian_Language = mkLanguage "rumano" ;
lin russian_Language = mkLanguage "ruso" ;
lin sindhi_Language = mkLanguage "sindhi" ;
lin spanish_Language = mkLanguage "español" | mkLanguage "castellano" ;
lin swahili_Language = mkLanguage "swahili" ;
lin swedish_Language = mkLanguage "sueco" ;
lin thai_Language = mkLanguage "tailandés" ;
lin turkish_Language = mkLanguage "turco" ;
lin urdu_Language = mkLanguage "urdu" ;
}

View File

@@ -0,0 +1,221 @@
--# -path=.:../romance:../abstract:../common:prelude
instance DiffPor of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits] = open CommonRomance, PhonoPor, BeschPor, Prelude in {
flags optimize=noexpand ;
coding=utf8 ;
---- exceptions ----------------
oper
partAgr : VType -> Bool = \vtyp -> False ;
vpAgrSubj : Verb -> VPAgrType = \v -> <verbDefaultPart v, False> ;
vpAgrClits : Verb -> AAgr -> VPAgrType = \v,a -> <verbDefaultPart v, False> ;
--------------------------------
param
Prepos = P_de | P_a ;
VType = VHabere | VRefl ;
oper
dative : Case = CPrep P_a ;
genitive : Case = CPrep P_de ;
prepCase = \c -> case c of {
Nom => [] ;
Acc => [] ;
CPrep P_de => "de" ;
CPrep P_a => "a"
} ;
artDef : Bool -> Gender -> Number -> Case -> Str = \isNP,g,n,c ->
case isNP of {
True => case <g,n,c> of {
<Masc,Sg, _> => prepCase c ++ "el" ;
<Fem, Sg, _> => prepCase c ++ "la" ; ----- ??
<Masc,Pl, _> => prepCase c ++ "los" ;
<Fem ,Pl, _> => prepCase c ++ "las"
} ;
_ => case <g,n,c> of {
<Masc,Sg, CPrep P_de> => "del" ;
<Masc,Sg, CPrep P_a> => "al" ;
<Masc,Sg, _> => prepCase c ++ "el" ;
<Fem ,Sg, CPrep P_de> => chooseDeLa ;
<Fem ,Sg, CPrep P_a> => chooseALa ;
<Fem, Sg, _> => prepCase c ++ chooseLa ;
<Masc,Pl, _> => prepCase c ++ "los" ;
<Fem ,Pl, _> => prepCase c ++ "las"
}
} ;
artIndef = \isNP,g,n,c -> case isNP of {
True => case n of {
Sg => prepCase c ++ genForms "uno" "una" ! g ;
_ => prepCase c ++ genForms "unos" "unas" ! g
} ;
_ => case n of {
Sg => prepCase c ++ genForms "un" "una" ! g ;
_ => prepCase c
}
} ;
possCase = \_,_,c -> prepCase c ;
partitive = \_,c -> prepCase c ;
{-
partitive = \g,c -> case c of {
CPrep P_de => "de" ;
_ => prepCase c ++ artDef g Sg (CPrep P_de)
} ;
-}
conjunctCase : Case -> Case = \c -> case c of {
Nom => Nom ;
_ => Acc
} ;
auxVerb : VType -> (VF => Str) = \_ -> haber_V.s ;
vpAgrClit : Agr -> VPAgr = \a ->
vpAgrNone ;
pronArg = \n,p,acc,dat ->
let
paccp = case acc of {
CRefl => <reflPron n p Acc, p,True> ;
CPron ag an ap => <argPron ag an ap Acc, ap,True> ;
_ => <[],P2,False>
} ;
pdatp = case dat of {
CPron ag an ap => <argPron ag an ap dative, ap,True> ;
_ => <[],P2,False>
} ;
peither = case acc of {
CRefl | CPron _ _ _ => True ;
_ => case dat of {
CPron _ _ _ => True ;
_ => False
}
} ;
defaultPronArg = <pdatp.p1 ++ paccp.p1, [], peither>
---- defaultPronArg = <pdatp.p1 ++ paccp.p1, [], orB paccp.p3 pdatp.p3>
in
---- case <<paccp.p2, pdatp.p2> : Person * Person> of {
---- <P3,P3> => <"se" ++ paccp.p1, [], True> ;
---- _ => defaultPronArg
--- } ;
---- 8/6/2008 efficiency problem in pgf generation: replace the case expr with
---- a constant produces an error in V3 predication with two pronouns
defaultPronArg ;
infForm _ _ _ _ = True ;
mkImperative b p vp =
\\pol,g,n =>
let
pe = case b of {True => P3 ; _ => p} ;
agr = {g = g ; n = n ; p = pe} ;
refl = case vp.s.vtyp of {
VRefl => <reflPron n pe Acc,True> ;
_ => <[],False>
} ;
clpr = <vp.clit1 ++ vp.clit2, [],vp.clit3.hasClit> ;
---- clpr = <[],[],False> ; ----e pronArg agr.n agr.p vp.clAcc vp.clDat ;
----e verb = case <aag.n, pol,pe> of {
----e <Sg,Neg,P2> => (vp.s ! VPInfinit Simul clpr.p3).inf ! aag ;
----e _ => (vp.s ! VPImperat).fin ! agr
----e } ;
verb = vp.s.s ! vImper n pe ;
neg = vp.neg ! pol ;
compl = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! pol
in
neg.p1 ++ verb ++ bindIf refl.p2 ++ refl.p1 ++ bindIf clpr.p3 ++ clpr.p1 ++ compl ;
CopulaType = Bool ;
selectCopula = \isEstar -> case isEstar of {True => estar_V ; False => copula} ;
serCopula = False ;
estarCopula = True ;
negation : RPolarity => (Str * Str) = table {
RPos => <[],[]> ;
RNeg _ => <"no",[]>
} ;
conjThan = "que" ;
conjThat = "que" ;
subjIf = "si" ;
clitInf b cli inf = inf ++ bindIf b ++ cli ;
relPron : Bool => AAgr => Case => Str = \\b,a,c =>
case c of {
Nom | Acc => "que" ;
CPrep P_a => "cuyo" ;
_ => prepCase c ++ "cuyo"
} ;
pronSuch : AAgr => Str = aagrForms "tál" "tál" "tales" "tales" ;
quelPron : AAgr => Str = aagrForms "cuál" "cuál" "cuales" "cuales" ;
partQIndir = [] ; ---- ?
reflPron : Number -> Person -> Case -> Str = \n,p,c ->
let pro = argPron Fem n p c
in
case p of {
P3 => case c of {
Acc | CPrep P_a => "se" ;
_ => "sí"
} ;
_ => pro
} ;
argPron : Gender -> Number -> Person -> Case -> Str =
let
cases : (x,y : Str) -> Case -> Str = \me,moi,c -> case c of {
Acc | CPrep P_a => me ;
_ => moi
} ;
cases3 : (x,y,z : Str) -> Case -> Str = \les,leur,eux,c -> case c of {
Acc => les ;
CPrep P_a => leur ;
_ => eux
} ;
in
\g,n,p -> case <<g,n,p> : Gender * Number * Person> of {
<_,Sg,P1> => cases "me" "mí" ;
<_,Sg,P2> => cases "te" "tí" ;
<_,Pl,P1> => cases "nos" "nosotras" ; --- nosotros
<_,Pl,P2> => cases "vos" "vosotras" ; --- vosotros
<Fem,Sg,P3> => cases3 "la" "le" "ella" ;
<_, Sg,P3> => cases3 "lo" "le" "èl" ;
<Fem,Pl,P3> => cases3 "las" "les" "ellas" ;
<_, Pl,P3> => cases3 "los" "les" "ellos"
} ;
vRefl _ = VRefl ;
isVRefl : VType -> Bool = \ty -> case ty of {
VRefl => True ;
_ => False
} ;
auxPassive : Verb = verbBeschH (estar_2 "estar") ;
copula : Verb = verbBeschH (ser_1 "ser") ;
estar_V : Verb = verbBeschH (estar_2 "estar") ;
haber_V : Verb = verbBeschH (haber_3 "haber") ;
verbBeschH : Verbum -> Verb = \v -> verbBesch v ** {vtyp = VHabere ; p = []} ;
subjPron = \_ -> [] ;
polNegDirSubj = RPos ;
}

View File

@@ -0,0 +1,6 @@
--# -path=.:../abstract:../common
-- documentation of Pornish in Pornish: the default introduced in LangPor
concrete DocumentationPor of Documentation = CatPor **
DocumentationPorFunctor with (Terminology = TerminologyPor) ;

View File

@@ -0,0 +1,226 @@
--# -path=.:../abstract:../common
incomplete concrete DocumentationPorFunctor of Documentation = CatPor ** open
Terminology, -- the interface to be instantiated
ResPor,
CommonRomance,
ParadigmsPor,
(G = GrammarPor),
(S = SyntaxPor),
(L = LexiconPor),
Prelude,
HTML
in {
flags coding=utf8 ;
lincat
Inflection = {t : Str; s1,s2 : Str} ;
Definition = {s : Str} ;
Document = {s : Str} ;
Tag = {s : Str} ;
{-
-} --# notpresent
oper
heading : N -> Str = \n -> (nounHeading n).s ;
lin
InflectionN, InflectionN3, InflectionN3 = \noun -> {
t = "n" ;
s1 = heading1 (heading noun_Category ++
case noun.g of {
Masc => "("+heading masculine_Parameter+")" ;
Fem => "("+heading feminine_Parameter+")"
}) ;
s2 = frameTable (
tr (th (heading singular_Parameter) ++ th (heading plural_Parameter)) ++
tr (td (noun.s ! Sg) ++ td (noun.s ! Pl))
)
} ;
InflectionA, InflectionA2 = \adj -> {
t = "a" ;
s1 = heading1 (nounHeading adjective_Category).s ;
s2 = frameTable (
tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter)) ++
tr (th (heading masculine_Parameter) ++ td (adj.s ! Posit ! (AF Masc Sg)) ++ td (adj.s ! Posit ! (AF Masc Pl))) ++
tr (th (heading feminine_Parameter) ++ td (adj.s ! Posit ! (AF Fem Sg)) ++ td (adj.s ! Posit ! (AF Fem Pl)))
)
} ;
InflectionAdv adv = {
t = "adv" ;
s1 = heading1 "Adverbe" ;
s2 = paragraph adv.s
} ;
InflectionPrep p = {
t = "prep" ;
s1 = heading1 "Préposition" ;
s2 = paragraph p.s
} ;
InflectionV v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v)) ;
s2 = inflVerb v
} ;
InflectionV2 v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v S.something_NP)) ;
s2 = inflVerb v
} ;
InflectionV3 v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v S.something_NP S.something_NP)) ;
s2 = inflVerb v
} ;
InflectionV2V v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP (lin V2V v) S.we_NP (S.mkVP (L.sleep_V)))) ;
s2 = inflVerb v
} ;
InflectionV2S v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ;
s2 = inflVerb v
} ;
InflectionV2Q v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ;
s2 = inflVerb v
} ;
InflectionV2A v = {
t = "v" ;
s1 = heading1 "Verb" ;
s2 = inflVerb v
} ;
InflectionVV v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v (S.mkVP (L.sleep_V)))) ;
s2 = inflVerb v
} ;
InflectionVS v = {
t = "v" ;
s1 = heading1 "Verb" ;
s2 = inflVerb v
} ;
InflectionVQ v = {
t = "v" ;
s1 = heading1 "Verb" ;
s2 = inflVerb v
} ;
InflectionVA v = {
t = "v" ;
s1 = heading1 "Verb" ;
s2 = inflVerb v
} ;
lin
NoDefinition t = {s=t.s};
MkDefinition t d = {s="<p><b>Definición:</b>"++t.s++d.s++"</p>"};
MkDefinitionEx t d e = {s="<p><b>Definición:</b>"++t.s++d.s++"</p><p><b>Ejemplo:</b>"++e.s++"</p>"};
lin
MkDocument b i e = ss (i.s1 ++ "<p style=\"font-size:20px\">"++b.s++"</p>" ++ i.s2 ++ paragraph e.s) ; -- explanation appended in a new paragraph
MkTag i = ss i.t ;
oper
verbExample : CatPor.Cl -> Str = \cl ->
(S.mkUtt cl).s
++ ";" ++ (S.mkUtt (S.mkS S.anteriorAnt cl)).s --# notpresent
;
inflVerb : Verb -> Str = \verb ->
let
vfin : CommonRomance.VF -> Str = \f ->
verb.s ! f ;
ttable : TMood -> Str = \tense ->
frameTable (
tr (th "" ++
th (heading singular_Parameter) ++
th (heading plural_Parameter)) ++
tr (th "1.p" ++
td (vfin (VFin tense Sg P1)) ++
td (vfin (VFin tense Pl P1))) ++
tr (th "2.p" ++
td (vfin (VFin tense Sg P2)) ++
td (vfin (VFin tense Pl P2))) ++
tr (th "3.p" ++
td (vfin (VFin tense Sg P3)) ++
td (vfin (VFin tense Pl P3)))
) ;
ttable2 : (Mood -> TMood) -> Str = \f ->
frameTable (
tr (intagAttr "th" "colspan=2" "" ++
th (heading indicative_Parameter) ++
th (heading conjunctive_Parameter)) ++
tr (intagAttr "th" "rowspan=3" (heading singular_Parameter) ++
th "1.p" ++
td (vfin (VFin (f Indic) Sg P1)) ++
td (vfin (VFin (f Conjunct) Sg P1))) ++
tr (th "2.p" ++
td (vfin (VFin (f Indic) Sg P2)) ++
td (vfin (VFin (f Conjunct) Sg P2))) ++
tr (th "3.p" ++
td (vfin (VFin (f Indic) Sg P3)) ++
td (vfin (VFin (f Conjunct) Sg P3))) ++
tr (intagAttr "th" "rowspan=3" (heading plural_Parameter) ++
th "1.p" ++
td (vfin (VFin (f Indic) Pl P1)) ++
td (vfin (VFin (f Conjunct) Pl P1))) ++
tr (th "2.p" ++
td (vfin (VFin (f Indic) Pl P2)) ++
td (vfin (VFin (f Conjunct) Pl P2))) ++
tr (th "3.p" ++
td (vfin (VFin (f Indic) Pl P3)) ++
td (vfin (VFin (f Conjunct) Pl P3)))
) ;
in heading2 (heading present_Parameter) ++
ttable2 VPres ++
heading2 (heading imperfect_Parameter) ++
ttable2 VImperf
++ heading2 (heading simple_past_Parameter) ++ --# notpresent
ttable VPasse --# notpresent
++ heading2 (heading future_Parameter) ++ --# notpresent
ttable VFut --# notpresent
++ heading2 (heading conditional_Parameter) ++ --# notpresent
ttable VCondit --# notpresent
++ heading2 (heading infinitive_Parameter) ++
paragraph (vfin (VInfin False)) ++
heading2 (heading imperative_Parameter) ++
frameTable (
tr (th "sg.2.p" ++ td (vfin (VImper SgP2))) ++
tr (th "pl.1.p" ++ td (vfin (VImper PlP1))) ++
tr (th "pl.2.p" ++ td (vfin (VImper PlP2)))
) ++
heading2 (heading participle_Parameter) ++
frameTable (
tr (th (heading past_Parameter) ++ td (vfin (VPart Masc Sg))) ++
tr (th (heading present_Parameter) ++ td (vfin VGer))
) ;
{- --# notpresent
-}
}

View File

@@ -0,0 +1,83 @@
concrete ExtraPor of ExtraPorAbs = ExtraRomancePor **
open CommonRomance, PhonoPor, MorphoPor, ParadigmsPor, ParamX, ResPor, BeschPor, (I = IrregPor),
Prelude in {
flags coding=utf8 ;
lin
i8fem_Pron = mkPronoun
"yo" "me" "me" "mí"
"mi" "mi" "mis" "mis"
Fem Sg P1 ;
these8fem_NP = makeNP ["estas"] Fem Pl ;
they8fem_Pron = mkPronoun
"ellas" "las" "les" "ellas"
"su" "su" "sus" "sus"
Fem Pl P3 ;
this8fem_NP = pn2np (mkPN ["esta"] Fem) ;
those8fem_NP = makeNP ["esas"] Fem Pl ;
we8fem_Pron = mkPronoun
"nosotras" "nos" "nos" "nosotras"
"nuestro" "nuestra" "nuestros" "nuestras"
Fem Pl P1 ;
whoPl8fem_IP = {s = \\c => prepCase c ++ "quién" ; a = aagr Fem Pl} ;
whoSg8fem_IP = {s = \\c => prepCase c ++ "quién" ; a = aagr Fem Sg} ;
youSg8fem_Pron = mkPronoun
"tú" "te" "te" "ti"
"tu" "tu" "tus" "tus"
Fem Sg P2 ;
youPl8fem_Pron = mkPronoun
"vosotras" "os" "os" "vosotras"
"vuestro" "vuestra" "vuestros" "vuestras"
Fem Pl P2 ;
youPol8fem_Pron = mkPronoun
"usted" "la" "le" "usted"
"su" "su" "sus" "sus"
Fem Sg P3 ;
youPolPl_Pron = mkPronoun
"ustedes" "los" "les" "usted"
"su" "su" "sus" "sus"
Masc Pl P3 ;
youPolPl8fem_Pron = mkPronoun
"ustedes" "las" "les" "usted"
"su" "su" "sus" "sus"
Fem Pl P3 ;
ImpNeg np vp = lin Utt{
s = (mkClause (np.s ! Nom).comp np.hasClit False np.a vp).s
! DInv ! RPres ! Simul ! RNeg False ! Conjunct
} ;
InvQuestCl cl = {
s = \\t,a,p =>
let cls = cl.s ! DInv ! t ! a ! p
in table {
QDir => cls ! Indic ;
QIndir => subjIf ++ cls ! Indic
}
} ;
-- ExtraRomance.PassVPSlash uses estar
PassVPSlash_ser vps =
let auxvp = predV copula
in
insertComplement (\\a => let agr = complAgr a in vps.s.s ! VPart agr.g agr.n) {
s = auxvp.s ;
agr = auxvp.agr ;
neg = vps.neg ;
clit1 = vps.clit1 ;
clit2 = vps.clit2 ;
clit3 = vps.clit3 ;
isNeg = vps.isNeg ;
comp = vps.comp ;
ext = vps.ext
} ;
ExistsNP np =
mkClause [] True False np.a (insertComplement (\\_ => (np.s ! Nom).ton) (predV (mkV "existir"))) ;
UseComp_estar comp = insertComplement comp.s (predV I.estar_V) ;
}

View File

@@ -0,0 +1,37 @@
-- Structures special for Spanish. These are not implemented in other
-- Romance languages.
abstract ExtraPorAbs = ExtraRomanceAbs ** {
fun
-- Feminine variants of pronouns (those in $Structural$ are
-- masculine, which is the default when gender is unknown).
i8fem_Pron : Pron ;
these8fem_NP : NP ;
they8fem_Pron : Pron ;
this8fem_NP : NP ;
those8fem_NP : NP ;
we8fem_Pron : Pron ; -- nosotras
whoPl8fem_IP : IP ;
whoSg8fem_IP : IP ;
youSg8fem_Pron : Pron ;
youPl8fem_Pron : Pron ; -- vosotras
youPol8fem_Pron : Pron ; -- usted
youPolPl_Pron : Pron ; -- ustedes
youPolPl8fem_Pron : Pron ;
ImpNeg : NP -> VP -> Utt ; --"no fumes"
InvQuestCl : Cl -> QCl ;
PassVPSlash_ser : VPSlash -> VP ;
UseComp_estar : Comp -> VP ; -- esta lleno, as opposed to es lleno
}

View File

@@ -0,0 +1,2 @@
concrete ExtraRomancePor of ExtraRomanceAbs = CatPor ** ExtraRomance with
(ResRomance = ResPor), (Grammar = GrammarPor) ;

View File

@@ -0,0 +1,37 @@
-- Structures special for Pornish. These are not implemented in other
-- Romance languages.
abstract ExtraPorAbs = ExtraRomanceAbs ** {
fun
-- Feminine variants of pronouns (those in $Structural$ are
-- masculine, which is the default when gender is unknown).
i8fem_Pron : Pron ;
these8fem_NP : NP ;
they8fem_Pron : Pron ;
this8fem_NP : NP ;
those8fem_NP : NP ;
we8fem_Pron : Pron ; -- nosotras
whoPl8fem_IP : IP ;
whoSg8fem_IP : IP ;
youSg8fem_Pron : Pron ;
youPl8fem_Pron : Pron ; -- vosotras
youPol8fem_Pron : Pron ; -- usted
youPolPl_Pron : Pron ; -- ustedes
youPolPl8fem_Pron : Pron ;
ImpNeg : NP -> VP -> Utt ; --"no fumes"
InvQuestCl : Cl -> QCl ;
PassVPSlash_ser : VPSlash -> VP ;
UseComp_estar : Comp -> VP ; -- esta lleno, as opposed to es lleno
}

View File

@@ -0,0 +1,23 @@
--# -path=.:../romance:../abstract:../common:prelude
concrete GrammarPor of Grammar =
NounPor,
VerbPor,
AdjectivePor,
AdverbPor,
NumeralPor,
SentencePor,
QuestionPor,
RelativePor,
ConjunctionPor,
PhrasePor,
TextPor - [SC,Temp,Tense,Pol,PPos,PNeg], -- special punctuation
IdiomPor,
StructuralPor,
TensePor
** {
flags startcat = Phr ; unlexer = text ; lexer = text ;
} ;

View File

@@ -0,0 +1,45 @@
concrete IdiomPor of Idiom = CatPor **
open (P = ParamX), MorphoPor, ParadigmsPor, BeschPor, Prelude in {
flags optimize=all_subs ;
lin
ImpersCl vp = mkClause [] True False (agrP3 Masc Sg) vp ;
GenericCl vp =
mkClause [] True False (agrP3 Masc Sg) (insertRefl vp) ; ---- just Italian ?
CleftNP np rs = mkClause [] True False (agrP3 Masc Sg)
(insertComplement (\\_ => rs.s ! Indic ! np.a)
(insertComplement (\\_ => (np.s ! rs.c).ton) (predV copula))) ;
CleftAdv ad s = mkClause [] True False (agrP3 Masc Sg)
(insertComplement (\\_ => conjThat ++ s.s ! Indic)
(insertComplement (\\_ => ad.s) (predV copula))) ;
ExistNP np =
mkClause [] True False (agrP3 Masc Sg)
(insertComplement (\\_ => (np.s ! Acc).ton) (predV (verboV (hay_3 "haber")))) ;
ExistIP ip = {
s = \\t,a,p,_ =>
ip.s ! Nom ++
(mkClause [] True False (agrP3 Masc Sg) (predV (verboV (hay_3 "haber")))).s ! DDir ! t ! a ! p ! Indic
} ;
ProgrVP vp =
insertComplement
(\\agr =>
let
clpr = <vp.clit1,vp.clit2> ; ----e pronArg agr.n agr.p vp.clAcc vp.clDat ;
obj = clpr.p2 ++ vp.comp ! agr ++ vp.ext ! RPos ---- pol
in
vp.s.s ! VGer ++ clpr.p1 ++ obj
)
(predV (verboV (estar_2 "estar"))) ;
ImpPl1 vp = {s =
mkImperative False P1 vp ! RPos ! Masc ! Pl ; --- fem
} ;
}

78348
lib/src/portuguese/IrregPor.gf Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
--# -path=.:../romance:../abstract:../common:../api
concrete LangPor of Lang =
GrammarPor,
LexiconPor
,DocumentationPor --# notpresent
,ConstructionPor
** {
flags startcat = Phr ;
} ;

View File

@@ -0,0 +1,363 @@
--# -path=.:../romance:../common:../abstract:../../prelude
concrete LexiconPor of Lexicon = CatPor ** open
(M=MorphoPor), ParadigmsPor, BeschPor in {
flags
coding=utf8 ;
optimize=values ;
lin
airplane_N = regN "aeroplano" ; -- avión is masculine
answer_V2S = mkV2S (regV "responder") dative ;
apartment_N = regN "apartamento" ;
apple_N = regN "manzana" ;
art_N = regN "arte" ;
ask_V2Q = mkV2Q (regV "preguntar") dative ;
baby_N = regN "bebé" ; -- can be used for both fem. & masc.
bad_A = prefA (mkADeg (regA "malo") (regA "peor")) ;
bank_N = regN "banco" ;
beautiful_A = prefA (regADeg "bello") ; -- bella
become_VA = reflV (mkV "convertir" "convierto") ; --- convertirse en, volverse, ponerse
beer_N = regN "cerveza" ;
beg_V2V = mkV2V (mkV "rogar" "ruego") accusative dative ; -- pedir
big_A = prefA (regADeg "grande") ;
bike_N = regN "bicicleta" ;
bird_N = regN "pájaro" ;
black_A = regADeg "negro" ; -- negra
blue_A = regADeg "azul" ;
boat_N = regN "bote" ;
book_N = regN "libro" ;
boot_N = regN "bota" ;
boss_N = regN "jefe" ;
boy_N = regN "niño" ;
bread_N = regN "pan" ;
break_V2 = dirV2 (special_ppV (regV "romper") "roto") ;
broad_A = regADeg "ancho" ;
brother_N2 = deN2 (regN "hermano") ;
brown_A = regADeg "marrón" ; --- *
butter_N = regN "manteca" ;
buy_V2 = dirV2 (regV "comprar") ;
camera_N = regN "cámara" ; -- ["máquina fotográfica"]
cap_N = regN "gorra" ;
car_N = regN "auto" ;
carpet_N = regN "alfombra" ;
cat_N = regN "gato" ; -- gata
ceiling_N = regN "techo" ;
chair_N = regN "silla" ;
cheese_N = regN "queso" ;
child_N = regN "niño" ; -- niña
church_N = regN "iglesia" ;
city_N = femN (regN "ciudad") ; -- fem
clean_A = regADeg "limpio" ;
clever_A = regADeg "inteligente" ;
close_V2 = dirV2 (mkV "cerrar" "cierro") ;
coat_N = regN "abrigo" ;
cold_A = regADeg "frío" ; -- fría
come_V = verboV (venir_82 "venir") ;
computer_N = regN "ordenador" ; -- also computador, ordenador in Porin
country_N = regN "país" ; -- masc
cousin_N = regN "primo" ;
cow_N = regN "vaca" ;
die_V = verboV (morir_35b "morir") ;
dirty_A = regADeg "sucio" ;
distance_N3 = mkN3 (regN "distancia") genitive dative ;
doctor_N = regN "médico" ; -- médica
dog_N = regN "perro" ; -- perra
door_N = regN "puerta" ;
drink_V2 = dirV2 (regV "tomar") ; -- beber
easy_A2V = mkA2V (regA "fácil") dative genitive ;
eat_V2 = dirV2 (regV "comer") ;
empty_A = regADeg "vacío" ;
enemy_N = regN "enemigo" ; -- enemiga
factory_N = regN "fábrica" ;
father_N2 = deN2 (regN "padre") ;
fear_VS = mkVS (regV "temer") ;
find_V2 = dirV2 (verboV (encontrar_38 "encontrar")) ;
fish_N = mascN (regN "pez") ;
floor_N = regN "suelo" ; -- piso
forget_V2 = dirV2 (regV "olvidar") ;
fridge_N = regN "heladera" ;
friend_N = regN "amigo" ; -- amiga
fruit_N = regN "fruta" ;
fun_AV = mkAV (regA "divertido") genitive ; -- entretenido
garden_N = regN "jardín" ;
girl_N = regN "niña" ;
glove_N = regN "guante" ;
gold_N = regN "oro" ;
good_A = prefA (mkADeg (regA "bueno") (regA "mejor")) ; ---- adv?
go_V = (verboV (ir_46 "ir")) ;
green_A = regADeg "verde" ;
harbour_N = regN "puerto" ;
hate_V2 = dirV2 (mkV "odiar" "odio") ;
hat_N = regN "sombrero" ;
hear_V2 = dirV2 (mkV (oir_51 "oír")) ;
hill_N = regN "colina" ;
hope_VS = mkVS (regV "esperar") ;
horse_N = regN "caballo" ;
hot_A = regADeg "caliente" ;
house_N = regN "casa" ;
important_A = regADeg "importante" ;
industry_N = regN "industria" ;
iron_N = regN "hierro" ;
king_N = regN "rey" ;
know_V2 = mkV2 (verboV (conocer_25 "conocer")) ;
know_VQ = mkVQ (verboV (saber_71 "saber")) ;
know_VS = mkVS (verboV (saber_71 "saber")) ;
lake_N = regN "lago" ;
lamp_N = regN "lámpara" ;
learn_V2 = dirV2 (regV "aprender") ;
leather_N = regN "cuero" ;
leave_V2 = dirV2 (regV "partir") ; -- irse, dejar
like_V2 = dirV2 (regV "gustar") ;
listen_V2 = dirV2 (regV "escuchar") ;
live_V = verboV (vivir_7 "vivir") ;
long_A = regADeg "largo" ;
lose_V2 = dirV2 (verboV (defender_29 "perder")) ;
love_N = regN "amor" ;
love_V2 = dirV2 (regV "amar") ;
man_N = regN "hombre" ; -- masc
married_A2 = mkA2 (regA "casado") dative ;
meat_N = femN (regN "carne") ;
milk_N = femN (regN "leche") ;
moon_N = regN "luna" ;
mother_N2 = deN2 (mkN "madre" feminine) ;
mountain_N = mkN "montaña" ;
music_N = mkN "música" ;
narrow_A = regADeg "estrecho" ;
new_A = prefA (regADeg "nuevo") ;
newspaper_N = mkN "periódico" ; -- diario
oil_N = mkN "aceite" ;
old_A = prefA (regADeg "viejo") ;
open_V2 = dirV2 (special_ppV (regV "abrir") "abierto") ;
paint_V2A = mkV2A (regV "pintar") accusative (mkPrep "en") ;
paper_N = mkN "papel" ;
paris_PN = mkPN "París" masculine ;
peace_N = mkN "paz" feminine ;
pen_N = mkN "lapicera" ;
planet_N = mkN "planeta" masculine ;
plastic_N = mkN "plástico" ;
play_V2 = dirV2 (verboV (jugar_47 "jugar")) ;
policeman_N = mkN "policía" masculine ; -- fem refers to the institution
priest_N = mkN "cura" masculine ; -- masc
probable_AS = mkAS (regA "probable") ;
queen_N = mkN "reina" ;
question_N = mkN "pregunta" ;
radio_N = mkN "radio" feminine ;
rain_V0 = mkV0 (verboV (llover_89 "llover")) ;
read_V2 = dirV2 (verboV (creer_26 "leer")) ;
reason_N = mkN "razón" feminine ;
red_A = regADeg "rojo" ;
religion_N = mkN "religión" "religiones" feminine ;
restaurant_N = mkN "restaurante" ; -- restorán, restaurán, masc
river_N = mkN "río" ;
rock_N = mkN "roca" ;
roof_N = mkN "techo" ;
rubber_N = regN "goma" ;
run_V = regV "correr" ;
say_VS = mkVS (verboV (decir_28 "decir")) ;
school_N = regN "escuela" ;
science_N = regN "ciencia" ;
sea_N = regN "mar" ; -- masc & fem
seek_V2 = dirV2 (regV "buscar") ;
see_V2 = dirV2 (verboV (ver_83 "ver")) ;
sell_V3 = dirV3 (regV "vender") dative ;
send_V3 = dirV3 (regV "mandar") dative ;
sheep_N = regN "oveja" ;
ship_N = femN (regN "nave") ;
shirt_N = regN "camisa" ;
shoe_N = regN "zapato" ;
shop_N = regN "negocio" ;
short_A = regADeg "corto" ; --- breve
silver_N = regN "plata" ;
sister_N = regN "hermana" ;
sleep_V = verboV (dormir_35 "dormir") ;
small_A = prefA (regADeg "pequeño") ;
snake_N = femN (regN "serpiente") ; -- fem
sock_N = regN "media" ;
speak_V2 = dirV2 (regV "hablar") ;
star_N = regN "estrella" ;
steel_N = regN "acero" ;
stone_N = regN "piedra" ;
stove_N = regN "horno" ; -- estufa
student_N = regN "estudiante" ; -- used both for fem & masc
stupid_A = regADeg "estúpido" ;
sun_N = regN "sol" ;
switch8off_V2 = dirV2 (regV "apagar") ;
switch8on_V2 = dirV2 (regV "prender") ;
table_N = regN "mesa" ;
talk_V3 = mkV3 (regV "hablar") dative genitive ;
teacher_N = regN "maestro" ; -- maestra
teach_V2 = dirV2 (regV "enseñar") ;
television_N = mkN "televisión" feminine ; -- televisor masc
thick_A = regADeg "grueso" ;
thin_A = regADeg "fino" ; -- delgado
train_N = regN "tren" ;
travel_V = regV "viajar" ;
tree_N = regN "árbol" ;
--- trousers_N = regN "pantalón" ; -- masc
ugly_A = regADeg "feo" ;
understand_V2 = dirV2 (mkV "entender" "entiendo") ;
university_N = femN (regN "universidad") ;
village_N = regN "pueblo" ;
wait_V2 = mkV2 (regV "esperar") dative ;
walk_V = mkV "caminar" ;
warm_A = regADeg "caliente" ;
war_N = mkN "guerra" ;
watch_V2 = dirV2 (regV "mirar") ; -- ver
water_N = mkN "agua" ;
white_A = compADeg (regA "blanco") ;
window_N = regN "ventana" ;
wine_N = regN "vino" ;
win_V2 = dirV2 (regV "ganar") ;
woman_N = mkN "mujer" feminine ;
wonder_VQ = mkVQ (reflV (regV "preguntar")) ;
wood_N = regN "madera" ;
write_V2 = dirV2 (special_ppV (regV "escribir") "escrito") ;
yellow_A = regADeg "amarillo" ;
young_A = prefA (mkA "joven" "joven" "jóvenes" "jóvenes" "jovenamente") ;
do_V2 = dirV2 (verboV (hacer_44 "hacer")) ;
now_Adv = mkAdv "ahora" ;
already_Adv = mkAdv "ya" ;
song_N = mkN "canción" "canciones" feminine ;
add_V3 = dirV3 (regV "sumar") dative ;
number_N = regN "número" ;
put_V2 = dirV2 (verboV (poner_60 "poner")) ;
stop_V = regV "parar" ;
jump_V = regV "saltar" ;
left_Ord = M.mkOrd (regA "izquierda") ;
right_Ord = M.mkOrd (regA "derecha") ;
far_Adv = mkAdv "lejos" ; ----?
correct_A = regA "correcto" ;
dry_A = regA "seco" ;
dull_A = regA "desafilado" ;
full_A = regA "lleno" ;
heavy_A = regA "pesado" ;
near_A = regA "cercano" ;
rotten_A = regA "podrido" ;
round_A = regA "redondo" ;
sharp_A = regA "filoso" ; -- afilado, puntiagudo
smooth_A = regA "liso" ; -- suave
straight_A = regA "directo" ;
wet_A = regA "mojado" ;
wide_A = regA "ancho" ; -- extenso
animal_N = regN "animal" ; -- masc (sometimes fem when adj)
ashes_N = regN "ceniza" ;
back_N = regN "espalda" ;
bark_N = regN "corteza" ;
belly_N = regN "panza" ; -- barriga
blood_N = femN (regN "sangre") ;
bone_N = regN "hueso" ;
breast_N = regN "seno" ; -- pecho
cloud_N = femN (regN "nube") ;
day_N = mascN (regN "día") ;
dust_N = regN "polvo" ;
ear_N = regN "oreja" ;
earth_N = regN "tierra" ;
egg_N = regN "huevo" ;
eye_N = regN "ojo" ;
fat_N = regN "grasa" ;
feather_N = regN "pluma" ;
fingernail_N = regN "uña" ;
fire_N = regN "fuego" ;
flower_N = femN (regN "flor") ;
fog_N = regN "niebla" ;
foot_N = regN "pie" ;
forest_N = regN "bosque" ;
grass_N = regN "pasto" ; -- hierba, césped (masc)
guts_N = regN "tripa" ; -- gut=intestino ---- pl.t. tripas
hair_N = regN "cabello" ; -- pelo
hand_N = femN (regN "mano") ;
head_N = regN "cabeza" ;
heart_N = mkN "corazón" "corazones" masculine ;
horn_N = regN "cuerno" ;
husband_N = regN "marido" ; -- esposo
ice_N = regN "hielo" ;
knee_N = regN "rodilla" ;
leaf_N = regN "hoja" ;
leg_N = regN "pierna" ;
liver_N = regN "hígado" ;
louse_N = regN "piojo" ;
mouth_N = regN "boca" ;
name_N = regN "nombre" ;
neck_N = regN "cuello" ;
night_N = femN (regN "noche") ;
nose_N = femN (regN "nariz") ;
person_N = regN "persona" ;
rain_N = regN "lluvia" ;
road_N = femN (regN "calle") ; -- camino
root_N = femN (regN "raíz") ;
rope_N = regN "cuerda" ;
salt_N = femN (regN "sal") ;
sand_N = regN "arena" ;
seed_N = regN "semilla" ;
skin_N = femN (regN "piel") ; -- fem
sky_N = regN "cielo" ;
smoke_N = regN "humo" ;
snow_N = femN (regN "nieve") ; -- fem
stick_N = mkN "bastón" "bastones" masculine ; -- palo
tail_N = regN "cola" ;
tongue_N = regN "lengua" ;
tooth_N = regN "diente" ;
wife_N = regN "esposa" ;
wind_N = regN "viento" ;
wing_N = regN "ala" ;
worm_N = regN "gusano" ; -- lombriz (fem)
year_N = regN "año" ;
bite_V2 = dirV2 (verboV (morder_50b "morder")) ;
blow_V = regV "soplar" ;
burn_V = regV "quemar" ;
count_V2 = dirV2 (verboV (contar_38b "contar")) ;
cut_V2 = dirV2 (regV "cortar") ;
dig_V = regV "escarbar" ;
fall_V = verboV (caer_20 "caer") ;
fear_V2 = dirV2 (regV "temer") ;
fight_V2 = dirV2 (regV "pelear") ;
float_V = regV "flotar" ;
flow_V = verboV (influir_45 "fluir") ; -- circular
fly_V = regV "volar" ;
freeze_V = regV "congelar" ;
give_V3 = dirdirV3 (verboV (dar_27 "dar")) ;
hit_V2 = dirV2 (regV "golpear") ;
hold_V2 = dirV2 (verboV (tener_4 "tener")) ;
hunt_V2 = dirV2 (regV "cazar") ;
kill_V2 = dirV2 (regV "matar") ;
laugh_V = regV "reir" ; ----V reír_67
lie_V = reflV (regV "acostar") ; -- "acostarse"
play_V = regV "jugar" ;
pull_V2 = dirV2 (regV "tirar") ;
push_V2 = dirV2 (regV "empujar") ;
rub_V2 = dirV2 (regV "resfregar") ;
scratch_V2 = dirV2 (regV "rascar") ;
sew_V = regV "coser" ;
sing_V = regV "cantar" ;
sit_V = reflV (mkV "sentar" "siento") ;
smell_V = verboV (oler_52 "oler") ;
spit_V = regV "escupir" ;
split_V2 = dirV2 (regV "separar") ; -- dividir,) ;
squeeze_V2 = dirV2 (regV "exprimir") ;
stab_V2 = dirV2 (regV "apuñalar") ;
stand_V = verboV (estar_2 "estar") ; ---- "estar de pie" ;
suck_V2 = dirV2 (regV "chupar") ;
swell_V = regV "tragar" ;
swim_V = regV "nadar" ;
think_V = regV "pensar" ;
throw_V2 = dirV2 (regV "tirar") ;
tie_V2 = dirV2 (regV "atar") ;
turn_V = regV "doblar" ;
vomit_V = regV "vomitar" ;
wash_V2 = dirV2 (regV "lavar") ;
wipe_V2 = dirV2 (regV "secar") ;
breathe_V = (regV "respirar") ;
john_PN = mkPN "Juan" masculine ;
today_Adv = mkAdv "hoy" ;
grammar_N = regN "gramática" ;
language_N = regN "lengua" ;
rule_N = regN "regla" ;
} ;

View File

@@ -0,0 +1,23 @@
--# -path=.:../romance:../common:../abstract
resource MakeStructuralPor = open CatPor, (P = ParadigmsPor), MorphoPor, Prelude in {
oper
mkConj : Str -> Str -> Number -> Conj = \x,y,n ->
{s1 = x ; s2 = y ; n = n ; lock_Conj = <>} ;
mkSubj : Str -> Subj = \x ->
{s = x ; m = Indic ; lock_Subj = <>} ;
mkSubjSubj : Str -> Subj = \x ->
{s = x ; m = Conjunct ; lock_Subj = <>} ;
mkIQuant : Str -> IQuant = \s ->
{s = \\_,_,c => prepCase c ++ s ; lock_IQuant = <>} ;
mkPredet : Str -> Str -> Prep -> Bool -> Predet = \m,f,c,p -> lin Predet {
s = \\g,k => prepCase k ++ case g.g of {Masc => m ; Fem => f} ;
c = c.c ;
a = if_then_else PAgr p (PAg Sg) PNoAg ---- e,g, "chacun de"; other possibilities?
} ;
}

View File

@@ -0,0 +1,204 @@
--# -path=.:../romance:../common:../../prelude
--1 A Simple Pornish Resource Morphology
--
-- Aarne Ranta 2002 -- 2005
--
-- This resource morphology contains definitions needed in the resource
-- syntax. To build a lexicon, it is better to use $ParadigmsPor$, which
-- gives a higher-level access to this module.
resource MorphoPor = CommonRomance, ResPor **
open PhonoPor, Prelude, Predef,
CatPor in {
flags optimize=all ;
coding=utf8 ;
--2 Nouns
--
-- The following macro is useful for creating the forms of number-dependent
-- tables, such as common nouns.
oper
numForms : (_,_ : Str) -> Number => Str = \vino, vini ->
table {Sg => vino ; Pl => vini} ;
-- For example:
nomVino : Str -> Number => Str = \vino ->
numForms vino (vino + "s") ;
nomPilar : Str -> Number => Str = \pilar ->
numForms pilar (pilar + "es") ;
nomTram : Str -> Number => Str = \tram ->
numForms tram tram ;
-- Common nouns are inflected in number and have an inherent gender.
mkNoun : (Number => Str) -> Gender -> Noun = \mecmecs,gen ->
{s = mecmecs ; g = gen} ;
mkNounIrreg : Str -> Str -> Gender -> Noun = \mec,mecs ->
mkNoun (numForms mec mecs) ;
mkNomReg : Str -> Noun = \mec ->
case mec of {
_ + ("o" | "e" | "é" | "á") => mkNoun (nomVino mec) Masc ; --bebé, papá; how about other accented vocal endings? champú champúes
_ + "a" => mkNoun (nomVino mec) Fem ;
_ + "z" => mkNounIrreg mec (init mec + "ces") Fem ;
_ + "ión" => mkNounIrreg mec (tk 2 mec + "ones") Fem ;
_ + "tud" => mkNounIrreg mec (mec + "es") Fem ;
_ + "án" => mkNounIrreg mec (tk 2 mec + "anes") Masc ;
_ + "én" => mkNounIrreg mec (tk 2 mec + "enes") Masc ;
_ + "ín" => mkNounIrreg mec (tk 2 mec + "ines") Masc ;
_ + "ón" => mkNounIrreg mec (tk 2 mec + "ones") Masc ;
_ + "ún" => mkNounIrreg mec (tk 2 mec + "unes") Masc ;
_ => mkNoun (nomPilar mec) Masc
} ;
--2 Adjectives
--
-- Adjectives are conveniently seen as gender-dependent nouns.
-- Here are some patterns. First one that describes the worst case.
mkAdj : (_,_,_,_,_ : Str) -> Adj = \solo,sola,soli,sole,solamente ->
{s = table {
AF Masc n => numForms solo soli ! n ;
AF Fem n => numForms sola sole ! n ;
AA => solamente
}
} ;
-- Then the regular and invariant patterns.
adjSolo : Str -> Adj = \solo ->
let
sol = Predef.tk 1 solo
in
mkAdj solo (sol + "a") (sol + "os") (sol + "as") (sol + "amente") ;
-- masculine and feminine are identical:
-- adjectives ending with -e, -a and many but not all that end in a consonant
adjUtil : Str -> Str -> Adj = \util,utiles ->
mkAdj util util utiles utiles (util + "mente") ;
-- adjectives that end in consonant but have different masc and fem forms
-- español, hablador ...
adjEspanol : Str -> Str -> Adj = \espanol,espanola ->
mkAdj espanol espanola (espanol + "es") (espanol + "as") (espanola + "mente") ;
adjBlu : Str -> Adj = \blu ->
mkAdj blu blu blu blu blu ; ---
-- francés francesa franceses francesas
adjEs : Str -> Adj = \francEs ->
let franc : Str = Predef.tk 2 francEs ;
frances : Str = franc + "es" ;
in mkAdj francEs (frances + "a") (frances + "es") (frances + "as") (frances + "amente") ;
-- alemán alemana alemanes alemanas
adjVn : Str -> Adj = \alemAn ->
let alemA : Str = init alemAn ;
alem : Str = init alemA ;
A : Str = last alemA ;
V : Str = case A of {
"á" => "a" ;
"é" => "e" ;
"í" => "i" ;
"ó" => "o" ;
"ú" => "u"
} ;
alemVn : Str = alem + V + "n" ;
in mkAdj alemAn (alemVn + "a") (alemVn + "es")
(alemVn + "as") (alemVn + "amente") ;
mkAdjReg : Str -> Adj = \solo ->
case solo of {
_ + "o" => adjSolo solo ;
_ + ("e" | "a") => adjUtil solo (solo + "s") ;
_ + "és" => adjEs solo ;
_ + ("á" | "é" | "í" | "ó" | "ú") + "n" => adjVn solo ;
_ => adjUtil solo (solo + "es")
} ;
--2 Personal pronouns
--
-- All the eight personal pronouns can be built by the following macro.
-- The use of "ne" as atonic genitive is debatable.
-- We follow the rule that the atonic nominative is empty.
mkPronoun : (_,_,_,_,_,_,_,_ : Str) ->
Gender -> Number -> Person -> Pronoun =
\il,le,lui,Lui,son,sa,ses,see,g,n,p ->
let
alui : Case -> Str = \x -> prepCase x ++ Lui ;
in {
s = table {
Nom => {c1 = [] ; c2 = [] ; comp = il ; ton = Lui} ;
Acc => {c1 = le ; c2 = [] ; comp = [] ; ton = Lui} ;
CPrep P_a => {c1 = [] ; c2 = lui ; comp = [] ; ton = alui (CPrep P_a)} ;
c => {c1 = [] ; c2 = [] ; comp, ton = alui c}
} ;
poss = \\n,g => case <n,g> of {
<Sg,Masc> => son ;
<Sg,Fem> => sa ;
<Pl,Masc> => ses ;
<Pl,Fem> => see
} ;
a = Ag g n p ;
hasClit = True ; isPol = False
} ;
--2 Determiners
--
-- Determiners, traditionally called indefinite pronouns, are inflected
-- in gender and number, like adjectives.
pronForms : Adj -> Gender -> Number -> Str = \tale,g,n -> tale.s ! AF g n ;
mkOrdinal : A -> Ord = \adj->
lin Ord {
s = \\ag => adj.s ! Posit ! AF ag.g ag.n ;
} ;
mkQuantifier : (ese,esa,esos,esas : Str) -> Quant = \ese,esa,esos,esas->
let
se : Str = Predef.drop 1 ese ;
sa : Str = Predef.drop 1 esa ;
sos : Str = Predef.drop 1 esos ;
sas : Str = Predef.drop 1 esas ;
E : Str = "é" ;
attrforms : Number => Gender => Case => Str = table {
Sg => \\g,c => prepCase c ++ genForms ese esa ! g ;
Pl => \\g,c => prepCase c ++ genForms esos esas ! g ----
} ;
npforms : Number => Gender => Case => Str = table {
Sg => \\g,c => prepCase c ++ genForms (E + se) (E + sa) ! g ;
Pl => \\g,c => prepCase c ++ genForms (E + sos) (E + sas) ! g }
in lin Quant {
s = \\_ => attrforms ;
s2 = [] ;
sp = npforms ; isNeg = False
} ;
mkDeterminer : (mucho,mucha : Str) -> Number -> Bool -> Det = \mucho,mucha,number,neg ->
lin Det {
s,sp = \\g,c => prepCase c ++ genForms mucho mucha ! g ;
n = number;
s2 = [] ;
isNeg = neg
} ;
mkIDet : (cuantos, cuantas : Str) -> Number -> IDet = \cuantos,cuantas,number ->
lin IDet {
s = \\g,c => prepCase c ++ genForms cuantos cuantas ! g ;
n = number
} ;
}

View File

@@ -0,0 +1,2 @@
concrete NounPor of Noun = CatPor ** NounRomance with
(ResRomance = ResPor) ;

View File

@@ -0,0 +1,144 @@
concrete NumeralPor of Numeral = CatPor [Numeral,Digits] **
open CommonRomance, ResRomance, MorphoPor, Prelude in {
flags coding=utf8 ;
lincat
Digit = {s : DForm => CardOrd => Str} ;
Sub10 = {s : DForm => CardOrd => Str ; n : Number} ;
Sub100 = {s : CardOrd => Str ; n : Number} ;
Sub1000 = {s : CardOrd => Str ; n : Number} ;
Sub1000000 = {s : CardOrd => Str ; n : Number} ;
lin num x = x ;
lin n2 =
mkTal "dos" "doce" "veinte" "doscientos"
"segundo" "duodécimo" "vigésimo" "ducentésimo" ;
lin n3 =
mkTal "tres" "trece" "treinta" "trescientos"
"tercero" "decimotercero" "trigésimo" "tricentesimo" ;
lin n4 =
mkTal "cuatro" "catorce" "cuarenta" "cuatrocientos"
"cuarto" "decimocuarto" "cuadragésimo" "cuadringentesimo" ;
lin n5 =
mkTal "cinco" "quince" "cincuenta" "quinientos"
"quinto" "decimoquinto" "quincuagésimo" "guingentésimo" ;
lin n6 =
mkTal "seis" "dieciséis" "sesenta" "seiscientos"
"sexto" "decimosexto" "sexagésimo" "sexcentesimo" ;
lin n7 =
mkTal "siete" "diecisiéte" "setenta" "setecientos"
"séptimo" "decimoséptimo" "septuagésimo" "septingentesimo" ;
lin n8 =
mkTal "ocho" "dieciocho" "ochenta" "ochocientos"
"octavo" "decimoctavo" "octogésimo" "octingentésimo" ;
lin n9 =
mkTal "nueve" "diecinueve" "noventa" "novecientos"
"noveno" "decimonoveno" "nonagésimo" "noningentésimo" ;
lin pot01 =
let uno = (mkTal "uno" "once" "diez" "ciento" "primero" "undécimo"
"décimo" "centésimo").s in
{s =\\f,g => case <f,g> of {
<ental pred,_> => [] ;
<ental _, NCard Masc> => "un" ;
<ental _, NCard Fem> => "una" ;
<hundra False, NCard _> => "cien" ;
<hundra True, NCard Fem> => "ciento" ;
_ => uno ! f ! g
} ;
n = Sg
} ;
lin pot0 d = {s = d.s ; n = Pl} ;
lin pot110 = spl ((mkTal "diez" [] [] [] "decimo" [] [] []).s ! ental indip) ;
lin pot111 = spl ((mkTal "once" [] [] [] "undécimo" [] [] []).s ! ental indip) ;
lin pot1to19 d = spl (d.s ! ton) ;
lin pot0as1 n = {s = n.s ! ental indip ; n = n.n} ;
lin pot1 d = spl (d.s ! tiotal) ;
lin pot1plus d e =
{s = \\g => d.s ! tiotal ! g ++ y_CardOrd g ++ e.s ! ental indip ! g ; n = Pl} ;
lin pot1as2 n = n ;
lin pot2 d = spl (d.s ! hundra False) ;
lin pot2plus d e =
{s = \\g => d.s ! hundra True ! g ++ e.s ! g ; n = Pl} ;
lin pot2as3 n = n ;
lin pot3 n = spl (\\g => n.s ! NCard Masc ++ mil g) ;
lin pot3plus n m = {s = \\g => n.s ! NCard Masc ++ mil g ++ m.s ! g ; n = Pl} ;
oper
mkTal : (x1,_,_,_,_,_,_,x8 : Str) -> {s : DForm => CardOrd => Str} =
\due,dodici,venti,ducento,secondo,dodicesimo,ventesimo,ducentesimo ->
{s = \\d,co => case <d,co> of {
<ental _, NCard _> => due ;
<ental _, NOrd g n> => pronForms (adjSolo secondo) g n ;
<tiotal, NCard _> => venti ;
<tiotal, NOrd g n> => regCard ventesimo g n ;
<ton, NCard _> => dodici ;
<ton, NOrd g n> => regCard dodicesimo g n ;
<hundra _, NCard Masc> => ducento ;
<hundra _, NCard Fem> => Predef.tk 2 ducento + "as" ;
<hundra _, NOrd g n> => regCard ducentesimo g n
}
} ;
regCard : Str -> Gender -> Number -> Str = \ventesimo ->
pronForms (adjSolo ventesimo) ;
spl : (CardOrd => Str) -> {s : CardOrd => Str ; n : Number} = \s -> {
s = s ;
n = Pl
} ;
mil : CardOrd -> Str = \g ->
(mkTal "mil" [] [] [] "milésimo" [] [] []).s ! ental indip ! g ;
y_CardOrd : CardOrd -> Str = \co -> case co of {
NCard _ => "y" ;
_ => []
} ;
param
DForm = ental Pred | ton | tiotal | hundra Bool ;
Pred = pred | indip ;
-- numerals as sequences of digits
lincat
Dig = TDigit ;
lin
IDig d = d ;
IIDig d i = {
s = \\o => d.s ! NCard Masc ++ BIND ++ i.s ! o ;
n = Pl
} ;
D_0 = mkDig "0" ;
D_1 = mk3Dig "1" "1:o" Sg ; ---- gender
D_2 = mk2Dig "2" "2:o" ;
D_3 = mk2Dig "3" "3:o" ;
D_4 = mkDig "4" ;
D_5 = mkDig "5" ;
D_6 = mkDig "6" ;
D_7 = mkDig "7" ;
D_8 = mkDig "8" ;
D_9 = mkDig "9" ;
oper
mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c o Pl ;
mkDig : Str -> TDigit = \c -> mk2Dig c (c + ":o") ;
mk3Dig : Str -> Str -> Number -> TDigit = \c,o,n -> {
s = table {NCard _ => c ; NOrd _ _ => o} ; ---- gender
n = n
} ;
TDigit = {
n : Number ;
s : CardOrd => Str
} ;
}

View File

@@ -0,0 +1,540 @@
--# -path=.:../romance:../common:../abstract:../../prelude
--1 Pornish Lexical Paradigms
--
-- Aarne Ranta 2004 - 2006
--
-- This is an API for the user of the resource grammar
-- for adding lexical items. It gives functions for forming
-- expressions of open categories: nouns, adjectives, verbs.
--
-- Closed categories (determiners, pronouns, conjunctions) are
-- accessed through the resource syntax API, $Structural.gf$.
--
-- The main difference with $MorphoPor.gf$ is that the types
-- referred to are compiled resource grammar types. We have moreover
-- had the design principle of always having existing forms, rather
-- than stems, as string arguments of the paradigms.
--
-- The structure of functions for each word class $C$ is the following:
-- first we give a handful of patterns that aim to cover all
-- regular cases. Then we give a worst-case function $mkC$, which serves as an
-- escape to construct the most irregular words of type $C$. For
-- verbs, there is a fairly complete list of irregular verbs in
-- [``IrregPor`` ../../spanish/IrregPor.gf].
resource ParadigmsPor =
open
(Predef=Predef),
Prelude,
MorphoPor,
BeschPor,
CatPor in {
flags optimize=all ;
coding=utf8 ;
--2 Parameters
--
-- To abstract over gender names, we define the following identifiers.
oper
Gender : Type ;
masculine : Gender ;
feminine : Gender ;
-- To abstract over number names, we define the following.
Number : Type ;
singular : Number ;
plural : Number ;
-- Prepositions used in many-argument functions are either strings
-- (including the 'accusative' empty string) or strings that
-- amalgamate with the following word (the 'genitive' "de" and the
-- 'dative' "a").
accusative : Prep ; -- direct object
genitive : Prep ; -- preposition "de" and its contractions
dative : Prep ; -- preposition "a" and its contractions
mkPrep : overload {
mkPrep : Str -> Prep ; -- other preposition
mkPrep : Str -> Prep -> Prep ; -- compound prepositions, e.g. "antes de", made as mkPrep "antes" genitive
} ;
--2 Nouns
mkN : overload {
-- The regular function takes the singular form and the gender,
-- and computes the plural and the gender by a heuristic.
-- The heuristic says that the gender is feminine for nouns
-- ending with "a" or "z", and masculine for all other words.
-- Nouns ending with "a", "o", "e" have the plural with "s",
-- those ending with "z" have "ces" in plural; all other nouns
-- have "es" as plural ending. The accent is not dealt with.
mkN : (luz : Str) -> N ; -- predictable; feminine for "-a"/"-z", otherwise masculine
-- A different gender can be forced.
mkN : Str -> Gender -> N ; -- force gender
-- The worst case has two forms (singular + plural) and the gender.
mkN : (baston,bastones : Str) -> Gender -> N -- worst case
} ;
--3 Compound nouns
--
-- Some nouns are ones where the first part is inflected as a noun but
-- the second part is not inflected. e.g. "número de teléfono".
-- They could be formed in syntax, but we give a shortcut here since
-- they are frequent in lexica.
compN : N -> Str -> N ; -- compound, e.g. "número" + "de teléfono"
--3 Relational nouns
--
-- Relational nouns ("fille de x") need a case and a preposition.
mkN2 : N -> Prep -> N2 ; -- relational noun with preposition
-- The most common cases are the genitive "de" and the dative "a",
-- with the empty preposition.
deN2 : N -> N2 ; -- relational noun with preposition "de"
aN2 : N -> N2 ; -- relational noun with preposition "a"
-- Three-place relational nouns ("la connessione di x a y") need two prepositions.
mkN3 : N -> Prep -> Prep -> N3 ; -- prepositions for two complements
--3 Relational common noun phrases
--
-- In some cases, you may want to make a complex $CN$ into a
-- relational noun (e.g. "the old town hall of"). However, $N2$ and
-- $N3$ are purely lexical categories. But you can use the $AdvCN$
-- and $PrepNP$ constructions to build phrases like this.
--
--3 Proper names and noun phrases
--
-- Proper names need a string and a gender.
-- The default gender is feminine for names ending with "a", otherwise masculine.
mkPN : overload {
mkPN : (Anna : Str) -> PN ; -- feminine for "-a"
mkPN : (Pilar : Str) -> Gender -> PN ; -- force gender
mkPN : N -> PN ; -- gender from noun
} ;
--2 Adjectives
mkA : overload {
-- For regular adjectives, all forms are derived from the
-- masculine singular. The types of adjectives that are recognized are
-- "alto", "fuerte", "util". Comparison is formed by "mas".
mkA : (util : Str) -> A ; -- predictable adjective
-- Some adjectives need the feminine form separately.
mkA : (espanol,espanola : Str) -> A ;
-- One-place adjectives compared with "mas" need five forms in the worst
-- case (masc and fem singular, masc plural, adverbial).
mkA : (solo,sola,solos,solas,solamente : Str) -> A ; -- worst-case
-- In the worst case, two separate adjectives are given:
-- the positive ("bueno"), and the comparative ("mejor").
mkA : (bueno : A) -> (mejor : A) -> A -- special comparison (default with "mas")
} ;
-- The functions above create postfix adjectives. To switch
-- them to prefix ones (i.e. ones placed before the noun in
-- modification, as in "buen vino"), the following function is
-- provided.
prefixA : A -> A ; -- adjective before noun (default after noun)
--3 Two-place adjectives
--
-- Two-place adjectives need a preposition for their second argument.
mkA2 : A -> Prep -> A2 ; -- e.g. "casado" + dative
--2 Adverbs
-- Adverbs are not inflected. Most lexical ones have position
-- after the verb.
mkAdv : Str -> Adv ;
-- Some appear next to the verb (e.g. "siempre").
mkAdV : Str -> AdV ;
-- Adverbs modifying adjectives and sentences can also be formed.
mkAdA : Str -> AdA ;
mkAdN : Str -> AdN ;
--2 Verbs
mkV : overload {
-- Regular verbs are ones inflected like "cortar", "deber", or "vivir".
-- The regular verb function is the first conjugation ("ar") recognizes
-- the variations corresponding to the patterns
-- "actuar, cazar, guiar, pagar, sacar". The module $BeschPor$ gives
-- the complete set of "Bescherelle" conjugations.
mkV : (pagar : Str) -> V ; -- regular in "-ar", "-er", ".ir"
-- Verbs with vowel alternatition in the stem - easiest to give with
-- two forms, e.g. "mostrar"/"muestro".
mkV : (mostrar,muestro : Str) -> V ; -- regular with vowel alternation
-- Most irreguler verbs are found in $IrregPor$. If this is not enough,
-- the module $BeschPor$ gives all the patterns of the "Bescherelle"
-- book. To use them in the category $V$, wrap them with the function
mkV : Verbum -> V ; -- import verb constructed with BeschPor
mkV : V -> Str -> V ; -- particle verb
} ;
-- To form reflexive verbs:
reflV : V -> V ; -- reflexive verb
-- Verbs with a deviant passive participle: just give the participle
-- in masculine singular form as second argument.
special_ppV : V -> Str -> V ; -- deviant past participle, e.g. abrir - abierto
--3 Two-place verbs
--
-- Two-place verbs need a preposition, except the special case with direct object.
-- (transitive verbs).
mkV2 : overload {
mkV2 : Str -> V2 ; -- regular, direct object
mkV2 : V -> V2 ; -- direct object
mkV2 : V -> Prep -> V2 -- other object
} ;
-- You can reuse a $V2$ verb in $V$.
v2V : V2 -> V ; --%
--3 Three-place verbs
--
-- Three-place (ditransitive) verbs need two prepositions, of which
-- the first one or both can be absent.
mkV3 : overload {
mkV3 : V -> V3 ; -- donner (+ accusative + dative)
mkV3 : V -> Prep -> V3 ; -- placer (+ accusative) + dans
mkV3 : V -> Prep -> Prep -> V3 -- parler + dative + genitive
} ;
dirV3 : V -> Prep -> V3 ; -- e.g. dar,(accusative),a
dirdirV3 : V -> V3 ; -- e.g. dar,(dative),(accusative)
--3 Other complement patterns
--
-- Verbs and adjectives can take complements such as sentences,
-- questions, verb phrases, and adjectives.
mkV0 : V -> V0 ; --%
mkVS : V -> VS ;
mkVV : V -> VV ; -- plain infinitive: "quiero hablar"
deVV : V -> VV ; -- "terminar de hablar"
aVV : V -> VV ; -- "aprender a hablar"
mkVA : V -> VA ;
mkVQ : V -> VQ ;
mkV2Q : V -> Prep -> V2Q ;
mkV2S : overload {
mkV2S : V -> V2S ;
mkV2S : V -> Prep -> V2S ;
} ;
mkV2V : overload {
mkV2V : V -> V2V ;
mkV2V : V -> Prep -> Prep -> V2V ;
} ;
mkV2A : overload {
mkV2A : V -> V2A ;
mkV2A : V -> Prep -> Prep -> V2A ;
} ;
mkAS : A -> AS ; --%
mkA2S : A -> Prep -> A2S ; --%
mkAV : A -> Prep -> AV ; --%
mkA2V : A -> Prep -> Prep -> A2V ; --%
-- Notice: categories $AS, A2S, AV, A2V$ are just $A$,
-- and the second argument is given
-- as an adverb. Likewise
-- $V0$ is just $V$.
V0 : Type ; --%
AS, A2S, AV, A2V : Type ; --%
--.
--2 The definitions of the paradigms
--
-- The definitions should not bother the user of the API. So they are
-- hidden from the document.
Gender = MorphoPor.Gender ;
Number = MorphoPor.Number ;
masculine = Masc ;
feminine = Fem ;
singular = Sg ;
plural = Pl ;
accusative = complAcc ** {lock_Prep = <>} ;
genitive = complGen ** {lock_Prep = <>} ;
dative = complDat ** {lock_Prep = <>} ;
mkPrep = overload {
mkPrep : Str -> Prep = \p -> {s = p ; c = Acc ; isDir = False ; lock_Prep = <>} ;
mkPrep : Str -> Prep -> Prep = \p,c -> {s = p ; c = c.c ; isDir = False ; lock_Prep = <>}
} ;
mk2N x y g = mkNounIrreg x y g ** {lock_N = <>} ;
regN x = mkNomReg x ** {lock_N = <>} ;
compN x y = {s = \\n => x.s ! n ++ y ; g = x.g ; lock_N = <>} ;
femN x = {s = x.s ; g = feminine ; lock_N = <>} ;
mascN x = {s = x.s ; g = masculine ; lock_N = <>} ;
mkN2 = \n,p -> n ** {lock_N2 = <> ; c2 = p} ;
deN2 n = mkN2 n genitive ;
aN2 n = mkN2 n dative ;
mkN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p ; c3 = q} ;
mk2PN x g = {s = x ; g = g} ** {lock_PN = <>} ;
regPN x = mk2PN x g where {
g = case last x of {
"a" => feminine ;
_ => masculine
}
} ;
makeNP x g n = {s = (pn2np (mk2PN x g)).s; a = agrP3 g n ; hasClit = False ; isPol = False ; isNeg = False} ** {lock_NP = <>} ;
mk5A a b c d e =
compADeg {s = \\_ => (mkAdj a b c d e).s ; isPre = False ; lock_A = <>} ;
mk2A a b =
compADeg {s = \\_ => (adjEspanol a b).s ; isPre = False ; lock_A = <>} ;
regA a = compADeg {s = \\_ => (mkAdjReg a).s ; isPre = False ; lock_A = <>} ;
prefA a = {s = a.s ; isPre = True ; lock_A = <>} ;
mkA2 a p = a ** {c2 = p ; lock_A2 = <>} ;
mkADeg a b =
{s = table {Posit => a.s ! Posit ; _ => b.s ! Posit} ;
isPre = a.isPre ; lock_A = <>} ;
compADeg a =
{s = table {Posit => a.s ! Posit ; _ => \\f => "más" ++ a.s ! Posit ! f} ;
isPre = a.isPre ;
lock_A = <>} ;
regADeg a = compADeg (regA a) ;
mkAdv x = ss x ** {lock_Adv = <>} ;
mkAdV x = ss x ** {lock_AdV = <>} ;
mkAdA x = ss x ** {lock_AdA = <>} ;
mkAdN x = ss x ** {lock_AdN = <>} ;
regV x = -- cortar actuar cazar guiar pagar sacar
let
ar = Predef.dp 2 x ;
z = Predef.dp 1 (Predef.tk 2 x) ;
verb = case ar of {
"ir" => vivir_7 x ;
"er" => deber_6 x ;
"ar" => case z of {
"u" => actuar_9 x ;
"z" => cazar_21 x ;
"i" => guiar_43 x ;
"g" => pagar_53 x ;
"c" => sacar_72 x ;
_ => cortar_5 x
} ;
_ => Predef.error ("regular verb infinitive must end ar/ir/er, not satisfied by" ++ x)
}
in verbBesch verb ** {vtyp = VHabere ; p = [] ; lock_V = <>} ;
reflV v = v ** {vtyp = VRefl} ;
verboV ve = verbBesch ve ** {vtyp = VHabere ; p = [] ; lock_V = <>} ;
reflVerboV : Verbum -> V = \ve -> reflV (verboV ve) ;
special_ppV ve pa = {
s = table {
VPart g n => (adjSolo pa).s ! AF g n ;
p => ve.s ! p
} ;
lock_V = <> ;
p = ve.p ;
vtyp = VHabere
} ;
regAltV x y = case x of {
_ + "ar" => verboV (regAlternV x y) ;
_ => verboV (regAlternVEr x y)
} ;
mk2V2 v p = lin V2 (v ** {c2 = p}) ;
dirV2 v = mk2V2 v accusative ;
v2V v = lin V v ;
mmkV3 : V -> Prep -> Prep -> V3 ; -- parler, à, de
mmkV3 v p q = v ** {c2 = p ; c3 = q ; lock_V3 = <>} ;
dirV3 v p = mmkV3 v accusative p ;
dirdirV3 v = mmkV3 v dative accusative ;
mmkV2 : V -> Prep -> V2 ;
mmkV2 v p = v ** {c2 = p ; lock_V2 = <>} ;
mkV3 = overload {
mkV3 : V -> V3 = dirdirV3 ; -- donner,_,_
mkV3 : V -> Prep -> V3 = dirV3 ; -- placer,_,sur
mkV3 : V -> Prep -> Prep -> V3 = mmkV3 -- parler, à, de
} ;
mkV2S = overload {
mkV2S : V -> V2S = \v -> mmkV2 v dative ** {mn,mp = Indic ; lock_V2S = <>} ;
mkV2S : V -> Prep -> V2S = \v,p -> mmkV2 v p ** {mn,mp = Indic ; lock_V2S = <>} ;
} ;
mkV2V = overload {
mkV2V : V -> V2V = \v -> mmkV3 v accusative dative ** {lock_V2V = <>} ;
mkV2V : V -> Prep -> Prep -> V2V = \v,p,q -> mmkV3 v p q ** {lock_V2V = <>} ;
} ;
mkV2A = overload {
mkV2A : V -> V2A = \v -> mmkV3 v accusative dative ** {lock_V2A = <>} ;
mkV2A : V -> Prep -> Prep -> V2A = \v,p,q -> mmkV3 v p q ** {lock_V2A = <>} ;
} ;
V0 : Type = V ;
AS, AV : Type = A ;
A2S, A2V : Type = A2 ;
mkV0 v = v ** {lock_V0 = <>} ;
mkVS v = v ** {m = \\_ => Indic ; lock_VS = <>} ; ---- more moods
mkVV v = v ** {c2 = complAcc ; lock_VV = <>} ;
deVV v = v ** {c2 = complGen ; lock_VV = <>} ;
aVV v = v ** {c2 = complDat ; lock_VV = <>} ;
mkVA v = v ** {lock_VA = <>} ;
mkVQ v = v ** {lock_VQ = <>} ;
mkV2Q v p = mk2V2 v p ** {lock_V2Q = <>} ;
mkAS v = v ** {lock_AS = <>} ; ---- more moods
mkA2S v p = mkA2 v p ** {lock_A2S = <>} ;
mkAV v p = v ** {c = p.p1 ; s2 = p.p2 ; lock_AV = <>} ;
mkA2V v p q = mkA2 v p ** {s3 = q.p2 ; c3 = q.p1 ; lock_A2V = <>} ;
---
mkN = overload {
mkN : (luz : Str) -> N = regN ;
mkN : Str -> Gender -> N = \s,g -> {s = (regN s).s ; g = g ; lock_N = <>};
mkN : (baston,bastones : Str) -> Gender -> N = mk2N
} ;
regN : Str -> N ;
mk2N : (baston,bastones : Str) -> Gender -> N ;
mascN : N -> N ;
femN : N -> N ;
mkPN = overload {
mkPN : (Anna : Str) -> PN = regPN ;
mkPN : (Pilar : Str) -> Gender -> PN = mk2PN ;
mkPN : N -> PN = \n -> lin PN {s = n.s ! Sg ; g = n.g} ;
} ;
mk2PN : Str -> Gender -> PN ; -- Juan
regPN : Str -> PN ; -- feminine for "-a", otherwise masculine
-- To form a noun phrase that can also be plural,
-- you can use the worst-case function.
makeNP : Str -> Gender -> Number -> NP ;
mkA = overload {
mkA : (util : Str) -> A = regA ;
mkA : (espanol,espanola : Str) -> A = mk2A ;
mkA : (solo,sola,solos,solas,solamente : Str) -> A = mk5A ;
mkA : (bueno : A) -> (mejor : A) -> A = mkADeg ;
} ;
mk5A : (solo,sola,solos,solas,solamente : Str) -> A ;
mk2A : (espanol,espanola : Str) -> A ;
regA : Str -> A ;
mkADeg : A -> A -> A ;
compADeg : A -> A ;
regADeg : Str -> A ;
prefA : A -> A ;
prefixA = prefA ;
mkV = overload {
mkV : (pagar : Str) -> V = \s -> case s of {
far + "se" => reflV (regV far) ;
_ => regV s
} ;
mkV : (mostrar,muestro : Str) -> V = regAltV ;
mkV : Verbum -> V = verboV ;
mkV : V -> Str -> V = \v,p -> v ** {p = p} ; ---- to recognize particles in dict, not yet in lincat V
} ;
regV : Str -> V ;
regAltV : (mostrar,muestro : Str) -> V ;
verboV : Verbum -> V ;
mkV2 = overload {
mkV2 : Str -> V2 = \s -> dirV2 (regV s) ;
mkV2 : V -> V2 = dirV2 ;
mkV2 : V -> Prep -> V2 = mk2V2
} ;
mk2V2 : V -> Prep -> V2 ;
dirV2 : V -> V2 ;
} ;

View File

@@ -0,0 +1,157 @@
--# -path=alltenses
concrete ParsePor of ParseEngAbs =
TensePor,
-- CatPor,
NounPor - [PPartNP],
AdjectivePor,
NumeralPor,
SymbolPor [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP],
ConjunctionPor,
VerbPor - [SlashV2V, PassV2, UseCopula, ComplVV],
AdverbPor,
PhrasePor,
SentencePor,
QuestionPor,
RelativePor,
IdiomPor [NP, VP, Tense, Cl, ProgrVP, ExistNP],
ExtraPor [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash,
Temp, Pol, Conj, VPS, ListVPS, S, Num, CN, RP, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS, GenRP,
VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
ClSlash, RCl, EmptyRelSlash],
DictEngPor **
open MorphoPor, ResPor, ParadigmsPor, SyntaxPor, Prelude in {
flags
literal=Symb ;
coding = utf8 ;
lin
-- missing from ExtraPor; should not really be there either
GenNP np =
let denp = (np.s ! ResPor.genitive).ton in {
s = \\_,_,_,_ => [] ;
sp = \\_,_,_ => denp ;
s2 = denp ;
isNeg = False ;
} ;
EmptyRelSlash slash = mkRCl which_RP (lin ClSlash slash) ;
that_RP = which_RP ;
UncNeg = negativePol ;
-- lexical entries
another_Quant = mkQuantifier "otro" "otra" "otros" "otras" ;
some_Quant = mkQuantifier "algún" "alguna" "algunos" "algunas" ;
anySg_Det = mkDeterminer "algún" "alguna" Sg False ; ---- also meaning "whichever" ?
each_Det = SyntaxPor.every_Det ;
but_Subj = {s = "pero" ; m = Indic} ; ---- strange to have this as Subj
{-
myself_NP = regNP "myself" singular ;
yourselfSg_NP = regNP "yourself" singular ;
himself_NP = regNP "himself" singular ;
herself_NP = regNP "herself" singular ;
itself_NP = regNP "itself" singular ;
ourself_NP = regNP "ourself" plural ;
yourselfPl_NP = regNP "yourself" plural ;
themself_NP = regNP "themself" plural ;
themselves_NP = regNP "themselves" plural ;
-}
CompoundCN num noun cn = {
s = \\n => cn.s ! n ++ "de" ++ noun.s ! num.n ;
g = cn.g
} ;
{-
DashCN noun1 noun2 = {
s = \\n,c => noun1.s ! Sg ! Nom ++ "-" ++ noun2.s ! n ! c ;
g = noun2.g
} ;
GerundN v = {
s = \\n,c => v.s ! VPresPart ;
g = Neutr
} ;
GerundAP v = {
s = \\agr => v.s ! VPresPart ;
isPre = True
} ;
-}
PastPartAP v = {
s = table {
AF g n => v.s ! VPart g n ;
_ => v.s ! VPart Masc Sg ---- the adverb form
} ;
isPre = True
} ;
{-
OrdCompar a = {s = \\c => a.s ! AAdj Compar c } ;
-}
PositAdVAdj a = {s = a.s ! Posit ! AA} ;
{-
UseQuantPN q pn = {s = \\c => q.s ! False ! Sg ++ pn.s ! npcase2case c ; a = agrgP3 Sg pn.g} ;
SlashV2V v ant p vp = insertObjc (\\a => v.c3 ++ ant.s ++ p.s ++
infVP v.typ vp ant.a p.p a)
(predVc v) ;
SlashVPIV2V v p vpi = insertObjc (\\a => p.s ++
v.c3 ++
vpi.s ! VVAux ! a)
(predVc v) ;
ComplVV v a p vp = insertObj (\\agr => a.s ++ p.s ++
infVP v.typ vp a.a p.p agr)
(predVV v) ;
-}
---- TODO: find proper expressions for OSV and OVS in Por
PredVPosv np vp = mkCl (lin NP np) (lin VP vp) ;
PredVPovs np vp = mkCl (lin NP np) (lin VP vp) ;
CompS s = {s = \\_ => "de" ++ "que" ++ s.s ! Indic} ; ---- de ?
{-
CompQS qs = {s = \\_ => qs.s ! QIndir} ;
CompVP ant p vp = {s = \\a => ant.s ++ p.s ++
infVP VVInf vp ant.a p.p a} ;
VPSlashVS vs vp =
insertObj (\\a => infVP VVInf vp Simul CPos a) (predV vs) **
{c2 = ""; gapInMiddle = False} ;
PastPartRS ant pol vps = {
s = \\agr => vps.ad ++ vps.ptp ++ vps.s2 ! agr ;
c = npNom
} ;
PresPartRS ant pol vp = {
s = \\agr => vp.ad ++ vp.prp ++ vp.s2 ! agr ;
c = npNom
} ;
ApposNP np1 np2 = {
s = \\c => np1.s ! c ++ "," ++ np2.s ! npNom ;
a = np1.a
} ;
AdAdV = cc2 ;
UttAdV adv = adv;
-}
}

View File

@@ -0,0 +1,39 @@
resource PhonoPor = open Prelude in {
flags coding=utf8 ;
--3 Elision
--
-- The phonological rule of *elision* can be defined as follows in GF.
-- In Pornish it includes both vowels and 'h'.
oper
vocale : Strs = strs {
"a" ; "e" ; "h" ; "i" ; "o" ; "u"
} ;
--Feminine nouns that start with stressed a use the masculine article el for phonetic reasons:
--e.g. "el agua pura" but "la pura agua".
--To prevent "el aguamarina", we list explicitly words that begin with these words
falseAWords : pattern Str = #("aguam"|"aguaf"|"almac"|"alab"|"alac"|"alam"|"alan"|"alar") ;
aWords : pattern Str = #("agua" | "alma" | "ala") ;
chooseLa = pre {
falseAWords => "la" ;
aWords => "el" ;
"á" => "el" ;
_ => "la"
} ;
chooseDeLa = pre {
falseAWords => "de la" ;
aWords => "del" ;
"á" => "del" ;
_ => "de la"
} ;
chooseALa = pre {
falseAWords => "a la" ;
aWords => "al" ;
"á" => "al" ;
_ => "a la"
} ;
}

View File

@@ -0,0 +1,2 @@
concrete PhrasePor of Phrase = CatPor ** PhraseRomance with
(ResRomance = ResPor) ;

View File

@@ -0,0 +1,2 @@
concrete QuestionPor of Question = CatPor ** QuestionRomance with
(ResRomance = ResPor) ;

View File

@@ -0,0 +1,2 @@
concrete RelativePor of Relative = CatPor ** RelativeRomance with
(ResRomance = ResPor) ;

View File

@@ -0,0 +1,13 @@
--1 Pornish auxiliary operations.
--
---- This module contains operations that are needed to make the
---- resource syntax work. To define everything that is needed to
---- implement $Test$, it moreover contains regular lexical
---- patterns needed for $Lex$.
--
instance ResPor of ResRomance = DiffPor ** open CommonRomance, Prelude in {
--- flags optimize=noexpand ;
} ;

View File

@@ -0,0 +1,2 @@
concrete SentencePor of Sentence = CatPor ** SentenceRomance with
(ResRomance = ResPor) ;

View File

@@ -0,0 +1,181 @@
concrete StructuralPor of Structural = CatPor **
open PhonoPor, MorphoPor, ParadigmsPor, BeschPor,
MakeStructuralPor, (X = ConstructX), Prelude in {
flags optimize=all ;
coding=utf8 ;
lin
-- have_V3
-- have_not_V3
above_Prep = mkPrep "sobre" ;
after_Prep = {s = ["despues"] ; c = MorphoPor.genitive ; isDir = False} ;
all_Predet = {
s = \\a,c => prepCase c ++ aagrForms "todo" "toda" "todos" "todas" ! a ;
c = Nom ;
a = PNoAg
} ;
almost_AdA, almost_AdN = ss "casi" ;
always_AdV = ss "siempre" ;
although_Subj = ss "aunque" ** {m = Conjunct} ;
and_Conj = {s1 = [] ; s2 = etConj.s ; n = Pl} ;
at_least_AdN = ss "al menos" ;
at_most_AdN = ss "a lo más" ;
because_Subj = ss "porque" ** {m = Indic} ;
before_Prep = {s = "antes" ; c = MorphoPor.genitive ; isDir = False} ;
behind_Prep = {s = "detrás" ; c = MorphoPor.genitive ; isDir = False} ;
between_Prep = mkPrep "entre" ;
both7and_DConj = {s1,s2 = etConj.s ; n = Pl} ;
but_PConj = ss "pero" ;
by8agent_Prep = mkPrep "por" ;
by8means_Prep = mkPrep "por" ;
can8know_VV = mkVV (verboV (saber_71 "saber")) ;
can_VV = mkVV (verboV (poder_58 "poder")) ;
during_Prep = mkPrep "durante" ;
either7or_DConj = {s1,s2 = "o" ; n = Sg} ;
everybody_NP = makeNP ["todos"] Masc Pl ;
every_Det = mkDeterminer "cada" "cada" Sg False ;
everything_NP = pn2np (mkPN ["todo"] Masc) ;
everywhere_Adv = ss ["en todas partes"] ;
except_Prep = mkPrep "excepto" ;
few_Det = mkDeterminer "pocos" "pocas" Pl False ;
--- first_Ord = {s = \\ag => (regA "primero").s ! Posit ! AF ag.g ag.n} ;
for_Prep = mkPrep "para" ;
from_Prep = complGen ; ---
he_Pron =
mkPronoun
"él" "lo" "le" "él"
"su" "su" "sus" "sus"
Masc Sg P3 ;
here_Adv = mkAdv "aquí" ;
here7to_Adv = mkAdv ["para aquí"] ;
here7from_Adv = mkAdv ["de aquí"] ;
how_IAdv = ss "como" ;
how8many_IDet = mkIDet "cuántos" "cuántas" Pl ;
how8much_IAdv = ss "cuánto" ;
if_Subj = ss "si" ** {m = Indic} ;
if_then_Conj = {s1 = "si" ; s2 = "entonces" ; n = Sg ; lock_Conj = <>} ;
in8front_Prep = {s = "delante" ; c = MorphoPor.genitive ; isDir = False} ;
i_Pron =
mkPronoun
"yo" "me" "me" "mí"
"mi" "mi" "mis" "mis"
Masc Sg P1 ;
in_Prep = mkPrep "en" ;
it_Pron =
mkPronoun
"él" "lo" "le" "él"
"su" "su" "sus" "sus"
Masc Sg P3 ;
less_CAdv = X.mkCAdv "menos" conjThan ; ----
many_Det = mkDeterminer "muchos" "muchas" Pl False ;
more_CAdv = X.mkCAdv "más" conjThan ;
most_Predet = {s = \\_,c => prepCase c ++ ["la mayor parte"] ; c = CPrep P_de ;
a = PNoAg} ;
much_Det = mkDeterminer "mucho" "mucha" Sg False ;
must_VV = mkVV (verboV (deber_6 "deber")) ;
no_Quant =
let
ningun : ParadigmsPor.Number => ParadigmsPor.Gender => Case => Str = table {
Sg => \\g,c => prepCase c ++ genForms "ningún" "ninguna" ! g ;
Pl => \\g,c => prepCase c ++ genForms "ningunos" "ningunas" ! g
}
in {
s = \\_ => ningun ;
sp = ningun ;
s2 = [] ; isNeg = True
} ;
no_Utt = ss "no" ;
not_Predet = {s = \\a,c => prepCase c ++ "no" ; c = Nom ; a = PNoAg} ;
nobody_NP = pn2npNeg (mkPN "nadie") ;
nothing_NP = pn2npNeg (mkPN "nada") ;
on_Prep = mkPrep "sobre" ;
--- one_Quant = {s = \\g,c => prepCase c ++ genForms "uno" "una" ! g} ;
only_Predet = {s = \\_,c => prepCase c ++ "solamente" ; c = Nom ;
a = PNoAg} ;
or_Conj = {s1 = [] ; s2 = "o" ; n = Sg} ;
otherwise_PConj = ss "otramente" ;
part_Prep = complGen ;
please_Voc = ss ["por favor"] ;
possess_Prep = complGen ;
quite_Adv = ss "bastante" ;
she_Pron =
mkPronoun
"ella" "la" "le" "ella"
"su" "su" "sus" "sus"
Fem Sg P3 ;
so_AdA = ss "tanto" ;
somebody_NP = pn2np (mkPN "alguien" Masc) ;
somePl_Det = mkDeterminer "algunos" "algunas" Pl False ;
someSg_Det = mkDeterminer "algún" "alguna" Sg False ;
something_NP = pn2np (mkPN ["algo"] Masc) ;
somewhere_Adv = ss ["en alguna parte"] ;
that_Quant = mkQuantifier "ese" "esa" "esos" "esas" ;
there_Adv = mkAdv "allí" ; -- allá
there7to_Adv = mkAdv ["para allí"] ;
there7from_Adv = mkAdv ["de allí"] ;
therefore_PConj = ss ["por eso"] ;
they_Pron = mkPronoun
"ellos" "los" "les" "ellos"
"su" "su" "sus" "sus"
Masc Pl P3 ;
this_Quant = mkQuantifier "este" "esta" "estos" "estas" ;
through_Prep = mkPrep "por" ;
too_AdA = ss "demasiado" ;
to_Prep = complDat ;
under_Prep = mkPrep "bajo" ;
very_AdA = ss "muy" ;
want_VV = mkVV (verboV (querer_64 "querer")) ;
we_Pron =
mkPronoun
"nosotros" "nos" "nos" "nosotros"
"nuestro" "nuestra" "nuestros" "nuestras"
Masc Pl P1 ;
whatSg_IP = {s = \\c => prepCase c ++ ["qué"] ; a = aagr Masc Sg} ;
whatPl_IP = {s = \\c => prepCase c ++ ["qué"] ; a = aagr Masc Pl} ; ---
when_IAdv = ss "cuándo" ;
when_Subj = ss "cuando" ** {m = Indic} ;
where_IAdv = ss "dónde" ;
which_IQuant = {s = table {
Sg => \\g,c => prepCase c ++ "qué" ; --- cual
Pl => \\g,c => prepCase c ++ "qué"
}
} ;
whoPl_IP = {s = \\c => prepCase c ++ "quién" ; a = aagr Masc Pl} ;
whoSg_IP = {s = \\c => prepCase c ++ "quién" ; a = aagr Masc Sg} ;
why_IAdv = ss ["por qué"] ;
without_Prep = mkPrep "sin" ;
with_Prep = mkPrep "con" ;
yes_Utt = ss "sí" ;
youSg_Pron = mkPronoun
"tú" "te" "te" "ti"
"tu" "tu" "tus" "tus"
Masc Sg P2 ;
youPl_Pron =
mkPronoun
"vosotros" "os" "os" "vosotros"
"vuestro" "vuestra" "vuestros" "vuestras"
Masc Pl P2 ;
youPol_Pron =
mkPronoun
"usted" "lo" "le" "usted"
"su" "su" "sus" "sus"
Masc Sg P3 ;
oper
etConj : {s : Str ; n : MorphoPor.Number} = {s = pre {
"y" ;
"y" / strs {"ya" ; "ye" ; "yo" ; "yu"} ;
"e" / strs {"i" ; "hi" ; "y"}
}} ** {n = Pl} ;
lin
as_CAdv = X.mkCAdv "si" conjThan ; ----
have_V2 = dirV2 (verboV (tener_4 "tener")) ;
that_Subj = {s = "que" ; m = Conjunct} ;
lin language_title_Utt = ss "español" ;
}

View File

@@ -0,0 +1,4 @@
--# -path=.:../romance:../abstract:../common:../prelude
concrete SymbolPor of Symbol = CatPor ** SymbolRomance with
(ResRomance = ResPor) ;

View File

@@ -0,0 +1,3 @@
concrete TensePor of Tense = CatPor, TenseX [Ant,AAnter,ASimul] **
TenseRomance with
(ResRomance = ResPor) ;

View File

@@ -0,0 +1,68 @@
--# -path=.:../abstract:../common
concrete TerminologyPor of Terminology = CatPor ** open
ResPor,
CommonRomance,
ParadigmsPor,
(G = GrammarPor),
(S = SyntaxPor),
(L = LexiconPor),
Prelude
in {
flags coding=utf8 ;
lincat
Category = G.N ;
ParameterType = G.N ;
Parameter = G.N ;
Heading = {s : Str} ;
lin
noun_Category = mkN "sustantivo" ;
adjective_Category = mkN "adjetivo" ;
verb_Category = mkN "verbo" masculine ;
gender_ParameterType = mkN "género" masculine ;
singular_Parameter = mkN "singular" ;
plural_Parameter = mkN "plural" ;
masculine_Parameter = mkN "masculino" ;
feminine_Parameter = mkN "femenino" ;
neuter_Parameter = mkN "neutro" ;
nominative_Parameter = mkN "nominativo" ;
genitive_Parameter = mkN "genitivo" ;
dative_Parameter = mkN "dativo" ;
accusative_Parameter = mkN "accusativo" ;
imperative_Parameter = mkN "imperativo" ;
indicative_Parameter = mkN "indicativo" ;
conjunctive_Parameter = mkN "subjuntivo" ;
infinitive_Parameter = mkN "infinitivo" ;
present_Parameter = mkN "presente" ;
past_Parameter = mkN "pretérito" ;
future_Parameter = mkN "futuro" ;
conditional_Parameter = mkN "condicional" ;
perfect_Parameter = mkN "perfecto compuesto" ; ----
imperfect_Parameter = mkN "imperfecto" ;
simple_past_Parameter = mkN "perfecto simple" ; ----
participle_Parameter = mkN "participio" ;
aux_verb_Parameter = mkN "auxiliar" ; ----
positive_Parameter = mkN "positivo" ;
comparative_Parameter = mkN "comparativo" ;
superlative_Parameter = mkN "superlativo" ;
predicative_Parameter = mkN "predicativo" ;
nounHeading n = ss (n.s ! Sg) ;
exampleGr_N = mkN "ejemplo" masculine ;
}

View File

@@ -0,0 +1,12 @@
concrete TextPor of Text = CommonX - [Temp,TTAnt,Tense,TPres,TPast,TFut,TCond] ** {
flags coding=utf8 ;
-- This works for the special punctuation marks of Pornish.
lin
TEmpty = {s = []} ;
TFullStop x xs = {s = x.s ++ "." ++ xs.s} ;
TQuestMark x xs = {s = "¿" ++ x.s ++ "?" ++ xs.s} ;
TExclMark x xs = {s = "¡" ++ x.s ++ "!" ++ xs.s} ;
}

View File

@@ -0,0 +1,2 @@
concrete VerbPor of Verb = CatPor ** VerbRomance with
(ResRomance = ResPor) ;

View File

@@ -29776,7 +29776,7 @@ lin ligament_N = mkWN (k48A "side") ; --UNCHK
lin ligand_N = mkWN "ligandi" ; --UNCHK
lin ligation_N = mkWN "sitominen" ; --UNCHK
lin ligature_N = mkWN "sitominen" ; --UNCHK
lin light_A = mkA "kevyt" | mkWA (k10 "valoisa") ; ---- split
lin light_A = mkA "kevyt" "kevyitä" | mkWA (k10 "valoisa") ; ---- split
lin light_Adv = mkWAdv (k99 "kevyesti") ; --UNCHK
lin light_N = mkN "valo" ;
lin light_V = mkWV (k66 "valaista") ; --UNCHK
@@ -29975,7 +29975,7 @@ lin lionet_N = mkWN (k10 "leijona") "nuori" ; --UNCHK
lin lionfish_N = mkWN (compoundN "leijona" (k9 "kala")) ; --UNCHK
lin lion_hearted_A = mkWA (k38 "urhoollinen") ; --UNCHK
lin lionize_V2 = mkWV2 (k53 "ylistää") ; --UNCHK
lin lip_N = mkN "huuli" ; --mkWN (k9 "reuna") ;
lin lip_N = mkN "huuli" "huulia" ; --mkWN (k9 "reuna") ;
lin liparis_N = mkWN "suku" "Liparis" ; --UNCHK
lin lipase_N = mkWN (compoundN "lip" (k5 "aasi")) ; --UNCHK
lin lipectomy_N = mkWN (compoundN "poisto" (k39 "leikkaus")) "rasvakudoksen" ; --UNCHK
@@ -30679,7 +30679,7 @@ lin lunacy_N = mkWN (k39 "hullutus") ; --UNCHK
lin lunar_A = mkWA "lunaarinen" ; --UNCHK
lin lunatic_A = mkWA (compoundA "kuu" (k1 "hullu")) ; --UNCHK
lin lunatic_N = mkWN (k1A "uskalikko") ; --UNCHK
lin lunch_N = mkWN (k41 "lounas") "virallinen" ; --UNCHK
lin lunch_N = mkN "lounas" ;
lin lunch_V = mkWV (k53 "lounastaa") ; --UNCHK
lin lunch_V2 = mkWV2 (k53 "lounastaa") ; --UNCHK
lin luncheon_N = mkWN (k41 "lounas") "virallinen" ; --UNCHK
@@ -31821,7 +31821,7 @@ lin meany_N = mkWN (k2 "henkilö") "epäystävällinen" ; --UNCHK
lin measles_N = mkWN (compoundN "tuhka" (k1A "rokko")) ; --UNCHK
lin measly_A = mkWA (k38 "vähäpätöinen") ; --UNCHK
lin measurable_A = mkWA (k10 "oleva") "mitattavissa" ; --UNCHK
lin measure_N = mkN "keino" ;
lin measure_N = mkN "mitta" | mkN "keino" ; ---- split
lin measure_V = mkWV (k73A "mitata") ; --UNCHK
lin measure_V2 = mkWV2 (k73A "mitata") ;
lin measure_against_V3 = variants {} ; -- guess-p-verb