forked from GitHub/gf-rgl
uniform encoding: gfo and pgf in UTF8, internal in unicode
This commit is contained in:
@@ -19,21 +19,21 @@ import System
|
|||||||
|
|
||||||
langsCoding = [
|
langsCoding = [
|
||||||
(("arabic", "Ara"),""),
|
(("arabic", "Ara"),""),
|
||||||
(("bulgarian","Bul"),"from_cp1251,to_utf8"),
|
(("bulgarian","Bul"),""),
|
||||||
(("catalan", "Cat"),"to_utf8"),
|
(("catalan", "Cat"),""),
|
||||||
(("danish", "Dan"),"to_utf8"),
|
(("danish", "Dan"),""),
|
||||||
(("english", "Eng"),""),
|
(("english", "Eng"),""),
|
||||||
(("finnish", "Fin"),"to_utf8"),
|
(("finnish", "Fin"),""),
|
||||||
(("french", "Fre"),"to_utf8"),
|
(("french", "Fre"),""),
|
||||||
(("hindi", "Hin"),"to_devanagari,to_utf8"),
|
(("hindi", "Hin"),"to_devanagari"),
|
||||||
(("german", "Ger"),"to_utf8"),
|
(("german", "Ger"),""),
|
||||||
(("interlingua","Ina"),""),
|
(("interlingua","Ina"),""),
|
||||||
(("italian", "Ita"),"to_utf8"),
|
(("italian", "Ita"),""),
|
||||||
(("norwegian","Nor"),"to_utf8"),
|
(("norwegian","Nor"),""),
|
||||||
(("russian", "Rus"),""),
|
(("russian", "Rus"),""),
|
||||||
(("spanish", "Spa"),"to_utf8"),
|
(("spanish", "Spa"),""),
|
||||||
(("swedish", "Swe"),"to_utf8"),
|
(("swedish", "Swe"),""),
|
||||||
(("thai", "Tha"),"to_thai,to_utf8")
|
(("thai", "Tha"),"to_thai")
|
||||||
]
|
]
|
||||||
|
|
||||||
langs = map fst langsCoding
|
langs = map fst langsCoding
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
concrete AdjectiveBul of Adjective = CatBul ** open ResBul, Prelude in {
|
concrete AdjectiveBul of Adjective = CatBul ** open ResBul, Prelude in {
|
||||||
|
flags coding=cp1251 ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
PositA a = {
|
PositA a = {
|
||||||
s = \\aform => a.s ! aform ;
|
s = \\aform => a.s ! aform ;
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
concrete AdverbBul of Adverb = CatBul ** open ResBul, Prelude in {
|
concrete AdverbBul of Adverb = CatBul ** open ResBul, Prelude in {
|
||||||
|
flags coding=cp1251 ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
PositAdvAdj a = {s = a.adv} ;
|
PositAdvAdj a = {s = a.adv} ;
|
||||||
ComparAdvAdj cadv a np = {
|
ComparAdvAdj cadv a np = {
|
||||||
|
|||||||
@@ -3,4 +3,6 @@
|
|||||||
concrete Bulgarian of BulgarianAbs =
|
concrete Bulgarian of BulgarianAbs =
|
||||||
LangBul,
|
LangBul,
|
||||||
ExtraBul
|
ExtraBul
|
||||||
** {} ;
|
** {
|
||||||
|
flags coding=cp1251 ;
|
||||||
|
} ;
|
||||||
|
|||||||
@@ -3,4 +3,6 @@
|
|||||||
abstract BulgarianAbs =
|
abstract BulgarianAbs =
|
||||||
Lang,
|
Lang,
|
||||||
ExtraBulAbs
|
ExtraBulAbs
|
||||||
** {} ;
|
** {
|
||||||
|
flags coding=cp1251 ;
|
||||||
|
} ;
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
concrete CatBul of Cat = open ResBul, Prelude, (R = ParamX) in {
|
concrete CatBul of Cat = open ResBul, Prelude, (R = ParamX) in {
|
||||||
|
flags coding=cp1251 ;
|
||||||
|
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
concrete ConjunctionBul of Conjunction =
|
concrete ConjunctionBul of Conjunction =
|
||||||
CatBul ** open ResBul, Coordination, Prelude in {
|
CatBul ** open ResBul, Coordination, Prelude in {
|
||||||
|
flags coding=cp1251 ;
|
||||||
|
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
concrete ExtraBul of ExtraBulAbs = CatBul **
|
concrete ExtraBul of ExtraBulAbs = CatBul **
|
||||||
open ResBul, Coordination, Prelude in {
|
open ResBul, Coordination, Prelude in {
|
||||||
|
flags coding=cp1251 ;
|
||||||
|
|
||||||
|
|
||||||
lin
|
lin
|
||||||
PossIndefPron p = {
|
PossIndefPron p = {
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
abstract ExtraBulAbs = Extra ** {
|
abstract ExtraBulAbs = Extra ** {
|
||||||
|
flags coding=cp1251 ;
|
||||||
|
|
||||||
|
|
||||||
fun
|
fun
|
||||||
-- Feminine variants of pronouns (those in $Structural$ are
|
-- Feminine variants of pronouns (those in $Structural$ are
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ concrete GrammarBul of Grammar =
|
|||||||
StructuralBul,
|
StructuralBul,
|
||||||
IdiomBul
|
IdiomBul
|
||||||
** {
|
** {
|
||||||
|
flags coding=cp1251 ;
|
||||||
|
|
||||||
|
|
||||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
concrete IdiomBul of Idiom = CatBul ** open Prelude, ParadigmsBul, ResBul in {
|
concrete IdiomBul of Idiom = CatBul ** open Prelude, ParadigmsBul, ResBul in {
|
||||||
|
flags coding=cp1251 ;
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ concrete LangBul of Lang =
|
|||||||
GrammarBul,
|
GrammarBul,
|
||||||
LexiconBul
|
LexiconBul
|
||||||
** {
|
** {
|
||||||
|
flags coding=cp1251 ;
|
||||||
|
|
||||||
|
|
||||||
flags startcat = Phr ; unlexer = text ; lexer = text ; erasing = on ; coding = cp1251 ;
|
flags startcat = Phr ; unlexer = text ; lexer = text ; erasing = on ; coding = cp1251 ;
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
concrete LexiconBul of Lexicon = CatBul **
|
concrete LexiconBul of Lexicon = CatBul **
|
||||||
open ParadigmsBul, ResBul, Prelude in {
|
open ParadigmsBul, ResBul, Prelude in {
|
||||||
|
flags coding=cp1251 ;
|
||||||
|
|
||||||
|
|
||||||
flags
|
flags
|
||||||
optimize=values ;
|
optimize=values ;
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ resource MorphoBul = ResBul ** open
|
|||||||
Prelude,
|
Prelude,
|
||||||
CatBul
|
CatBul
|
||||||
in {
|
in {
|
||||||
|
flags coding=cp1251 ;
|
||||||
|
|
||||||
|
|
||||||
flags optimize=all ;
|
flags optimize=all ;
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ resource MorphoFunsBul = open
|
|||||||
CatBul,
|
CatBul,
|
||||||
MorphoBul
|
MorphoBul
|
||||||
in {
|
in {
|
||||||
|
flags coding=cp1251 ;
|
||||||
|
|
||||||
|
|
||||||
oper
|
oper
|
||||||
--2 Adverbs
|
--2 Adverbs
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
|
concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
|
||||||
|
flags coding=cp1251 ;
|
||||||
|
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
concrete NumeralBul of Numeral = CatBul ** open Prelude, ResBul in {
|
concrete NumeralBul of Numeral = CatBul ** open Prelude, ResBul in {
|
||||||
|
flags coding=cp1251 ;
|
||||||
|
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Digit = {s : DForm => CardOrd => Str} ;
|
Digit = {s : DForm => CardOrd => Str} ;
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ resource ParadigmsBul = MorphoFunsBul ** open
|
|||||||
MorphoBul,
|
MorphoBul,
|
||||||
CatBul
|
CatBul
|
||||||
in {
|
in {
|
||||||
|
flags coding=cp1251 ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
mkN001 : Str -> N ;
|
mkN001 : Str -> N ;
|
||||||
mkN001 base = let v0 = base
|
mkN001 base = let v0 = base
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
concrete PhraseBul of Phrase = CatBul ** open Prelude, ResBul in {
|
concrete PhraseBul of Phrase = CatBul ** open Prelude, ResBul in {
|
||||||
|
flags coding=cp1251 ;
|
||||||
|
|
||||||
|
|
||||||
lin
|
lin
|
||||||
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
|
concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
|
||||||
|
flags coding=cp1251 ;
|
||||||
|
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
concrete RelativeBul of Relative = CatBul ** open ResBul in {
|
concrete RelativeBul of Relative = CatBul ** open ResBul in {
|
||||||
|
flags coding=cp1251 ;
|
||||||
|
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
-- patterns needed for $Lex$.
|
-- patterns needed for $Lex$.
|
||||||
|
|
||||||
resource ResBul = ParamX ** open Prelude in {
|
resource ResBul = ParamX ** open Prelude in {
|
||||||
|
flags coding=cp1251 ;
|
||||||
|
|
||||||
|
|
||||||
flags optimize=all ;
|
flags optimize=all ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
|
concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
|
||||||
|
flags coding=cp1251 ;
|
||||||
|
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
concrete StructuralBul of Structural = CatBul **
|
concrete StructuralBul of Structural = CatBul **
|
||||||
open MorphoBul, ParadigmsBul, Prelude in {
|
open MorphoBul, ParadigmsBul, Prelude in {
|
||||||
|
flags coding=cp1251 ;
|
||||||
|
|
||||||
|
|
||||||
flags optimize=all ;
|
flags optimize=all ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
concrete TextBul of Text = CatBul ** {
|
concrete TextBul of Text = CatBul ** {
|
||||||
|
flags coding=cp1251 ;
|
||||||
|
|
||||||
|
|
||||||
-- This will work for almost all languages except Spanish.
|
-- This will work for almost all languages except Spanish.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
|
concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
|
||||||
|
flags coding=cp1251 ;
|
||||||
|
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,6 @@ concrete DemoRus of Demo =
|
|||||||
LexiconRus
|
LexiconRus
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
flags startcat = Phr ; unlexer = text ; lexer = text ; coding = utf8 ;
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ lin
|
|||||||
SymbPN i = {s = \\c => i.s ; g = Neutr} ; --- c
|
SymbPN i = {s = \\c => i.s ; g = Neutr} ; --- c
|
||||||
IntPN i = {s = \\c => i.s ; g = Neutr} ; --- c
|
IntPN i = {s = \\c => i.s ; g = Neutr} ; --- c
|
||||||
FloatPN i = {s = \\c => i.s ; g = Neutr} ; --- c
|
FloatPN i = {s = \\c => i.s ; g = Neutr} ; --- c
|
||||||
NumPN i = {s = \\c => i.s ; g = Neutr} ; --- c
|
NumPN i = {s = i.s ! Neutr ; g = Neutr} ; --- c
|
||||||
|
|
||||||
CNIntNP cn i = {
|
CNIntNP cn i = {
|
||||||
s = \\c => cn.s ! Weak ! Sg ! Nom ++ i.s ;
|
s = \\c => cn.s ! Weak ! Sg ! Nom ++ i.s ;
|
||||||
@@ -17,14 +17,14 @@ lin
|
|||||||
isPron = False
|
isPron = False
|
||||||
} ;
|
} ;
|
||||||
CNNumNP cn i = {
|
CNNumNP cn i = {
|
||||||
s = \\c => artDef ! (GSg cn.g) ! c ++ cn.s ! Weak ! Sg ! Nom ++ i.s ;
|
s = \\c => artDef ! (GSg cn.g) ! c ++ cn.s ! Weak ! Sg ! Nom ++ i.s ! Neutr ! c ;
|
||||||
a = agrP3 Sg ;
|
a = agrP3 Sg ;
|
||||||
isPron = False
|
isPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
SymbS sy = {s = \\_ => sy.s} ;
|
SymbS sy = {s = \\_ => sy.s} ;
|
||||||
|
|
||||||
SymbNum n = {s = n.s ; n = Pl ; isNum = True} ;
|
SymbNum n = {s = \\_,_ => n.s ; n = Pl ; isNum = True} ;
|
||||||
SymbOrd n = {s = \\_ => n.s ++ "."} ;
|
SymbOrd n = {s = \\_ => n.s ++ "."} ;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
concrete ExtraRus of ExtraRusAbs = CatRus ** {
|
concrete ExtraRus of ExtraRusAbs = CatRus ** {
|
||||||
|
flags coding=utf8 ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,4 +14,4 @@ concrete GrammarRus of Grammar =
|
|||||||
TextX,
|
TextX,
|
||||||
StructuralRus,
|
StructuralRus,
|
||||||
IdiomRus
|
IdiomRus
|
||||||
** { flags startcat = Phr ; unlexer = text ; lexer = text ;} ;
|
** { flags startcat = Phr ; unlexer = text ; lexer = text ; coding=utf8 ;} ;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
--
|
--
|
||||||
concrete IrregRus of IrregRusAbs = CatRus ** open ParadigmsRus in {
|
concrete IrregRus of IrregRusAbs = CatRus ** open ParadigmsRus in {
|
||||||
--
|
--
|
||||||
--flags optimize=values ;
|
flags optimize=values ; coding=utf8 ;
|
||||||
--
|
--
|
||||||
-- lin
|
-- lin
|
||||||
-- awake_V = irregV "awake" "awoke" "awoken" ;
|
-- awake_V = irregV "awake" "awoke" "awoken" ;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
concrete NounRus of Noun = CatRus ** open ResRus, Prelude, MorphoRus in {
|
concrete NounRus of Noun = CatRus ** open ResRus, Prelude, MorphoRus in {
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ; coding=utf8 ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
DetCN kazhduj okhotnik = {
|
DetCN kazhduj okhotnik = {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
concrete PhraseRus of Phrase = CatRus ** open Prelude, ResRus in {
|
concrete PhraseRus of Phrase = CatRus ** open Prelude, ResRus in {
|
||||||
|
|
||||||
|
flags coding=utf8 ;
|
||||||
lin
|
lin
|
||||||
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
concrete QuestionRus of Question = CatRus ** open ResRus, Prelude in {
|
concrete QuestionRus of Question = CatRus ** open ResRus, Prelude in {
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ; coding=utf8 ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
|
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
concrete Russian of RussianAbs =
|
concrete Russian of RussianAbs =
|
||||||
LangRus,
|
LangRus,
|
||||||
ExtraRus
|
ExtraRus
|
||||||
** {} ;
|
** {flags coding=utf8 ;} ;
|
||||||
|
|||||||
Reference in New Issue
Block a user