mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-03 08:12:51 -06:00
Convert many RGL modules from Latin-1 to UTF-8 to speed up compilation
Also add flags coding=utf8 to silence warnings.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
--# -coding=latin1
|
||||
resource BeschRon = open Prelude, MorphoRon,CatRon in {
|
||||
|
||||
flags optimize=noexpand ;
|
||||
coding=utf8 ;
|
||||
|
||||
oper mkNV : Verbe -> V = \ve -> {s = ve.s ; isRefl = \\_ => RNoAg ; nrClit = VNone; pReflClit = Composite ;lock_V = <> } ;
|
||||
oper mkRVAcc : Verbe -> V = \ve -> {s = ve.s ; isRefl = \\a => aRefl a; nrClit = VRefl; pReflClit = Short ;lock_V = <>} ;
|
||||
@@ -14,7 +14,7 @@ oper mkRVDat : Verbe -> V = \ve -> {s = ve.s ; isRefl = \\a => dRefl a; nrClit =
|
||||
-- for Group 3 - verbs ending in e - most verbs have phonetical mutations in the stem, for different
|
||||
-- tenses, difficult to find a pattern that describes this behavior
|
||||
-- default conjugation - covers almost 20%
|
||||
-- for Group 4 - verbs ending in i/î - the default behaviour is the conjugation with "sc", which
|
||||
-- for Group 4 - verbs ending in i/î - the default behaviour is the conjugation with "sc", which
|
||||
-- characterizes almost 75 % of the verbs
|
||||
-- in general : Group 1 + Group 4 are the most frequent for verbs
|
||||
-- the smart paradigm covers (60-70% cases for a reasonably big database)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
--# -coding=latin1
|
||||
concrete IdiomRon of Idiom =
|
||||
-- CatRon ** open (P = ParamX), MorphoRon, ParadigmsRon,Prelude
|
||||
CatRon ** open Prelude, ResRon,BeschRon
|
||||
in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
coding=utf8 ;
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ in {
|
||||
GenericCl vp = mkClause "cineva" False (agrP3 Masc Sg) vp ; -- an exact correspondent does not exist !
|
||||
|
||||
ExistNP np =
|
||||
mkClause "" False np.a (insertSimpObj (\\ag => (np.s ! No ).comp) (useVerb (v_besch20 "existã"))) ;
|
||||
mkClause "" False np.a (insertSimpObj (\\ag => (np.s ! No ).comp) (useVerb (v_besch20 "existã"))) ;
|
||||
-- v_besch20 "exista"
|
||||
|
||||
ExistIP ip = {
|
||||
@@ -37,7 +37,7 @@ in {
|
||||
ProgrVP vp = vp; -- for the moment, since there is no particular way to express continuous action, except for the imperfect, which wouldn't work for all tenses
|
||||
|
||||
ImpPl1 vp = let a = {p = P1 ; n = Pl ; g = Masc} in
|
||||
{ s = "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++vp.comp ! a ++ vp.ext ! Pos };
|
||||
{ s = "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++vp.comp ! a ++ vp.ext ! Pos };
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--# -coding=latin1
|
||||
concrete PhraseRon of Phrase =
|
||||
CatRon ** open ResRon, Prelude in {
|
||||
|
||||
flags optimize = all_subs ;
|
||||
coding=utf8 ;
|
||||
|
||||
lin
|
||||
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
||||
@@ -17,7 +17,7 @@
|
||||
UttIAdv iadv = iadv ;
|
||||
UttNP np = {s = (np.s ! No).comp} ;
|
||||
UttVP vp = let a = agrP3 Masc Sg in
|
||||
{s = "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++vp.comp ! a ++ vp.ext ! Pos} ;
|
||||
{s = "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++vp.comp ! a ++ vp.ext ! Pos} ;
|
||||
UttAdv adv = adv ;
|
||||
UttCN cn = {s = cn.s ! Sg ! Indef ! ANomAcc} ;
|
||||
UttAP ap = {s = ap.s ! AF Masc Sg Indef ANomAcc} ;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--# -coding=latin1
|
||||
concrete QuestionRon of Question =
|
||||
CatRon ** open ResRon, Prelude in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
coding=utf8 ;
|
||||
|
||||
lin
|
||||
|
||||
@@ -11,7 +11,7 @@ concrete QuestionRon of Question =
|
||||
let cls = cl.s ! DDir ! t ! a ! p
|
||||
in table {
|
||||
QDir => cls ! Indic ;
|
||||
QIndir => "dacã" ++ cls ! Indic
|
||||
QIndir => "dacã" ++ cls ! Indic
|
||||
}
|
||||
} ;
|
||||
-- doesn't have clitics since it's subject of the phrase
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
--# -coding=latin1
|
||||
concrete RelativeRon of Relative =
|
||||
CatRon ** open Prelude, ResRon in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
coding=utf8 ;
|
||||
|
||||
lin
|
||||
|
||||
RelCl cl = {
|
||||
s = \\ag,t,a,p,m => "astfel" ++ "cã" ++
|
||||
s = \\ag,t,a,p,m => "astfel" ++ "cã" ++
|
||||
cl.s ! DDir ! t ! a ! p ! m ;
|
||||
c = No
|
||||
} ;
|
||||
@@ -52,8 +52,8 @@ concrete RelativeRon of Relative =
|
||||
-- Ac => if_then_Str p.isDir (ss ++ p.s ++ rp.s ! a ! p.c) (ss ++ p.s ++ rp.s ! a ! No)
|
||||
IdRP = {
|
||||
s = \\ag,c => case c of { Da | Ge => case <ag.g, ag.n > of
|
||||
{<Fem,Sg> => "cãreia" ; <Masc,Sg> => "cãruia" ;
|
||||
<_Pl> => "cãrora"
|
||||
{<Fem,Sg> => "cãreia" ; <Masc,Sg> => "cãruia" ;
|
||||
<_Pl> => "cãrora"
|
||||
};
|
||||
_ => "care"
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--# -coding=latin1
|
||||
concrete SentenceRon of Sentence =
|
||||
CatRon ** open Prelude, ResRon in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
coding=utf8 ;
|
||||
|
||||
lin
|
||||
PredVP np vp = mkClause (np.s ! No).comp np.isPol np.a vp ;
|
||||
@@ -24,8 +24,8 @@
|
||||
_ => vpr.s ! Imper PlP2 ++ vpr.comp ! agPl ++ vpr.ext ! Pos
|
||||
};
|
||||
<Pos, ImpF n True> => case n of
|
||||
{Sg => "sã" ++ clNegSg ++ conjVP vpr agSg ++ vpr.comp ! agSg ++ vpr.ext ! Pos;
|
||||
Pl => "sã" ++ clNegPl ++ conjVP vpr agPl ++ vpr.comp ! agPl ++ vpr.ext ! Pos
|
||||
{Sg => "sã" ++ clNegSg ++ conjVP vpr agSg ++ vpr.comp ! agSg ++ vpr.ext ! Pos;
|
||||
Pl => "sã" ++ clNegPl ++ conjVP vpr agPl ++ vpr.comp ! agPl ++ vpr.ext ! Pos
|
||||
};
|
||||
<Neg, ImpF n b> => case n of
|
||||
{Sg => "nu" ++ clNegSg ++ vpr.s ! Inf ++ vpr.comp ! agSg ++ vpr.ext ! Pos;
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||
EmbedVP vp = let a = agrP3 Masc Sg in
|
||||
{ s= "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++vp.comp ! a ++ vp.ext ! Pos };
|
||||
{ s= "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++vp.comp ! a ++ vp.ext ! Pos };
|
||||
|
||||
UseCl t p cl = {
|
||||
s = \\o => t.s ++ p.s ++ cl.s ! DDir ! t.t ! t.a ! p.p ! o
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
--# -coding=latin1
|
||||
concrete VerbRon of Verb =
|
||||
CatRon ** open Prelude, ResRon in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
coding=utf8 ;
|
||||
|
||||
lin
|
||||
UseV = useVerb ;
|
||||
|
||||
ComplVV v vp =insertSimpObj (\\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++vp.comp ! a ++ vp.ext ! Pos) (useVerb v) ;
|
||||
ComplVV v vp =insertSimpObj (\\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++vp.comp ! a ++ vp.ext ! Pos) (useVerb v) ;
|
||||
|
||||
|
||||
ComplVS v s = insertExtrapos (\\b => conjThat ++ s.s ! (v.m ! b)) (predV v) ;
|
||||
@@ -69,7 +69,7 @@ concrete VerbRon of Verb =
|
||||
-- needs fixing - agreement for the added verb must be made accordingly to what we add in ComplSlash !!!
|
||||
-- fixed with extra parameter !
|
||||
|
||||
SlashV2V v vp = (insertSimpObj (\\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++ vp.comp ! a ++ vp.ext ! Pos) (useVerb v)) ** {needAgr = True ; needClit = True ;c2 = v.c2} ;
|
||||
SlashV2V v vp = (insertSimpObj (\\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++ vp.comp ! a ++ vp.ext ! Pos) (useVerb v)) ** {needAgr = True ; needClit = True ;c2 = v.c2} ;
|
||||
|
||||
|
||||
SlashV2S v s = (insertExtrapos (\\b => conjThat ++ s.s ! Indic) (useVerb v)) ** {needAgr = False; needClit = True ;c2 = v.c2};
|
||||
@@ -141,7 +141,7 @@ concrete VerbRon of Verb =
|
||||
|
||||
|
||||
SlashVV v vp =
|
||||
insertObjc (\\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++ vp.comp ! a ++ vp.ext ! Pos) ((useVerb v) **{c2=vp.c2; needAgr= vp.needAgr ; needClit = False; lock_VPSlash = <>}) ;
|
||||
insertObjc (\\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++ vp.comp ! a ++ vp.ext ! Pos) ((useVerb v) **{c2=vp.c2; needAgr= vp.needAgr ; needClit = False; lock_VPSlash = <>}) ;
|
||||
|
||||
SlashV2VNP v np vp = let s1 = v.c2.s ++(np.s ! (v.c2.c)).comp ;
|
||||
ss = case np.nForm of
|
||||
@@ -193,6 +193,6 @@ insertObjc : (Agr => Str) -> VPSlash -> VPSlash = \obj,vp ->
|
||||
|
||||
|
||||
getConjComp : VP -> Agr -> {s: Agr => Str} = \vp,ag ->
|
||||
{s = \\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp ag ++ vp.comp ! a ++ vp.ext ! Pos};
|
||||
{s = \\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp ag ++ vp.comp ! a ++ vp.ext ! Pos};
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user