forked from GitHub/gf-core
Lang modules in terms of Grammar
This commit is contained in:
@@ -6,18 +6,6 @@
|
||||
-- which may be more suitable to open in applications.
|
||||
|
||||
abstract Lang =
|
||||
Noun,
|
||||
Verb,
|
||||
Adjective,
|
||||
Adverb,
|
||||
Numeral,
|
||||
Sentence,
|
||||
Question,
|
||||
Relative,
|
||||
Conjunction,
|
||||
Phrase,
|
||||
Text,
|
||||
Structural,
|
||||
Idiom,
|
||||
Grammar,
|
||||
Lexicon
|
||||
** {} ;
|
||||
|
||||
@@ -1,19 +1,7 @@
|
||||
--# -path=.:../scandinavian:../abstract:../common:prelude
|
||||
|
||||
concrete LangDan of Lang =
|
||||
NounDan,
|
||||
VerbDan,
|
||||
AdjectiveDan,
|
||||
AdverbDan,
|
||||
NumeralDan,
|
||||
SentenceDan,
|
||||
QuestionDan,
|
||||
RelativeDan,
|
||||
ConjunctionDan,
|
||||
PhraseDan,
|
||||
TextX,
|
||||
IdiomDan,
|
||||
StructuralDan,
|
||||
GrammarDan,
|
||||
LexiconDan
|
||||
** {
|
||||
|
||||
|
||||
@@ -1,19 +1,7 @@
|
||||
--# -path=.:../abstract:../common:prelude
|
||||
|
||||
concrete LangEng of Lang =
|
||||
NounEng,
|
||||
VerbEng,
|
||||
AdjectiveEng,
|
||||
AdverbEng,
|
||||
NumeralEng,
|
||||
SentenceEng,
|
||||
QuestionEng,
|
||||
RelativeEng,
|
||||
ConjunctionEng,
|
||||
PhraseEng,
|
||||
TextX,
|
||||
StructuralEng,
|
||||
IdiomEng,
|
||||
GrammarEng,
|
||||
LexiconEng
|
||||
** {
|
||||
|
||||
|
||||
@@ -1,19 +1,7 @@
|
||||
--# -path=.:../abstract:../common:prelude
|
||||
|
||||
concrete LangFin of Lang =
|
||||
NounFin,
|
||||
VerbFin,
|
||||
AdjectiveFin,
|
||||
AdverbFin,
|
||||
NumeralFin,
|
||||
SentenceFin,
|
||||
QuestionFin,
|
||||
RelativeFin,
|
||||
ConjunctionFin,
|
||||
PhraseFin,
|
||||
TextX,
|
||||
IdiomFin,
|
||||
StructuralFin,
|
||||
GrammarFin,
|
||||
LexiconFin
|
||||
** {
|
||||
|
||||
|
||||
@@ -1,19 +1,7 @@
|
||||
--# -path=.:../romance:../abstract:../common:prelude
|
||||
|
||||
concrete LangFre of Lang =
|
||||
NounFre,
|
||||
VerbFre,
|
||||
AdjectiveFre,
|
||||
AdverbFre,
|
||||
NumeralFre,
|
||||
SentenceFre,
|
||||
QuestionFre,
|
||||
RelativeFre,
|
||||
ConjunctionFre,
|
||||
PhraseFre,
|
||||
TextX,
|
||||
IdiomFre,
|
||||
StructuralFre,
|
||||
GrammarFre,
|
||||
LexiconFre
|
||||
** {
|
||||
|
||||
|
||||
@@ -1,19 +1,7 @@
|
||||
--# -path=.:../abstract:../common:prelude
|
||||
|
||||
concrete LangGer of Lang =
|
||||
NounGer,
|
||||
VerbGer,
|
||||
AdjectiveGer,
|
||||
AdverbGer,
|
||||
NumeralGer,
|
||||
SentenceGer,
|
||||
QuestionGer,
|
||||
RelativeGer,
|
||||
ConjunctionGer,
|
||||
PhraseGer,
|
||||
TextX,
|
||||
IdiomGer,
|
||||
StructuralGer,
|
||||
GrammarGer,
|
||||
LexiconGer
|
||||
** {
|
||||
|
||||
|
||||
@@ -1,19 +1,7 @@
|
||||
--# -path=.:../romance:../abstract:../common:prelude
|
||||
|
||||
concrete LangIta of Lang =
|
||||
NounIta,
|
||||
VerbIta,
|
||||
AdjectiveIta,
|
||||
AdverbIta,
|
||||
NumeralIta,
|
||||
SentenceIta,
|
||||
QuestionIta,
|
||||
RelativeIta,
|
||||
ConjunctionIta,
|
||||
PhraseIta,
|
||||
TextX,
|
||||
IdiomIta,
|
||||
StructuralIta,
|
||||
GrammarIta,
|
||||
LexiconIta
|
||||
** {
|
||||
|
||||
|
||||
@@ -1,19 +1,7 @@
|
||||
--# -path=.:../scandinavian:../abstract:../common:prelude
|
||||
|
||||
concrete LangNor of Lang =
|
||||
NounNor,
|
||||
VerbNor,
|
||||
AdjectiveNor,
|
||||
AdverbNor,
|
||||
NumeralNor,
|
||||
SentenceNor,
|
||||
QuestionNor,
|
||||
RelativeNor,
|
||||
ConjunctionNor,
|
||||
PhraseNor,
|
||||
TextX,
|
||||
IdiomNor,
|
||||
StructuralNor,
|
||||
GrammarNor,
|
||||
LexiconNor
|
||||
** {
|
||||
|
||||
|
||||
@@ -1,17 +1,9 @@
|
||||
--# -path=.:../abstract:../common:../../prelude
|
||||
|
||||
concrete LangRus of Lang =
|
||||
NounRus,
|
||||
VerbRus,
|
||||
AdjectiveRus,
|
||||
AdverbRus,
|
||||
NumeralRus,
|
||||
SentenceRus,
|
||||
QuestionRus,
|
||||
RelativeRus,
|
||||
ConjunctionRus,
|
||||
PhraseRus,
|
||||
TextX,
|
||||
StructuralRus,
|
||||
IdiomRus,
|
||||
LexiconRus ** { flags startcat = Phr ; unlexer = text ; lexer = text ;} ;
|
||||
GrammarRus,
|
||||
LexiconRus ** {
|
||||
|
||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -1,19 +1,7 @@
|
||||
--# -path=.:../romance:../abstract:../common:prelude
|
||||
|
||||
concrete LangSpa of Lang =
|
||||
NounSpa,
|
||||
VerbSpa,
|
||||
AdjectiveSpa,
|
||||
AdverbSpa,
|
||||
NumeralSpa,
|
||||
SentenceSpa,
|
||||
QuestionSpa,
|
||||
RelativeSpa,
|
||||
ConjunctionSpa,
|
||||
PhraseSpa,
|
||||
TextSpa, -- special punctuation
|
||||
IdiomSpa,
|
||||
StructuralSpa,
|
||||
GrammarSpa,
|
||||
LexiconSpa
|
||||
** {
|
||||
|
||||
|
||||
@@ -1,19 +1,7 @@
|
||||
--# -path=.:../scandinavian:../abstract:../common:prelude
|
||||
|
||||
concrete LangSwe of Lang =
|
||||
NounSwe,
|
||||
VerbSwe,
|
||||
AdjectiveSwe,
|
||||
AdverbSwe,
|
||||
NumeralSwe,
|
||||
SentenceSwe,
|
||||
QuestionSwe,
|
||||
RelativeSwe,
|
||||
ConjunctionSwe,
|
||||
PhraseSwe,
|
||||
TextX,
|
||||
IdiomSwe,
|
||||
StructuralSwe,
|
||||
GrammarSwe,
|
||||
LexiconSwe
|
||||
** {
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ import qualified GF.Conversion.RemoveErasing as RemEra
|
||||
import qualified GF.Conversion.RemoveEpsilon as RemEps
|
||||
import qualified GF.Conversion.SimpleToMCFG as S2M
|
||||
import qualified GF.Conversion.SimpleToFCFG as S2FM
|
||||
import qualified GF.Conversion.MCFGtoFCFG as M2FM
|
||||
--import qualified GF.Conversion.MCFGtoFCFG as M2FM
|
||||
import qualified GF.Conversion.MCFGtoCFG as M2C
|
||||
|
||||
import GF.Infra.Print
|
||||
@@ -58,7 +58,7 @@ convertGFC opts = \g -> let s = g2s g
|
||||
Just "epsilon" -> epsilon . nondet
|
||||
_ -> nondet
|
||||
s2fm= S2FM.convertGrammar
|
||||
m2fm= M2FM.convertGrammar
|
||||
m2fm= undefined --M2FM.convertGrammar
|
||||
g2s = case getOptVal opts gfcConversion of
|
||||
Just "finite" -> finite . simple
|
||||
Just "finite2" -> finite . finite . simple
|
||||
@@ -95,7 +95,7 @@ gfc2fcfg opts g = fcfg
|
||||
(_, fcfg, _) = snd (snd (convertGFC opts g))
|
||||
|
||||
mcfg2fcfg :: MGrammar -> FGrammar
|
||||
mcfg2fcfg = M2FM.convertGrammar
|
||||
mcfg2fcfg = undefined --M2FM.convertGrammar
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user