forked from GitHub/gf-core
SymbPN and SymbCN in resources
This commit is contained in:
@@ -168,6 +168,9 @@ fun
|
||||
UseFun : Fun -> CN ; -- "successor"
|
||||
UseInt : Int -> Num ; -- "32" --- assumes i > 1
|
||||
|
||||
SymbPN : String -> PN ; -- "x"
|
||||
SymbCN : CN -> String -> CN ; -- "number x"
|
||||
|
||||
ModAdj : AP -> CN -> CN ; -- "red car"
|
||||
DetNP : Det -> CN -> NP ; -- "every car"
|
||||
MassNP : CN -> NP ; -- "wine"
|
||||
|
||||
@@ -104,6 +104,11 @@ lin
|
||||
UseInt i = {s = table {Nom => i.s ; Gen => i.s ++ "'s"}} ; ---
|
||||
NoNum = noNum ;
|
||||
|
||||
SymbPN i = {s = table {Nom => i.s ; Gen => i.s ++ "'s"}} ; ---
|
||||
SymbCN cn s =
|
||||
{s = \\n,c => cn.s ! n ! c ++ s.s ;
|
||||
g = cn.g} ;
|
||||
|
||||
PredVP = predVerbPhrase ;
|
||||
PosVG = predVerbGroup True ;
|
||||
NegVG = predVerbGroup False ;
|
||||
|
||||
@@ -81,6 +81,7 @@ oper
|
||||
mkFunCN : CN -> Preposition -> Fun ;
|
||||
funOfCN : CN -> Fun ;
|
||||
|
||||
|
||||
--2 Adjectives
|
||||
|
||||
-- Non-comparison one-place adjectives just have one form.
|
||||
|
||||
@@ -101,6 +101,11 @@ lin
|
||||
NoNum = noNum ;
|
||||
UseInt i = {s = \\_ => i.s ; isNum = True} ; --- case endings sometimes needed
|
||||
|
||||
SymbPN i = {s = \\_ => i.s} ; --- case endings often needed
|
||||
SymbCN cn s =
|
||||
{s = \\f,n,c => cn.s ! f ! n ! c ++ s.s ;
|
||||
g = cn.g} ;
|
||||
|
||||
CNthatS = nounThatSentence ;
|
||||
|
||||
PredVP = predVerbPhrase ;
|
||||
|
||||
@@ -109,6 +109,11 @@ lin
|
||||
PosVG = predVerbGroup True ;
|
||||
NegVG = predVerbGroup False ;
|
||||
|
||||
SymbPN i = {s = \\_ => i.s} ;
|
||||
SymbCN cn s =
|
||||
{s = \\a,n,c => cn.s ! a ! n ! c ++ s.s ;
|
||||
g = cn.g} ;
|
||||
|
||||
PredV = predVerb ;
|
||||
PredAP = predAdjective ;
|
||||
PredCN = predCommNoun ;
|
||||
|
||||
@@ -103,6 +103,11 @@ lin
|
||||
UseInt i = {s = \\_ => i.s} ;
|
||||
NoNum = noNum ;
|
||||
|
||||
SymbPN i = {s = i.s ; g = Masc} ; --- cannot know gender
|
||||
SymbCN cn s =
|
||||
{s = \\n => cn.s ! n ++ s.s ;
|
||||
g = cn.g} ;
|
||||
|
||||
CNthatS = nounThatSentence ;
|
||||
|
||||
PredVP = predVerbPhrase ;
|
||||
|
||||
@@ -132,6 +132,14 @@ lin
|
||||
UseInt i = useInt i.s;
|
||||
NoNum = noNum ;
|
||||
|
||||
--- these two by AR 3/6/2004
|
||||
SymbPN i = {s = \\_ => i.s ; g = Neut ; anim = Inanimate} ; ---
|
||||
SymbCN cn s =
|
||||
{s = \\n,c => cn.s ! n ! c ++ s.s ;
|
||||
g = cn.g ;
|
||||
anim = cn.anim
|
||||
} ;
|
||||
|
||||
|
||||
DetNP = detNounPhrase ;
|
||||
IndefOneNP = indefNounPhrase Sg ;
|
||||
|
||||
@@ -103,6 +103,14 @@ lin
|
||||
UseInt i = {s = table {Nom => i.s ; Gen => i.s ++ "s"}} ; ---
|
||||
NoNum = noNum ;
|
||||
|
||||
SymbPN i = {s = \\_ => i.s ; g = Neutr ; x = NoMasc} ;
|
||||
SymbCN cn s =
|
||||
{s = \\a,n,c => cn.s ! a ! n ! c ++ s.s ;
|
||||
g = cn.g ;
|
||||
x = cn.x ;
|
||||
p = cn.p
|
||||
} ;
|
||||
|
||||
CNthatS = nounThatSentence ;
|
||||
|
||||
PredVP = predVerbPhrase ;
|
||||
|
||||
@@ -18,5 +18,5 @@ getCanonModule file = do
|
||||
getCanonGrammar :: FilePath -> IOE CanonGrammar
|
||||
getCanonGrammar file = do
|
||||
s <- ioeIO $ readFileIf file
|
||||
c <- ioeErr $ err2err $ pCanon $ myLexer s
|
||||
c <- ioeErr {- $ err2err -} $ pCanon $ myLexer s
|
||||
return $ canon2grammar c
|
||||
|
||||
@@ -87,15 +87,16 @@ compileModule opts1 st0 file = do
|
||||
let ps = if useFileOpt
|
||||
then (map (prefixPathName fpath) ps0)
|
||||
else ps0
|
||||
ioeIO $ putStrLn $ "module search path:" +++ show ps ----
|
||||
let ioeIOIf = if oElem beSilent opts then (const (return ())) else ioeIO
|
||||
ioeIOIf $ putStrLn $ "module search path:" +++ show ps ----
|
||||
let putp = putPointE opts
|
||||
let st = st0 --- if useFileOpt then emptyShellState else st0
|
||||
let rfs = readFiles st
|
||||
let file' = if useFileOpt then justFileName file else file -- to find file itself
|
||||
files <- getAllFiles opts ps rfs file'
|
||||
ioeIO $ putStrLn $ "files to read:" +++ show files ----
|
||||
ioeIOIf $ putStrLn $ "files to read:" +++ show files ----
|
||||
let names = map justModuleName files
|
||||
ioeIO $ putStrLn $ "modules to include:" +++ show names ----
|
||||
ioeIOIf $ putStrLn $ "modules to include:" +++ show names ----
|
||||
let env0 = compileEnvShSt st names
|
||||
(_,sgr,cgr) <- foldM (compileOne opts) env0 files
|
||||
t <- ioeIO getNowTime
|
||||
|
||||
@@ -31,7 +31,7 @@ getSourceModule :: FilePath -> IOE SourceModule
|
||||
getSourceModule file = do
|
||||
string <- readFileIOE file
|
||||
let tokens = myLexer string
|
||||
mo1 <- ioeErr $ err2err $ pModDef tokens
|
||||
mo1 <- ioeErr $ {- err2err $ -} pModDef tokens
|
||||
ioeErr $ transModDef mo1
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ parseOldGrammar :: FilePath -> IOE ([FilePath],[A.TopDef])
|
||||
parseOldGrammar file = do
|
||||
putStrE $ "reading old file" +++ file
|
||||
s <- ioeIO $ readFileIf file
|
||||
A.OldGr incl topdefs <- ioeErr $ err2err $ pOldGrammar $ oldLexer $ fixNewlines s
|
||||
A.OldGr incl topdefs <- ioeErr $ {- err2err $ -} pOldGrammar $ oldLexer $ fixNewlines s
|
||||
includes <- ioeErr $ transInclude incl
|
||||
return (includes, topdefs)
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import Operations
|
||||
|
||||
pTerm :: String -> Err Term
|
||||
pTerm s = do
|
||||
e <- err2err $ pExp $ myLexer s
|
||||
e <- {- err2err $ -} pExp $ myLexer s
|
||||
transExp e
|
||||
|
||||
pTrm :: String -> Term
|
||||
|
||||
@@ -1 +1 @@
|
||||
module Today where today = "Fri May 28 15:17:28 CEST 2004"
|
||||
module Today where today = "Thu Jun 3 19:06:03 CEST 2004"
|
||||
|
||||
Reference in New Issue
Block a user