mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-10-25 08:43:17 -06:00
updates after the cleanup in the runtime
This commit is contained in:
1 parent
dc1808d940
commit
cf6297fbff
3 files changed
+9
-4
No files matched your search
@@ -59,6 +59,7 @@ pgfCommands = Map.fromList [
|
|||||||
exec = needPGF $ \ opts arg pgf -> do
|
exec = needPGF $ \ opts arg pgf -> do
|
||||||
let es = toExprs arg
|
let es = toExprs arg
|
||||||
let langs = optLangs pgf opts
|
let langs = optLangs pgf opts
|
||||||
|
let gizaAlignment = error "TODO: gizaAlignment"
|
||||||
if isOpt "giza" opts
|
if isOpt "giza" opts
|
||||||
then do
|
then do
|
||||||
let giz = map (gizaAlignment pgf (head $ langs, head $ tail $ langs)) es
|
let giz = map (gizaAlignment pgf (head $ langs, head $ tail $ langs)) es
|
||||||
@@ -524,6 +525,10 @@ pgfCommands = Map.fromList [
|
|||||||
let abslabels = valStrOpts "abslabels" (valStrOpts "file" "" opts) opts
|
let abslabels = valStrOpts "abslabels" (valStrOpts "file" "" opts) opts
|
||||||
let cnclabels = valStrOpts "cnclabels" "" opts
|
let cnclabels = valStrOpts "cnclabels" "" opts
|
||||||
let outp = valStrOpts "output" "dot" opts
|
let outp = valStrOpts "output" "dot" opts
|
||||||
|
let graphvizDependencyTree = error "TODO: graphvizDependencyTree"
|
||||||
|
let getDepLabels = error "TODO: getDepLabels"
|
||||||
|
let getCncDepLabels = error "TODO: getCncDepLabels"
|
||||||
|
let conlls2latexDoc = error "TODO: conlls2latexDoc"
|
||||||
mlab <- case abslabels of
|
mlab <- case abslabels of
|
||||||
"" -> return Nothing
|
"" -> return Nothing
|
||||||
_ -> (Just . getDepLabels) `fmap` restricted (readFile abslabels)
|
_ -> (Just . getDepLabels) `fmap` restricted (readFile abslabels)
|
||||||
@@ -785,9 +790,9 @@ pgfCommands = Map.fromList [
|
|||||||
fromParse1 opts (s,po) =
|
fromParse1 opts (s,po) =
|
||||||
case po of
|
case po of
|
||||||
ParseOk ts -> fromExprs (isOpt "show_probs" opts) (takeOptNum opts ts)
|
ParseOk ts -> fromExprs (isOpt "show_probs" opts) (takeOptNum opts ts)
|
||||||
ParseFailed i t -> pipeMessage $ "The parser failed at position "
|
ParseFailed i -> pipeMessage $ "The parser failed at position "
|
||||||
++ show i ++": "
|
++ show i ++": "
|
||||||
++ show t
|
++ show (takeWhile (not.isSpace) (drop i s))
|
||||||
ParseIncomplete -> pipeMessage "The sentence is not complete"
|
ParseIncomplete -> pipeMessage "The sentence is not complete"
|
||||||
|
|
||||||
optLins pgf opts ts = concatMap (optLin pgf opts) ts
|
optLins pgf opts ts = concatMap (optLin pgf opts) ts
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ convertFile conf src file = do
|
|||||||
appn "("
|
appn "("
|
||||||
let typ = maybe (error "no valid cat") id $ readType cat
|
let typ = maybe (error "no valid cat") id $ readType cat
|
||||||
ws <- case parse lang typ ex of
|
ws <- case parse lang typ ex of
|
||||||
ParseFailed _ _ -> do
|
ParseFailed _ -> do
|
||||||
appv ("WARNING: cannot parse example " ++ ex)
|
appv ("WARNING: cannot parse example " ++ ex)
|
||||||
return []
|
return []
|
||||||
ParseIncomplete ->
|
ParseIncomplete ->
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import GF.Compile.GeneratePMCFG
|
|||||||
import GF.Compile.GenerateBC
|
import GF.Compile.GenerateBC
|
||||||
import GF.Compile.OptimizePGF
|
import GF.Compile.OptimizePGF
|
||||||
|
|
||||||
import PGF2 hiding (mkType)
|
import PGF2 hiding (mkType,showIdent)
|
||||||
import PGF2.Transactions
|
import PGF2.Transactions
|
||||||
import GF.Grammar.Predef
|
import GF.Grammar.Predef
|
||||||
import GF.Grammar.Grammar hiding (Production)
|
import GF.Grammar.Grammar hiding (Production)
|
||||||
|
|||||||
Reference in new issue
Block a user