mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-23 09:52:55 -06:00
refreshed the tutorial
This commit is contained in:
1014
doc/gf-tutorial.html
1014
doc/gf-tutorial.html
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
module SemBase where
|
module SemBase where
|
||||||
|
|
||||||
import GSyntax
|
import Base
|
||||||
import Logic
|
import Logic
|
||||||
|
|
||||||
-- translation of Base syntax to Logic
|
-- translation of Base syntax to Logic
|
||||||
@@ -8,7 +8,6 @@ import Logic
|
|||||||
iS :: GS -> Prop
|
iS :: GS -> Prop
|
||||||
iS s = case s of
|
iS s = case s of
|
||||||
GPredAP np ap -> iNP np (iAP ap)
|
GPredAP np ap -> iNP np (iAP ap)
|
||||||
GConjS c s t -> iConj c (iS s) (iS t)
|
|
||||||
|
|
||||||
iNP :: GNP -> (Exp -> Prop) -> Prop
|
iNP :: GNP -> (Exp -> Prop) -> Prop
|
||||||
iNP np p = case np of
|
iNP np p = case np of
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
module Main where
|
module Main where
|
||||||
|
|
||||||
import GSyntax
|
import Base
|
||||||
import SemBase
|
import SemBase
|
||||||
import Logic
|
import Logic
|
||||||
import GF.GFCC.API
|
import PGF
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = do
|
main = do
|
||||||
gr <- file2grammar "base.gfcc"
|
gr <- file2grammar "Base.pgf"
|
||||||
loop gr
|
loop gr
|
||||||
|
|
||||||
loop :: MultiGrammar -> IO ()
|
loop :: PGF -> IO ()
|
||||||
loop gr = do
|
loop gr = do
|
||||||
s <- getLine
|
s <- getLine
|
||||||
let t:_ = parse gr "BaseEng" "S" s
|
let t:_ = parse gr "BaseEng" "S" s
|
||||||
|
|||||||
Reference in New Issue
Block a user