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