mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-22 01:22:51 -06:00
Tense to Common ; Idiom ; Text
This commit is contained in:
@@ -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",[]>
|
||||
|
||||
7
lib/resource-1.0/spanish/IdiomSpa.gf
Normal file
7
lib/resource-1.0/spanish/IdiomSpa.gf
Normal file
@@ -0,0 +1,7 @@
|
||||
concrete IdiomSpa of Idiom = CatSpa **
|
||||
open MorphoSpa, ParadigmsSpa, Prelude in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
}
|
||||
|
||||
@@ -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 ;
|
||||
|
||||
} ;
|
||||
|
||||
11
lib/resource-1.0/spanish/TextSpa.gf
Normal file
11
lib/resource-1.0/spanish/TextSpa.gf
Normal 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} ;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user