Tense to Common ; Idiom ; Text

This commit is contained in:
aarne
2006-02-20 22:11:57 +00:00
parent b6957f4e41
commit e0dc7034ac
39 changed files with 255 additions and 61 deletions

View File

@@ -73,6 +73,21 @@ instance DiffSpa of DiffRomance = open CommonRomance, PhonoSpa, BeschSpa, Prelud
-- <Sg,P2,CRefl,CPron {n = Sg ; p = P1}> => <"te" ++ "me", []> ;
-- <_,_,CPron {n = Sg ; p = P2},CPron {n = Sg ; p = P1}> => <"te" ++ "me", []> ;
mkImperative vp = {
s = \\pol,aag =>
let
agr = aag ** {p = P2} ;
verb = case <aag.n, pol> of {
<Sg,Neg> => (vp.s ! VPFinite (VPres Conjunct) Simul).fin ! agr ;
_ => (vp.s ! VPImperat).fin ! agr
} ;
neg = vp.neg ! pol ;
clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ;
compl = clpr.p2 ++ vp.comp ! agr ++ vp.ext ! pol
in
neg.p1 ++ verb ++ clpr.p1 ++ compl ;
} ;
negation : Polarity => (Str * Str) = table {
Pos => <[],[]> ;
Neg => <"no",[]>

View File

@@ -0,0 +1,7 @@
concrete IdiomSpa of Idiom = CatSpa **
open MorphoSpa, ParadigmsSpa, Prelude in {
flags optimize=all_subs ;
}

View File

@@ -11,10 +11,12 @@ concrete LangSpa of Lang =
RelativeSpa,
ConjunctionSpa,
PhraseSpa,
TextSpa, -- special punctuation
IdiomSpa,
StructuralSpa,
LexiconSpa
** {
flags startcat = Phr ;
flags startcat = Phr ; unlexer = text ; lexer = text ;
} ;

View File

@@ -0,0 +1,11 @@
concrete TextSpa of Text = {
-- This works for the special punctuation marks of Spanish.
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} ;
}