forked from GitHub/gf-rgl
(Por) change mkPrep paradigm
- add Por to Make.hs - rm elisDe (PhonoPor) - change mkPrep paradigm, and make necessary changes - rm ParsePor
This commit is contained in:
@@ -55,6 +55,7 @@ langsCoding = [
|
||||
(("norwegian","Nor"),"Scand"),
|
||||
(("persian", "Pes"),""),
|
||||
(("polish", "Pol"),""),
|
||||
(("portuguese", "Por"), "Romance"),
|
||||
(("punjabi", "Pnb"),""),
|
||||
(("romanian", "Ron"),""),
|
||||
(("russian", "Rus"),""),
|
||||
|
||||
@@ -5,26 +5,7 @@ concrete NounPor of Noun = CatPor ** NounRomance with
|
||||
-- not implemented for romance languages, maybe because it can't
|
||||
-- be done elegantly?
|
||||
CountNP det np = heavyNPpol np.isNeg
|
||||
{s = \\c => det.s ! np.a.g ! c ++ elisDe ++ (np.s ! c).ton ;
|
||||
{s = \\c => det.s ! np.a.g ! c ++ (np.s ! c).ton ;
|
||||
a = np.a ** {n = det.n} } ;
|
||||
|
||||
} ;
|
||||
{--
|
||||
NounPhrase : Type = {
|
||||
s : Case => {c1,c2,comp,ton : Str} ;
|
||||
a : Agr ;
|
||||
hasClit : Bool ;
|
||||
isPol : Bool ; --- only needed for French complement agr
|
||||
isNeg : Bool --- needed for negative NP's such as "personne"
|
||||
} ;
|
||||
|
||||
Det = {
|
||||
s : Gender => Case => Str ;
|
||||
n : Number ;
|
||||
s2 : Str ; -- -ci
|
||||
sp : Gender => Case => Str ; -- substantival: mien, mienne
|
||||
isNeg : Bool -- negative element, e.g. aucun
|
||||
} ;
|
||||
|
||||
Bool -> {s : Case => Str ; a : Agr} -> NounPhrase
|
||||
--}
|
||||
@@ -75,10 +75,10 @@ oper
|
||||
mkPrep = overload {
|
||||
mkPrep : Str -> Prep = -- other preposition
|
||||
\p -> {s = p ; c = Acc ; isDir = False ; lock_Prep = <>} ;
|
||||
mkPrep : Str -> Prep -> Prep =
|
||||
mkPrep : Str -> Case -> Prep =
|
||||
-- compound prepositions, e.g. "antes de", made as mkPrep
|
||||
-- "antes" genitive
|
||||
\p,c -> {s = p ; c = c.c ; isDir = False ; lock_Prep = <>}
|
||||
\p,c -> {s = p ; c = c ; isDir = False ; lock_Prep = <>}
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
@@ -1,157 +0,0 @@
|
||||
--# -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 "outro" "outra" "outros" "outras" ;
|
||||
some_Quant = mkQuantifier "algum" "alguma" "alguns" "algumas" ;
|
||||
anySg_Det = mkDeterminer "algum" "alguma" Sg False ; ---- also meaning "whichever" ?
|
||||
each_Det = SyntaxPor.every_Det ;
|
||||
|
||||
but_Subj = {s = "mas" ; 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;
|
||||
|
||||
-}
|
||||
|
||||
}
|
||||
@@ -1,12 +1,3 @@
|
||||
resource PhonoPor = open Prelude in {
|
||||
|
||||
oper
|
||||
arts : pattern Str = #("o" | "os" | "a" | "as") ;
|
||||
|
||||
elisDe : Str ;
|
||||
elisDe = pre {
|
||||
#arts => "d" ++ BIND ;
|
||||
_ => "de"
|
||||
} ;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
concrete StructuralPor of Structural = CatPor **
|
||||
open PhonoPor, MorphoPor, ParadigmsPor, BeschPor,
|
||||
open PhonoPor, MorphoPor, ParadigmsPor, BeschPor, DiffPor,
|
||||
MakeStructuralPor, (X = ConstructX), (B=IrregBeschPor)
|
||||
, Prelude in {
|
||||
|
||||
@@ -62,8 +62,8 @@ concrete StructuralPor of Structural = CatPor **
|
||||
between_Prep = mkPrep "entre" ;
|
||||
both7and_DConj = {s1,s2 = etConj.s ; n = Pl} ;
|
||||
but_PConj = ss "mas" ;
|
||||
by8agent_Prep = mkPrep "por" ;
|
||||
by8means_Prep = mkPrep "por" ;
|
||||
by8agent_Prep = mkPrep [] ablative ; -- por
|
||||
by8means_Prep = mkPrep [] ablative ; -- por
|
||||
can8know_VV = mkVV B.saber_V ;
|
||||
can_VV = mkVV B.poder_V ;
|
||||
during_Prep = mkPrep "durante" ;
|
||||
@@ -87,7 +87,7 @@ concrete StructuralPor of Structural = CatPor **
|
||||
if_then_Conj = {s1 = "se" ; s2 = "então" ;
|
||||
n = Sg ; lock_Conj = <>} ;
|
||||
in8front_Prep = {s = "à frente" ; c = MorphoPor.genitive ; isDir = False} ;
|
||||
in_Prep = mkPrep "em" ;
|
||||
in_Prep = mkPrep [] locative ;
|
||||
|
||||
less_CAdv = X.mkCAdv "menos" conjThan ; ----
|
||||
many_Det = mkDeterminer "muitos" "muitas" Pl False ;
|
||||
@@ -134,7 +134,7 @@ concrete StructuralPor of Structural = CatPor **
|
||||
therefore_PConj = ss ["por isso"] ;
|
||||
|
||||
this_Quant = mkQuantifier "este" "esta" "estes" "estas" ;
|
||||
through_Prep = mkPrep "por" ;
|
||||
through_Prep = mkPrep [] ablative ; -- por
|
||||
too_AdA = ss "demasiado" ; -- o certo seria demais como postfix
|
||||
to_Prep = complDat ;
|
||||
under_Prep = mkPrep "embaixo" ;
|
||||
|
||||
@@ -5,9 +5,11 @@ incomplete concrete AdverbRomance of Adverb =
|
||||
PositAdvAdj a = {
|
||||
s = a.s ! Posit ! AA
|
||||
} ;
|
||||
|
||||
ComparAdvAdj cadv a np = {
|
||||
s = cadv.s ++ a.s ! Posit ! AA ++ cadv.p ++ (np.s ! Nom).ton
|
||||
} ;
|
||||
|
||||
ComparAdvAdjS cadv a s = {
|
||||
s = cadv.s ++ a.s ! Posit ! AA ++ cadv.p ++ s.s ! Conjunct --- ne
|
||||
} ;
|
||||
|
||||
Reference in New Issue
Block a user