mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-23 09:52:55 -06:00
nocf flag ; mathematical API
This commit is contained in:
@@ -114,11 +114,6 @@ oper
|
|||||||
|
|
||||||
nKukko : (kukko,kukon,kukkoja : Str) -> N ;
|
nKukko : (kukko,kukon,kukkoja : Str) -> N ;
|
||||||
|
|
||||||
-- For convenience, we define 1-argument paradigms as producing the
|
|
||||||
-- nonhuman gender; the following function changes this:
|
|
||||||
|
|
||||||
humanN : N -> N ;
|
|
||||||
|
|
||||||
-- A special case are nouns with no alternations:
|
-- A special case are nouns with no alternations:
|
||||||
-- the vowel harmony is inferred from the last letter,
|
-- the vowel harmony is inferred from the last letter,
|
||||||
-- which must be one of "o", "u", "ö", "y".
|
-- which must be one of "o", "u", "ö", "y".
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ concrete StructuralFin of Structural = CatFin **
|
|||||||
either7or_DConj = sd2 "joko" "tai" ** {n = Sg} ;
|
either7or_DConj = sd2 "joko" "tai" ** {n = Sg} ;
|
||||||
everybody_NP = mkNP (regN "jokainen") Sg ;
|
everybody_NP = mkNP (regN "jokainen") Sg ;
|
||||||
every_Det = mkDet Sg (regN "jokainen") ;
|
every_Det = mkDet Sg (regN "jokainen") ;
|
||||||
everything_NP = mkNP (nhn (sKorpi "kaikki" "kaiken" "kaikkena")) Sg ;
|
everything_NP = mkNP ((nhn (sKorpi "kaikki" "kaiken" "kaikkena")) **
|
||||||
|
{lock_N = <>}) Sg ;
|
||||||
everywhere_Adv = ss "kaikkialla" ;
|
everywhere_Adv = ss "kaikkialla" ;
|
||||||
first_Ord = {s = \\n,c => (regN "ensimmäinen").s ! NCase n c} ;
|
first_Ord = {s = \\n,c => (regN "ensimmäinen").s ! NCase n c} ;
|
||||||
from_Prep = casePrep elative ;
|
from_Prep = casePrep elative ;
|
||||||
|
|||||||
@@ -253,7 +253,6 @@ oper
|
|||||||
mkV2Q : V -> Preposition -> V2Q ;
|
mkV2Q : V -> Preposition -> V2Q ;
|
||||||
|
|
||||||
mkAS : A -> AS ;
|
mkAS : A -> AS ;
|
||||||
subjAS : A -> AS ;
|
|
||||||
mkA2S : A -> Preposition -> A2S ;
|
mkA2S : A -> Preposition -> A2S ;
|
||||||
mkAV : A -> Preposition -> AV ;
|
mkAV : A -> Preposition -> AV ;
|
||||||
mkA2V : A -> Preposition -> Preposition -> A2V ;
|
mkA2V : A -> Preposition -> Preposition -> A2V ;
|
||||||
|
|||||||
24
lib/resource-1.0/mathematical/MathematicalFin.gf
Normal file
24
lib/resource-1.0/mathematical/MathematicalFin.gf
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
--# -path=.:../finnish:../abstract:../common:prelude
|
||||||
|
|
||||||
|
concrete MathematicalFin of Mathematical =
|
||||||
|
NounFin - [ComplN2], --- to avoid ambiguity
|
||||||
|
-- VerbFin,
|
||||||
|
-- AdjectiveFin,
|
||||||
|
-- AdverbFin,
|
||||||
|
NumeralFin,
|
||||||
|
-- SentenceFin,
|
||||||
|
QuestionFin,
|
||||||
|
RelativeFin,
|
||||||
|
ConjunctionFin,
|
||||||
|
PhraseFin,
|
||||||
|
StructuralFin,
|
||||||
|
|
||||||
|
SymbolFin,
|
||||||
|
PredicationFin,
|
||||||
|
|
||||||
|
LexiconFin
|
||||||
|
** {
|
||||||
|
|
||||||
|
flags startcat = Phr ;
|
||||||
|
|
||||||
|
} ;
|
||||||
24
lib/resource-1.0/mathematical/MathematicalSpa.gf
Normal file
24
lib/resource-1.0/mathematical/MathematicalSpa.gf
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
--# -path=.:../spanish:../romance:../abstract:../common:prelude
|
||||||
|
|
||||||
|
concrete MathematicalSpa of Mathematical =
|
||||||
|
NounSpa - [ComplN2], --- to avoid ambiguity
|
||||||
|
-- VerbSpa,
|
||||||
|
-- AdjectiveSpa,
|
||||||
|
-- AdverbSpa,
|
||||||
|
NumeralSpa,
|
||||||
|
-- SentenceSpa,
|
||||||
|
QuestionSpa,
|
||||||
|
RelativeSpa,
|
||||||
|
ConjunctionSpa,
|
||||||
|
PhraseSpa,
|
||||||
|
StructuralSpa,
|
||||||
|
|
||||||
|
SymbolSpa,
|
||||||
|
PredicationSpa, -- - [predV3,predV2], --- gf bug
|
||||||
|
|
||||||
|
LexiconSpa
|
||||||
|
** {
|
||||||
|
|
||||||
|
flags startcat = Phr ;
|
||||||
|
|
||||||
|
} ;
|
||||||
3
lib/resource-1.0/mathematical/PredicationFin.gf
Normal file
3
lib/resource-1.0/mathematical/PredicationFin.gf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
concrete PredicationFin of Predication = CatFin ** PredicationI with
|
||||||
|
(Lang = LangFin) ;
|
||||||
|
|
||||||
3
lib/resource-1.0/mathematical/PredicationSpa.gf
Normal file
3
lib/resource-1.0/mathematical/PredicationSpa.gf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
concrete PredicationSpa of Predication = CatSpa ** PredicationI with
|
||||||
|
(Lang = LangSpa) ;
|
||||||
|
|
||||||
28
lib/resource-1.0/mathematical/SymbolFin.gf
Normal file
28
lib/resource-1.0/mathematical/SymbolFin.gf
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
concrete SymbolFin of Symbol = CatFin ** open Prelude, ResFin in {
|
||||||
|
|
||||||
|
lin
|
||||||
|
SymbPN i = {s = \\c => i.s} ; --- c
|
||||||
|
IntPN i = {s = \\c => i.s} ; --- c
|
||||||
|
{-
|
||||||
|
CNIntNP cn i = {
|
||||||
|
s = \\c => (cn.s ! Sg ! DIndef ! Nom ++ i.s) ;
|
||||||
|
a = agrP3 cn.g Sg
|
||||||
|
} ;
|
||||||
|
CNSymbNP det cn xs = let g = cn.g in {
|
||||||
|
s = \\c => det.s ! cn.isMod ! g ++ cn.s ! det.n ! det.det ! caseNP c ++ xs.s ;
|
||||||
|
a = agrP3 g det.n
|
||||||
|
} ;
|
||||||
|
-}
|
||||||
|
lincat
|
||||||
|
|
||||||
|
Symb, SymbList = SS ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
|
||||||
|
MkSymb s = s ;
|
||||||
|
|
||||||
|
BaseSymb = infixSS "ja" ;
|
||||||
|
ConsSymb = infixSS "," ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
2
lib/resource-1.0/mathematical/SymbolSpa.gf
Normal file
2
lib/resource-1.0/mathematical/SymbolSpa.gf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
concrete SymbolSpa of Symbol = CatSpa ** SymbolRomance with
|
||||||
|
(ResRomance = ResSpa) ;
|
||||||
@@ -256,7 +256,6 @@ oper
|
|||||||
mkV2Q : V -> Preposition -> V2Q ;
|
mkV2Q : V -> Preposition -> V2Q ;
|
||||||
|
|
||||||
mkAS : A -> AS ;
|
mkAS : A -> AS ;
|
||||||
subjAS : A -> AS ;
|
|
||||||
mkA2S : A -> Preposition -> A2S ;
|
mkA2S : A -> Preposition -> A2S ;
|
||||||
mkAV : A -> Preposition -> AV ;
|
mkAV : A -> Preposition -> AV ;
|
||||||
mkA2V : A -> Preposition -> Preposition -> A2V ;
|
mkA2V : A -> Preposition -> Preposition -> A2V ;
|
||||||
|
|||||||
@@ -215,7 +215,9 @@ updateShellState opts ign mcnc sh ((_,sgr,gr),rts) = do
|
|||||||
concr0 = ifNull Nothing (return . head) concrs
|
concr0 = ifNull Nothing (return . head) concrs
|
||||||
notInrts f = notElem f $ map fst rts
|
notInrts f = notElem f $ map fst rts
|
||||||
subcgr = unSubelimCanon cgr
|
subcgr = unSubelimCanon cgr
|
||||||
cfs <- mapM (canon2cf opts ign subcgr) concrs --- why need to update all...
|
cf's <- if oElem noCF opts
|
||||||
|
then return $ map snd $ cfs sh
|
||||||
|
else mapM (canon2cf opts ign subcgr) concrs --- why need to update all...
|
||||||
|
|
||||||
let morphos = map (mkMorpho subcgr) concrs
|
let morphos = map (mkMorpho subcgr) concrs
|
||||||
let probss = [] -----
|
let probss = [] -----
|
||||||
@@ -241,7 +243,7 @@ updateShellState opts ign mcnc sh ((_,sgr,gr),rts) = do
|
|||||||
concretes = zip (zip concrs concrs) (repeat True),
|
concretes = zip (zip concrs concrs) (repeat True),
|
||||||
canModules = cgr,
|
canModules = cgr,
|
||||||
srcModules = src,
|
srcModules = src,
|
||||||
cfs = zip concrs cfs,
|
cfs = zip concrs cf's,
|
||||||
abstracts = abstrs,
|
abstracts = abstrs,
|
||||||
mcfgs = zip concrs mcfgs,
|
mcfgs = zip concrs mcfgs,
|
||||||
cfgs = zip concrs cfgs,
|
cfgs = zip concrs cfgs,
|
||||||
@@ -424,14 +426,6 @@ allActiveStateGrammarsWithNames st =
|
|||||||
|
|
||||||
allActiveGrammars = map snd . allActiveStateGrammarsWithNames
|
allActiveGrammars = map snd . allActiveStateGrammarsWithNames
|
||||||
|
|
||||||
{-
|
|
||||||
allGrammarSTs = map stateGrammarST . allStateGrammars
|
|
||||||
allCFs = map stateCF . allStateGrammars
|
|
||||||
|
|
||||||
firstGrammarST = stateGrammarST . firstStateGrammar
|
|
||||||
firstAbstractST = abstractOf . firstGrammarST
|
|
||||||
firstConcreteST = concreteOf . firstGrammarST
|
|
||||||
-}
|
|
||||||
-- command-line option -lang=foo overrides the actual grammar in state
|
-- command-line option -lang=foo overrides the actual grammar in state
|
||||||
grammarOfOptState :: Options -> ShellState -> StateGrammar
|
grammarOfOptState :: Options -> ShellState -> StateGrammar
|
||||||
grammarOfOptState opts st =
|
grammarOfOptState opts st =
|
||||||
|
|||||||
Reference in New Issue
Block a user