forked from GitHub/gf-rgl
Move everything related to synopsis into subfolder
Clean up some unused and generated files
This commit is contained in:
6
doc/synopsis/.gitignore
vendored
Normal file
6
doc/synopsis/.gitignore
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
index.txt
|
||||
index.html
|
||||
api-examples-*.txt
|
||||
api-examples.gfs
|
||||
categories-imagemap.html
|
||||
categories.png
|
||||
67
doc/synopsis/Makefile
Normal file
67
doc/synopsis/Makefile
Normal file
@@ -0,0 +1,67 @@
|
||||
# Your GF_LIB_PATH must be set in order for this build script to work
|
||||
|
||||
.PHONY: all index clean
|
||||
|
||||
GF_alltenses=$(GF_LIB_PATH)/alltenses
|
||||
GF=gf
|
||||
GFDOC=gfdoc
|
||||
|
||||
ROOT=../..
|
||||
S=$(ROOT)/src
|
||||
CONFIG=$(ROOT)/languages.csv
|
||||
|
||||
# List of languages extracted from languages.csv, with 'Synopsis' column == y
|
||||
LANGS=$(shell cat $(CONFIG) | cut -d',' -f1,10 | grep ',y' | cut -d',' -f1)
|
||||
|
||||
# This list was constructed by observing what files MkSynopsis.hs reads
|
||||
SRC_FILES=$(S)/abstract/Common.gf $(S)/abstract/Cat.gf $(S)/api/Constructors.gf $(S)/abstract/Structural.gf $(patsubst %,$S/*/Paradigms%.gf,$(LANGS))
|
||||
|
||||
EXAMPLES_OUT=$(patsubst %,api-examples-%.txt,$(LANGS))
|
||||
INCLUDES=intro.txt categories-intro.txt categories-imagemap.html additional.txt browse.txt example.txt
|
||||
|
||||
TMP=tmp.html
|
||||
TEMPLATE=template.html
|
||||
|
||||
all: index
|
||||
|
||||
index: index.html
|
||||
|
||||
index.txt: MkSynopsis.hs MkExxTable.hs $(INCLUDES) $(EXAMPLES_OUT) $(SRC_FILES)
|
||||
runghc -i$(ROOT) MkSynopsis.hs
|
||||
|
||||
index.html: index.txt $(TEMPLATE)
|
||||
txt2tags --target=html --no-headers --quiet --toc --outfile=$@ --infile=$<
|
||||
pandoc \
|
||||
--from=html \
|
||||
--to=html5 \
|
||||
--standalone \
|
||||
--template=$(TEMPLATE) \
|
||||
--css=synopsis.css \
|
||||
--metadata='title:"GF Resource Grammar Library: Synopsis"' \
|
||||
--variable='rel-root:$(ROOT)/..' \
|
||||
--output=$(TMP) \
|
||||
$@
|
||||
mv $(TMP) $@
|
||||
|
||||
categories.png: categories.dot
|
||||
dot -Tpng $^ > $@
|
||||
|
||||
categories-imagemap.html: categories.dot
|
||||
dot -Tcmapx $^ > $@
|
||||
|
||||
api-examples.gfs: api-examples.txt MkExx.hs
|
||||
runghc MkExx.hs < $< > $@
|
||||
|
||||
# Since .gfo files aren't self-contained, the dependencies given here are
|
||||
# incomplete. But I am thinking that the Try%.gfo file will always be newer
|
||||
# than any other files it depends on, so the rule will trigger when
|
||||
# needed anyway. //TH 2018-10-22
|
||||
api-examples-%.txt: $(GF_alltenses)/Try%.gfo api-examples.gfs
|
||||
GF_LIB_PATH=$(GF_LIB_PATH) $(GF) -retain -s $< <api-examples.gfs >$@
|
||||
|
||||
clean:
|
||||
rm -rf \
|
||||
index.txt \
|
||||
index.html \
|
||||
api-examples.gfs \
|
||||
$(EXAMPLES_OUT)
|
||||
32
doc/synopsis/MkExx.hs
Normal file
32
doc/synopsis/MkExx.hs
Normal file
@@ -0,0 +1,32 @@
|
||||
-- make a script for computing examples
|
||||
-- usage: runghc MkExx.hs <koe.txt >koe.gfs
|
||||
-- then: gf -retain -s ../alltenses/TryRon.gfo <koe.gfs
|
||||
-- called automatically by 'make exx'
|
||||
|
||||
main = interact (unlines . concatMap mkScript . takeWhile (/="--.") . lines)
|
||||
|
||||
mkScript l = case l of
|
||||
' ':_ ->
|
||||
let ident = mkIdent $ unwords $ takeWhile (/="--") $ words l
|
||||
in [add $ psq ident]
|
||||
'-':_ -> []
|
||||
_ -> [
|
||||
add $ psq l,
|
||||
add $ "cc -one " ++ l,
|
||||
add $ psq "*"
|
||||
]
|
||||
|
||||
add = ('\n':)
|
||||
|
||||
psq s = "ps \"" ++ s ++ "\""
|
||||
|
||||
-- makes mkUtt : QS -> Utt to mkUtt-QS-Utt
|
||||
mkIdent :: String -> String
|
||||
mkIdent = concatMap unspec where
|
||||
unspec c = case c of
|
||||
' ' -> ""
|
||||
'>' -> ""
|
||||
'(' -> ""
|
||||
')' -> ""
|
||||
':' -> "-"
|
||||
_ -> [c]
|
||||
105
doc/synopsis/MkExxTable.hs
Normal file
105
doc/synopsis/MkExxTable.hs
Normal file
@@ -0,0 +1,105 @@
|
||||
module MkExxTable (getApiExx, ApiExx, prApiEx, mkEx) where
|
||||
|
||||
--import System.Cmd
|
||||
import System.Environment(getArgs)
|
||||
import Control.Monad(when)
|
||||
import qualified Data.Map as M
|
||||
|
||||
main = do
|
||||
xx <- getArgs
|
||||
aexx <- getApiExx' True xx
|
||||
return () -- putStrLn $ prApiExx aexx
|
||||
|
||||
getApiExx :: [FilePath] -> IO ApiExx
|
||||
getApiExx = getApiExx' False
|
||||
|
||||
getApiExx' verbose xx = do
|
||||
s <- readFile (head xx)
|
||||
let aet = getApiExxTrees $ filter validOutput $ mergeOutput $ lines s
|
||||
aeos <- mapM (readApiExxOne verbose) xx
|
||||
let aexx = mkApiExx $ ("API",aet) : aeos
|
||||
-- putStrLn $ prApiExx aexx
|
||||
return aexx
|
||||
|
||||
readApiExxOne verbose file = do
|
||||
s <- readFile file
|
||||
let lang = reverse (take 3 (drop 4 (reverse file))) -- api-exx-*Eng*.txt
|
||||
let api = getApiExxOne $ filter validOutput $ mergeOutput $ lines s
|
||||
when verbose $ putStrLn $ unlines $ prApiEx api ---
|
||||
return (lang,api)
|
||||
|
||||
-- map function -> language -> example
|
||||
type ApiExx = M.Map String (M.Map String String)
|
||||
|
||||
-- map function -> example
|
||||
type ApiExxOne = M.Map String String
|
||||
|
||||
-- get a map function -> example
|
||||
getApiExxOne :: [String] -> ApiExxOne
|
||||
getApiExxOne = M.fromList . pairs . map cleanUp
|
||||
where
|
||||
pairs ss = case ss of
|
||||
f:_:e:rest -> (f,e) : pairs (drop 1 (dropWhile (notElem '*') rest))
|
||||
_ -> []
|
||||
|
||||
-- get the map function -> tree
|
||||
getApiExxTrees :: [String] -> ApiExxOne
|
||||
getApiExxTrees = M.fromList . pairs . map cleanUp
|
||||
where
|
||||
pairs ss = case ss of
|
||||
f:e:_:rest -> (f,e) : pairs (drop 1 (dropWhile (notElem '*') rest))
|
||||
_ -> []
|
||||
|
||||
-- remove leading prompts and spaces
|
||||
cleanUp = dropWhile (flip elem " >")
|
||||
|
||||
--- this makes txt2tags loop...
|
||||
mergeOutput ls = ls
|
||||
mergeOutputt ls = case ls of
|
||||
l@('>':_):ll -> let (ll1,ll2) = span ((/=">") . take 1) ll in unwords (l : map (unwords . words) ll1) : mergeOutput ll2
|
||||
_:ll -> mergeOutput ll
|
||||
_ -> []
|
||||
|
||||
-- only accept lines starting with prompts (to eliminate multi-line gf uncomputed output)
|
||||
validOutput = (==">") . take 1
|
||||
|
||||
mkApiExx :: [(String,ApiExxOne)] -> ApiExx
|
||||
mkApiExx ltes =
|
||||
M.fromList [(t,
|
||||
M.fromList [(l,maybe "NONE" id (M.lookup t te)) | (l,te) <- ltes])
|
||||
| t <- M.keys firstL]
|
||||
where
|
||||
firstL = snd (head ltes)
|
||||
|
||||
prApiExx :: ApiExx -> String
|
||||
prApiExx aexx = unlines
|
||||
[unlines (t:prApiEx lexx) | (t,lexx) <- M.toList aexx]
|
||||
|
||||
prApiEx :: M.Map String String -> [String]
|
||||
prApiEx apexx = case M.toList apexx of
|
||||
(a,e):lexx -> (a ++ ": ``" ++ unwords (words e) ++ "``"):
|
||||
[l ++ ": //" ++ mkEx l e ++ "//" | (l,e) <- lexx]
|
||||
|
||||
mkEx l = unws . bind . mkE . words where
|
||||
unws = if elem l ["Chi","Jpn","Tha"] then concat else unwords -- remove spaces
|
||||
mkE e = case e of
|
||||
"atomic":"term":_ -> ["*"]
|
||||
"[]":_ -> ["''"]
|
||||
"(table":es -> ["..."]
|
||||
"table":es -> ["..."]
|
||||
('{':_):es -> ["..."]
|
||||
"pre":p@('{':_):es -> init (init (drop 2 p)) : ["..."]
|
||||
--- "pre":p@('{':_):es -> init (init (drop 2 p)) : reverse (takeWhile ((/='}') . head) (reverse es))
|
||||
e0:es -> e0:mkE es
|
||||
_ -> e
|
||||
|
||||
bind ws = case ws of
|
||||
w : "&+" : u : ws2 -> bind ((w ++ u) : ws2)
|
||||
w : "Predef.BIND" : u : ws2 -> bind ((w ++ u) : ws2)
|
||||
w : "Predef.SOFT_BIND" : u : ws2 -> bind ((w ++ u) : ws2)
|
||||
"&+":ws2 -> bind ws2
|
||||
"Predef.BIND":ws2 -> bind ws2
|
||||
"Predef.SOFT_BIND":ws2 -> bind ws2
|
||||
w : "++" : ws2 -> w : bind ws2
|
||||
w : ws2 -> w : bind ws2
|
||||
_ -> ws
|
||||
341
doc/synopsis/MkSynopsis.hs
Normal file
341
doc/synopsis/MkSynopsis.hs
Normal file
@@ -0,0 +1,341 @@
|
||||
import MkExxTable
|
||||
import System.Process(system)
|
||||
import System.Environment(getArgs)
|
||||
import System.FilePath((</>),(<.>))
|
||||
import Data.Char
|
||||
import Data.List
|
||||
import qualified Data.Map as M
|
||||
import Text.Printf
|
||||
import Config (loadLangsFrom, LangInfo (..))
|
||||
import qualified Config
|
||||
|
||||
type Cats = [(String,String,String)]
|
||||
type Rules = [(String,String,String)]
|
||||
|
||||
-- the file generated
|
||||
outfile :: FilePath
|
||||
outfile = "index.txt"
|
||||
|
||||
configFile = ".." </> ".." </> Config.configFile
|
||||
|
||||
-- the language in which revealed examples are shown
|
||||
revealedLang :: String
|
||||
revealedLang = "Eng"
|
||||
|
||||
-- all languages shown (a copy of this list appears in Makefile)
|
||||
apiExxFiles :: IO [FilePath]
|
||||
apiExxFiles = do
|
||||
langs <- loadLangsFrom configFile
|
||||
return $
|
||||
[ "api-examples-" ++ (langCode lang) ++ ".txt"
|
||||
| lang <- langs
|
||||
, langSynopsis lang
|
||||
]
|
||||
|
||||
-- | This function puts together a txt2tags file which is then converted to HTML by the Makefile
|
||||
main :: IO ()
|
||||
main = do
|
||||
cs1 <- getCats commonAPI
|
||||
cs2 <- getCats catAPI
|
||||
let cs = sortCats (cs1 ++ cs2)
|
||||
writeFile outfile "GF Resource Grammar Library: Synopsis"
|
||||
space
|
||||
append "%!Encoding:utf-8"
|
||||
append "%!style(html): ./revealpopup.css"
|
||||
space
|
||||
append "%!postproc(html): '#divreveal' '<div class=reveal>'"
|
||||
append "%!postproc(html): '#divpopup' '<div class=popup>'"
|
||||
append "%!postproc(html): '#ediv' '</div>'"
|
||||
append "%!postproc(html): '#UL' '<ul>'"
|
||||
append "%!postproc(html): '#EUL' '</ul>'"
|
||||
append "%!postproc(html): '#LI' '<li>'"
|
||||
append "%!postproc(html): '(SRC=\"categories.png\")' '\\1 USEMAP=\"#categories\"'"
|
||||
append "%!postproc(html): '#LParadigms' '<a name=\"RParadigms\"></a>'"
|
||||
append "%!postproc(tex): '#LParadigms' ''"
|
||||
delimit $ addToolTips cs
|
||||
include "intro.txt" -- TODO dynamic language list
|
||||
title "Categories"
|
||||
space
|
||||
link "Source 1:" commonAPI
|
||||
space
|
||||
link "Source 2:" catAPI
|
||||
space
|
||||
append "==A hierarchic view==\n"
|
||||
include "categories-intro.txt"
|
||||
append "==Explanations==\n"
|
||||
delimit $ mkCatTable cs
|
||||
space
|
||||
title "Syntax Rules and Structural Words"
|
||||
space
|
||||
link "Source 1:" syntaxAPI
|
||||
space
|
||||
link "Source 2:" structuralAPI
|
||||
space
|
||||
apiExx <- apiExxFiles >>= getApiExx
|
||||
rs <- getRules apiExx syntaxAPI
|
||||
--- putStrLn $ unlines ["p -cat=" ++ last (words t) ++
|
||||
--- " \"" ++ e ++ "\"" | (_,t,e) <- rs, not (null e)] ----
|
||||
rs2 <- getRules apiExx structuralAPI
|
||||
let rss = rs ++ rs2
|
||||
--- mapM_ putStrLn [f ++ " " ++ e | (f,_,e) <- rss]
|
||||
delimit $ mkSplitTables True apiExx cs rss
|
||||
space
|
||||
-- title "Structural Words"
|
||||
-- space
|
||||
-- link "Source:" structuralAPI
|
||||
-- space
|
||||
-- rs <- rulesTable False cs structuralAPI
|
||||
-- delimit rs
|
||||
space
|
||||
title "Lexical Paradigms"
|
||||
paradigmFiles >>= mapM_ (putParadigms cs)
|
||||
space
|
||||
include "additional.txt"
|
||||
space
|
||||
include "browse.txt"
|
||||
space
|
||||
title "An Example of Usage"
|
||||
space
|
||||
include "example.txt"
|
||||
space
|
||||
title "Table of Contents"
|
||||
space
|
||||
append "%%toc"
|
||||
space
|
||||
|
||||
addToolTips :: Cats -> [String]
|
||||
addToolTips = map f
|
||||
where f (n,e,_) = "%!postproc(html): '(?i)(HREF=\"#" ++ n ++ "\")( TITLE=\"[^\"]*\")?' '\\1 TITLE=\"" ++ e' ++ "\"'"
|
||||
where e' = n ++ if null e then "" else " - " ++ e
|
||||
|
||||
getCats :: FilePath -> IO Cats
|
||||
getCats file = do
|
||||
ss <- readFile file >>= return . lines
|
||||
return $ getrs [] ss
|
||||
where
|
||||
getrs rs ss = case ss of
|
||||
('-':'-':'.':_):_ -> reverse rs
|
||||
[] -> reverse rs
|
||||
('-':'-':_):ss2 -> getrs rs ss2
|
||||
s:ss2 -> case words s of
|
||||
cat:";":"--":exp -> getrs ((cat,unwords expl, unwords (tail ex)):rs) ss2 where
|
||||
(expl,ex) = span (/="e.g.") exp
|
||||
_ -> getrs rs ss2
|
||||
|
||||
rulesTable :: ApiExx -> Bool -> Cats -> FilePath -> IO [String]
|
||||
rulesTable aexx hasEx cs file = do
|
||||
rs <- getRules aexx file
|
||||
return $ mkTable hasEx aexx cs rs
|
||||
|
||||
|
||||
getRules :: ApiExx -> FilePath -> IO Rules
|
||||
getRules aexx file = do
|
||||
ss <- readFileC (coding file) file >>= return . filter (not . hiddenLine) . lines
|
||||
return $ getrs [] ss
|
||||
where
|
||||
getrs rs ss = case ss of
|
||||
('-':'-':'.':_):_ -> reverse rs
|
||||
[] -> reverse rs
|
||||
('-':'-':_):ss2 -> getrs rs ss2
|
||||
s:ss2 -> case words s of
|
||||
_:_:"overload":_ -> getrs rs ss2
|
||||
_:":":_ -> getrs (rule s:rs) ss2
|
||||
_ -> getrs rs ss2
|
||||
rule s = (name, typ, ex)
|
||||
where
|
||||
ws = takeWhile (flip notElem ["--#", "--:", "="]) $ words s
|
||||
name = head ws
|
||||
(t,e) = span (/="--") (tail ws)
|
||||
typ = unwords $ filtype (drop 1 t)
|
||||
filtype = filter (/=";")
|
||||
ex = if null e then "" else unwords $ unnumber $ drop 1 e
|
||||
unnumber e = case e of
|
||||
n:ws | last n == '.' && not (null (init n)) && all isDigit (init n) -> ws
|
||||
_ -> e
|
||||
|
||||
putParadigms :: Cats -> (String, FilePath) -> IO ()
|
||||
putParadigms cs (lang,file) = do
|
||||
stitle ("Paradigms for " ++ lang)
|
||||
append "#LParadigms"
|
||||
space
|
||||
link "source" file
|
||||
space
|
||||
rs <- rulesTable M.empty False cs file
|
||||
space
|
||||
delimit rs
|
||||
space
|
||||
|
||||
inChunks :: Int -> ([a] -> [String]) -> [a] -> [String]
|
||||
inChunks i f = concat . intersperse ["\n\n"] . map f . chunks i where
|
||||
chunks _ [] = []
|
||||
chunks i xs = x : chunks i y where (x,y) = splitAt i xs
|
||||
|
||||
-- Makes one table per result category.
|
||||
-- Adds a subsection header for each table.
|
||||
mkSplitTables :: Bool -> ApiExx -> Cats -> Rules -> [String]
|
||||
mkSplitTables hasEx aexx cs = concatMap t . addLexicalCats cs . sortRules
|
||||
where t (c, xs) = [subtitle c expl] ++ tableOrLink
|
||||
where
|
||||
expl = case [e | (n,e,_) <- cs, n == c] of
|
||||
[] -> ""
|
||||
e:_ -> e
|
||||
tableOrLink = if null xs then parad else mkTable hasEx aexx cs xs
|
||||
parad = [
|
||||
"Lexical category, constructors given in",
|
||||
"[lexical paradigms #RParadigms]."
|
||||
]
|
||||
|
||||
mkTable :: Bool -> ApiExx -> Cats -> Rules -> [String]
|
||||
mkTable hasEx aexx cs = inChunks chsize (\rs -> header : map (unwords . row) rs)
|
||||
where
|
||||
chsize = 1000
|
||||
header = if hasEx then "|| Function | Type | Example ||"
|
||||
else "|| Function | Type | Explanation ||"
|
||||
row (name,typ,ex) =
|
||||
let ntyp = mkIdent (name ++ " : " ++ typ) in
|
||||
if hasEx then ["|", name', "|", typ', "|", ex' ntyp, "|"]
|
||||
else ["|", name', "|", typ', "|", expl ntyp, "|"]
|
||||
where
|
||||
name' = ttf name
|
||||
typ' = showTyp cs typ
|
||||
ex' typ = let ex0 = if null ex then itf (takeWhile (/='_') name) else ex in
|
||||
case M.lookup typ aexx of
|
||||
Just es -> mkExample es ex0
|
||||
_ -> itf ex0
|
||||
expl typ = if null ex then itf "-" else itf ex
|
||||
|
||||
-- make an example with hover-popup translations
|
||||
mkExample es ex = unwords [
|
||||
"#divreveal",
|
||||
itf (maybe ex (mkEx revealedLang) (M.lookup revealedLang es)),
|
||||
"#divpopup",
|
||||
"#UL",
|
||||
unwords ["#LI" ++ e | e <- prApiEx es],
|
||||
"#EUL",
|
||||
"#ediv",
|
||||
"#ediv"
|
||||
]
|
||||
|
||||
-- makes mkUtt : QS -> Utt to mkUtt-QS-Utt
|
||||
mkIdent :: String -> String
|
||||
mkIdent = concatMap unspec where
|
||||
unspec c = case c of
|
||||
' ' -> ""
|
||||
'>' -> ""
|
||||
'(' -> ""
|
||||
')' -> ""
|
||||
':' -> "-"
|
||||
_ -> [c]
|
||||
|
||||
mkCatTable :: Cats -> [String]
|
||||
mkCatTable cs = inChunks chsize (\rs -> header ++ map mk1 rs) cs
|
||||
where
|
||||
header = ["|| Category | Explanation | Example ||"]
|
||||
chsize = 1000
|
||||
mk1 (name,expl,ex) = unwords ["|", showCat cs name, "|", expl, "|", typo ex, "|"]
|
||||
typo ex = if take 1 ex == "\"" then itf (init (tail ex)) else ex
|
||||
|
||||
srcPath = ((</>) "../../src")
|
||||
|
||||
commonAPI = srcPath "abstract/Common.gf"
|
||||
catAPI = srcPath "abstract/Cat.gf"
|
||||
syntaxAPI = srcPath "api/Constructors.gf"
|
||||
structuralAPI = srcPath "abstract/Structural.gf"
|
||||
|
||||
paradigmFiles :: IO [(String,FilePath)]
|
||||
paradigmFiles = do
|
||||
langs <- loadLangsFrom configFile
|
||||
return $
|
||||
[ (name, srcPath $ printf "%s/Paradigms%s.gf" (langDir lang) (langCode lang))
|
||||
| lang <- langs
|
||||
, langSynopsis lang
|
||||
, let name = formatName (langDir lang)
|
||||
]
|
||||
|
||||
-- | Format language name from directory name
|
||||
-- "ancient_greek -> Ancient Greek"
|
||||
formatName :: String -> String
|
||||
formatName = unwords . map (\(s:ss) -> toUpper s : ss) . splitOn (=='_')
|
||||
|
||||
-- | Split a string at given character, similar to words
|
||||
splitOn :: (Char -> Bool) -> String -> [String]
|
||||
splitOn _ "" = []
|
||||
splitOn f s = takeWhile (not.f) s : splitOn f rest
|
||||
where
|
||||
rest = case dropWhile (not.f) s of
|
||||
"" -> []
|
||||
_:xs -> xs
|
||||
|
||||
append s = appendFile outfile ('\n':s)
|
||||
title s = append $ "=" ++ s ++ "="
|
||||
stitle s = append $ "==" ++ s ++ "=="
|
||||
include s = append $ "%!include: " ++ s
|
||||
space = append "\n"
|
||||
delimit ss = mapM_ append ss
|
||||
link s f = append $ s ++ " [``" ++ f ++ "`` " ++ fa ++ "]" where
|
||||
fa = "http://www.grammaticalframework.org/lib" ++ dropWhile (=='.') f
|
||||
|
||||
ttf s = "``" ++ s ++ "``"
|
||||
itf s = "//" ++ s ++ "//"
|
||||
|
||||
hiddenLine s = case reverse (words s) of
|
||||
"--%":_ -> True
|
||||
_ -> False
|
||||
|
||||
-----------------
|
||||
|
||||
-- sort category synopsis by category, retain one table
|
||||
sortCats :: Cats -> Cats
|
||||
sortCats = sortBy compareCat
|
||||
where compareCat (n1,_,_) (n2,_,_) = compare n1 n2
|
||||
|
||||
-- sort function synopsis by category, into separate tables
|
||||
sortRules :: Rules -> [Rules]
|
||||
sortRules = groupBy sameCat . sortBy compareRules
|
||||
where sameCat r1 r2 = resultCat r1 == resultCat r2
|
||||
compareRules r1@(n1,_,_) r2@(n2,_,_)
|
||||
= compare (resultCat r1,n1) (resultCat r2,n2)
|
||||
|
||||
addLexicalCats :: Cats -> [Rules] -> [(String,Rules)]
|
||||
addLexicalCats cs rss =
|
||||
map head $ groupBy fstEq $ sortBy (\x y -> compare (fst x) (fst y)) $
|
||||
[ (resultCat r, rs) | rs@(r:_) <- rss] ++ [(n,[]) | (n,_,_) <- cs]
|
||||
where fstEq p1 p2 = fst p1 == fst p2
|
||||
|
||||
resultCat :: (String,String,String) -> String
|
||||
resultCat (_,t,_) = last (words t)
|
||||
|
||||
|
||||
subtitle cat expl = "==" ++ cat ++ e ++ "==" ++ "[" ++ cat ++ "]"
|
||||
where e = if null expl then "" else " - " ++ expl
|
||||
|
||||
showCat :: Cats -> String -> String
|
||||
showCat cs cat = "[" ++ cat ++ " #" ++ cat ++ "]"
|
||||
|
||||
showTyp :: Cats -> String -> String
|
||||
showTyp cs = unwords . map f . words
|
||||
where f s | head s == '(' && last s == ')' && isCat c
|
||||
= "(" ++ showCat cs c ++ ")"
|
||||
| isCat s = showCat cs s
|
||||
| otherwise = ttf s
|
||||
where c = init (tail s)
|
||||
isCat cat = cat `notElem` ["Str","Int"]
|
||||
&& all (\c -> isAlphaNum c || c == '\'') cat
|
||||
&& isUpper (head cat)
|
||||
|
||||
-- to work around GHC 6.12 file input
|
||||
readFileC cod file = do
|
||||
let tmp = file <.> "tmp"
|
||||
case cod of
|
||||
"utf8" -> readFile file
|
||||
_ -> do
|
||||
system $ "iconv -f " ++ cod ++ " -t UTF-8 " ++ file ++ " >" ++ tmp
|
||||
readFile tmp
|
||||
|
||||
-- 'intelligently' determine the coding of a file
|
||||
---- AR 5/6/2016: now utf8 is used for all languages except Bul, where no characters are shown in documentation anyway
|
||||
coding file = case language file of
|
||||
"Bul" -> "CP1251" --- "ISO-8859-1"
|
||||
_ -> "utf8"
|
||||
|
||||
language = reverse . take 3 . drop 3 . reverse
|
||||
115
doc/synopsis/additional.txt
Normal file
115
doc/synopsis/additional.txt
Normal file
@@ -0,0 +1,115 @@
|
||||
|
||||
|
||||
|
||||
|
||||
=Additional Libraries=
|
||||
|
||||
|
||||
==The Prelude module==
|
||||
|
||||
The ``Prelude`` defines commonly used utility functions, in particular for
|
||||
strings and booleans.
|
||||
|
||||
|| Oper | Type | Explanation ||
|
||||
| ``SS`` | ``Type`` | the type ``{s : Str}``
|
||||
| ``ss`` | ``Str -> SS`` | record from string
|
||||
| ``nonExist`` | ``Str`` | missing form
|
||||
| ``optStr`` | ``Str -> Str`` | optional string
|
||||
| ``bothWays`` | ``(x,y : Str) -> Str`` | either ``x ++ y`` or ``y ++ x``
|
||||
| ``Bool`` | ``PType`` | values ``True`` and ``False``
|
||||
| ``andB`` | ``(_,_ : Bool) -> Bool`` | conjunction
|
||||
| ``orB`` | ``(_,_ : Bool) -> Bool`` | disjunction
|
||||
| ``notB`` | ``Bool -> Bool`` | negation
|
||||
| ``if_then_else`` | ``(A:Type)->Bool->A->A->A`` | conditional
|
||||
| ``init`` | ``Str -> Str`` | drop last character
|
||||
| ``last`` | ``Str -> Str`` | return last character
|
||||
| ``glue`` | ``Str -> Str -> Str`` | glue tokens together
|
||||
|
||||
|
||||
==The Predefined module==
|
||||
|
||||
These functions are hard-coded in GF. They are available without explicit opening, by the used of qualified names, e.g. ``Predef.tk``.
|
||||
|
||||
|| operation | type | explanation ||
|
||||
| ``PBool`` | ``PType`` | ``PTrue | PFalse``
|
||||
| ``Error`` | ``Type`` | the empty type
|
||||
| ``Integer`` | ``Type`` | the type of integers
|
||||
| ``Ints`` | ``Integer -> Type`` | integers from 0 to n
|
||||
| ``error`` | ``Str -> Error`` | forms error message
|
||||
| ``length`` | ``Str -> Int`` | length of string
|
||||
| ``drop`` | ``Integer -> Str -> Str`` | drop prefix of length
|
||||
| ``take`` | ``Integer -> Str -> Str`` | take prefix of length
|
||||
| ``tk`` | ``Integer -> Str -> Str`` | drop suffix of length
|
||||
| ``dp`` | ``Integer -> Str -> Str`` | take suffix of length
|
||||
| ``eqInt`` | ``Integer -> Integer -> PBool`` | test if equal integers
|
||||
| ``lessInt`` | ``Integer -> Integer -> PBool`` | test order of integers
|
||||
| ``plus`` | ``Integer -> Integer -> Integer`` | add integers
|
||||
| ``eqStr`` | ``Str -> Str -> PBool`` | test if equal strings
|
||||
| ``occur`` | ``Str -> Str -> PBool`` | test if occurs as substring
|
||||
| ``occurs`` | ``Str -> Str -> PBool`` | test if any char occurs
|
||||
| ``show`` | ``(P : Type) -> P -> Str`` | convert param to string
|
||||
| ``toStr`` | ``(L : Type) -> L -> Str`` | find the "first" string
|
||||
|
||||
|
||||
|
||||
==The Formal module==
|
||||
|
||||
This module is used for defining formal languages, in particular ones that
|
||||
use precedence levels and parentheses for grouping subexpressions.
|
||||
|
||||
|| Oper | Type | Explanation ||
|
||||
| ``Prec`` | ``PType`` | precedence levels 0..4
|
||||
| ``TermPrec`` | ``Type`` | string with precedence
|
||||
| ``mkPrec`` | ``Prec -> Str -> TermPrec`` | construct a ``TermPrec``
|
||||
| ``top`` | ``TermPrec -> Str`` | top term (lowest prec.)
|
||||
| ``constant`` | ``Str -> TermPrec`` | atomic (highest prec.)
|
||||
| ``infixl`` | ``Prec->Str->(_,_:TermPrec)->TermPrec`` | left-assoc. infix
|
||||
| ``infixr`` | ``Prec->Str->(_,_:TermPrec)->TermPrec`` | right-assoc. infix
|
||||
| ``infixn`` | ``Prec->Str->(_,_:TermPrec)->TermPrec`` | non-assoc. infix
|
||||
| ``usePrec`` | ``Prec -> TermPrec -> Str`` | use term on given level
|
||||
|
||||
|
||||
==The Symbolic module==
|
||||
|
||||
This module is used for embedding symbolic notation in natural-language
|
||||
text constructed by the resource grammar API. It works for all resource
|
||||
languages.
|
||||
|
||||
|| Function | Type | Example ||
|
||||
| ``symb`` | ``Str -> NP`` | //x//
|
||||
| ``symb`` | ``Int -> NP`` | //23//
|
||||
| ``symb`` | ``Float -> NP`` | //0.99//
|
||||
| ``symb`` | ``CN -> Numeral -> NP`` | //level four//
|
||||
| ``symb`` | ``Det -> N+ -> Numeral -> NP`` | //the level four//
|
||||
| ``symb`` | ``Det -> CN -> [Symb] -> NP`` | //the levels i, j and k//
|
||||
| ``symb`` | ``Symb -> S`` | //A// (formula)
|
||||
| ``symb`` | ``Symb -> Card`` | //n// (number)
|
||||
| ``mkSymb`` | ``Str -> Symb`` | //x//
|
||||
|
||||
|
||||
==The Combinators module==
|
||||
|
||||
This module gives shortcuts for defining predicates (``pred``) and function
|
||||
expressions (``app``). It works for all resource languages.
|
||||
|
||||
|| Function | Type | Example ||
|
||||
| ``pred`` | ``V -> NP -> Cl`` | //x converges//
|
||||
| ``pred`` | ``V2 -> NP -> NP -> Cl`` | //x intersects y//
|
||||
| ``pred`` | ``V -> NP -> NP -> Cl`` | //x and y intersect//
|
||||
| ``pred`` | ``A -> NP -> Cl`` | //x is even//
|
||||
| ``pred`` | ``A2 -> NP -> NP -> Cl`` | //x is divisible by y//
|
||||
| ``pred`` | ``A -> NP -> NP -> Cl`` | //x and y are equal//
|
||||
| ``pred`` | ``N -> NP -> Cl`` | //x is a maximum//
|
||||
| ``pred`` | ``N -> NP -> NP -> Cl`` | //x and y are inverses//
|
||||
| ``pred`` | ``Adv -> NP -> Cl`` | //x is in scope//
|
||||
| ``pred`` | ``Prep -> NP -> NP -> Cl`` | //x is outside y//
|
||||
| ``app`` | ``N -> NP`` | //the bottom//
|
||||
| ``app`` | ``N2 -> NP -> NP`` | //the successor of x//
|
||||
| ``app`` | ``N3 -> NP -> NP -> NP`` | //the distance from x to y//
|
||||
| ``app`` | ``N2 -> NP -> NP -> NP`` | //the sum of x and y//
|
||||
| ``app`` | ``N2 -> N -> CN`` | //set of integers//
|
||||
| ``app`` | ``N2 -> NP -> CN`` | //divisor of x//
|
||||
| ``app`` | ``N3 -> NP -> NP -> CN`` | //path from x to y//
|
||||
| ``app`` | ``N2 -> NP -> NP -> CN`` | //path between x and y//
|
||||
|
||||
|
||||
905
doc/synopsis/api-examples.txt
Normal file
905
doc/synopsis/api-examples.txt
Normal file
@@ -0,0 +1,905 @@
|
||||
mkText : Phr -> (Punct) -> (Text) -> Text -- Does she sleep? Yes.
|
||||
mkText (mkPhr (mkQS (mkCl she_NP sleep_V))) questMarkPunct (mkText (mkPhr yes_Utt) fullStopPunct)
|
||||
mkText : Utt -> Text -- Yes.
|
||||
mkText yes_Utt
|
||||
mkText : S -> Text -- She slept.
|
||||
mkText (mkS pastTense (mkCl she_NP sleep_V))
|
||||
mkText : Cl -> Text -- She sleeps.
|
||||
mkText (mkCl she_NP sleep_V)
|
||||
mkText : QS -> Text -- Did she sleep?
|
||||
mkText (mkQS pastTense (mkQCl (mkCl she_NP sleep_V)))
|
||||
mkText : (Pol) -> Imp -> Text -- Don't sleep!
|
||||
mkText negativePol (mkImp sleep_V)
|
||||
mkText : Text -> Text -> Text -- Where? Here. When? Now!
|
||||
mkText (mkText (mkPhr (mkUtt where_IAdv)) questMarkPunct (mkText (mkPhr (mkUtt here_Adv)))) (mkText (mkPhr (mkUtt when_IAdv)) questMarkPunct (mkText (mkPhr (mkUtt now_Adv)) exclMarkPunct))
|
||||
-- emptyText : Text -- (empty text)
|
||||
--emptyText)
|
||||
fullStopPunct : Punct -- .
|
||||
mkText (mkPhr yes_Utt) fullStopPunct
|
||||
questMarkPunct : Punct -- ?
|
||||
mkText (mkPhr yes_Utt) questMarkPunct
|
||||
exclMarkPunct : Punct -- !
|
||||
mkText (mkPhr yes_Utt) exclMarkPunct
|
||||
mkPhr : (PConj) -> Utt -> (Voc) -> Phr -- but sleep, my friend
|
||||
mkPhr but_PConj (mkUtt (mkImp sleep_V)) (mkVoc (mkNP i_Pron friend_N))
|
||||
mkPhr : S -> Phr -- she won't sleep
|
||||
mkPhr (mkS futureTense negativePol (mkCl she_NP sleep_V))
|
||||
mkPhr : Cl -> Phr -- she sleeps
|
||||
mkPhr (mkCl she_NP sleep_V)
|
||||
mkPhr : QS -> Phr -- would she sleep
|
||||
mkPhr (mkQS conditionalTense (mkQCl (mkCl she_NP sleep_V)))
|
||||
mkPhr : Imp -> Phr -- sleep
|
||||
mkPhr (mkImp sleep_V)
|
||||
mkPConj : Conj -> PConj -- and
|
||||
mkPhr (mkPConj and_Conj) (mkUtt now_Adv)
|
||||
mkVoc : NP -> Voc -- my friend
|
||||
mkPhr yes_Utt (mkVoc (mkNP i_Pron friend_N))
|
||||
mkUtt : S -> Utt -- she slept
|
||||
mkUtt (mkS pastTense (mkCl she_NP sleep_V))
|
||||
mkUtt : Cl -> Utt -- she sleeps
|
||||
mkUtt (mkCl she_NP sleep_V)
|
||||
mkUtt : QS -> Utt -- who didn't sleep
|
||||
mkUtt (mkQS pastTense negativePol (mkQCl who_IP sleep_V))
|
||||
mkUtt : QCl -> Utt -- who sleeps
|
||||
mkUtt (mkQCl who_IP sleep_V)
|
||||
mkUtt : (ImpForm) -> (Pol) -> Imp -> Utt -- don't be men
|
||||
mkUtt pluralImpForm negativePol (mkImp (mkVP man_N))
|
||||
mkUtt : IP -> Utt -- who
|
||||
mkUtt who_IP
|
||||
mkUtt : IAdv -> Utt -- why
|
||||
mkUtt why_IAdv
|
||||
mkUtt : NP -> Utt -- this man
|
||||
mkUtt (mkNP this_Det man_N)
|
||||
mkUtt : Adv -> Utt -- here
|
||||
mkUtt here_Adv
|
||||
mkUtt : VP -> Utt -- to sleep
|
||||
mkUtt (mkVP sleep_V)
|
||||
mkUtt : CN -> Utt -- beer
|
||||
mkUtt (mkCN beer_N)
|
||||
mkUtt : AP -> Utt -- good
|
||||
mkUtt (mkAP good_A)
|
||||
mkUtt : Card -> Utt -- five
|
||||
mkUtt (mkCard (mkNumeral n5_Unit))
|
||||
lets_Utt : VP -> Utt -- let's sleep
|
||||
mkPhr (lets_Utt (mkVP sleep_V))
|
||||
positivePol : Pol -- she sleeps [default]
|
||||
mkUtt (mkS positivePol (mkCl she_NP sleep_V))
|
||||
negativePol : Pol -- she doesn't sleep
|
||||
mkUtt (mkS negativePol (mkCl she_NP sleep_V))
|
||||
simultaneousAnt : Ant -- she sleeps [default]
|
||||
mkUtt (mkS simultaneousAnt (mkCl she_NP sleep_V))
|
||||
anteriorAnt : Ant -- she has slept --# notpresent
|
||||
mkUtt (mkS anteriorAnt (mkCl she_NP sleep_V))
|
||||
presentTense : Tense -- she sleeps [default]
|
||||
mkUtt (mkS presentTense (mkCl she_NP sleep_V))
|
||||
pastTense : Tense -- she slept --# notpresent
|
||||
mkUtt (mkS pastTense (mkCl she_NP sleep_V))
|
||||
futureTense : Tense -- she will sleep --# notpresent
|
||||
mkUtt (mkS futureTense (mkCl she_NP sleep_V))
|
||||
conditionalTense : Tense -- she would sleep --# notpresent
|
||||
mkUtt (mkS conditionalTense (mkCl she_NP sleep_V))
|
||||
singularImpForm : ImpForm -- be a man [default]
|
||||
mkUtt singularImpForm (mkImp (mkVP man_N))
|
||||
pluralImpForm : ImpForm -- be men
|
||||
mkUtt pluralImpForm (mkImp (mkVP man_N))
|
||||
politeImpForm : ImpForm -- be a man [polite singular]
|
||||
mkUtt politeImpForm (mkImp (mkVP man_N))
|
||||
mkS : (Tense) -> (Ant) -> (Pol) -> Cl -> S -- she wouldn't have slept
|
||||
mkUtt (mkS conditionalTense anteriorAnt negativePol (mkCl she_NP sleep_V))
|
||||
mkS : Conj -> S -> S -> S -- she sleeps and I run
|
||||
mkUtt (mkS and_Conj (mkS (mkCl she_NP sleep_V)) (mkS (mkCl i_NP run_V)))
|
||||
mkS : Conj -> ListS -> S -- she sleeps, I run and you walk
|
||||
mkUtt (mkS and_Conj (mkListS (mkS (mkCl she_NP sleep_V)) (mkListS (mkS (mkCl i_NP run_V)) (mkS (mkCl (mkNP youSg_Pron) walk_V)))))
|
||||
mkS : Adv -> S -> S -- today, she sleeps
|
||||
mkUtt (mkS today_Adv (mkS (mkCl she_NP sleep_V)))
|
||||
mkCl : NP -> V -> Cl -- she sleeps
|
||||
mkUtt (mkCl she_NP sleep_V)
|
||||
mkCl : NP -> V2 -> NP -> Cl -- she loves him
|
||||
mkUtt (mkCl she_NP love_V2 he_NP)
|
||||
mkCl : NP -> V3 -> NP -> NP -> Cl -- she sends it to him
|
||||
mkUtt (mkCl she_NP send_V3 it_NP he_NP)
|
||||
mkCl : NP -> VV -> VP -> Cl -- she wants to sleep
|
||||
mkUtt (mkCl she_NP want_VV (mkVP sleep_V))
|
||||
mkCl : NP -> VS -> S -> Cl -- she says that I sleep
|
||||
mkUtt (mkCl she_NP say_VS (mkS (mkCl i_NP sleep_V)))
|
||||
mkCl : NP -> VQ -> QS -> Cl -- she wonders who sleeps
|
||||
mkUtt (mkCl she_NP wonder_VQ (mkQS (mkQCl who_IP sleep_V)))
|
||||
mkCl : NP -> VA -> A -> Cl -- she becomes old
|
||||
mkUtt (mkCl she_NP become_VA old_A)
|
||||
mkCl : NP -> VA -> AP -> Cl -- she becomes very old
|
||||
mkUtt (mkCl she_NP become_VA (mkAP very_AdA old_A))
|
||||
mkCl : NP -> V2A -> NP -> A -> Cl -- she paints it red
|
||||
mkUtt (mkCl she_NP paint_V2A it_NP red_A)
|
||||
mkCl : NP -> V2A -> NP -> AP -> Cl -- she paints it very red
|
||||
mkUtt (mkCl she_NP paint_V2A it_NP (mkAP red_A))
|
||||
mkCl : NP -> V2S -> NP -> S -> Cl -- she answers to him that we sleep
|
||||
mkUtt (mkCl she_NP answer_V2S he_NP (mkS (mkCl we_NP sleep_V)))
|
||||
mkCl : NP -> V2Q -> NP -> QS -> Cl -- she asks him who sleeps
|
||||
mkUtt (mkCl she_NP ask_V2Q he_NP (mkQS (mkQCl who_IP sleep_V)))
|
||||
mkCl : NP -> V2V -> NP -> VP -> Cl -- she begs him to sleep
|
||||
mkUtt (mkCl she_NP beg_V2V he_NP (mkVP sleep_V))
|
||||
mkCl : NP -> A -> Cl -- she is old
|
||||
mkUtt (mkCl she_NP old_A)
|
||||
mkCl : NP -> A -> NP -> Cl -- she is older than he
|
||||
mkUtt (mkCl she_NP old_A he_NP)
|
||||
mkCl : NP -> A2 -> NP -> Cl -- she is married to him
|
||||
mkUtt (mkCl she_NP married_A2 he_NP)
|
||||
mkCl : NP -> AP -> Cl -- she is very old
|
||||
mkUtt (mkCl she_NP (mkAP very_AdA old_A))
|
||||
mkCl : NP -> NP -> Cl -- she is the woman
|
||||
mkUtt (mkCl she_NP (mkNP the_Det woman_N))
|
||||
mkCl : NP -> N -> Cl -- she is a woman
|
||||
mkUtt (mkCl she_NP woman_N)
|
||||
mkCl : NP -> CN -> Cl -- she is an old woman
|
||||
mkUtt (mkCl she_NP (mkCN old_A woman_N))
|
||||
mkCl : NP -> Adv -> Cl -- she is here
|
||||
mkUtt (mkCl she_NP here_Adv)
|
||||
mkCl : NP -> VP -> Cl -- she always sleeps
|
||||
mkUtt (mkCl she_NP (mkVP always_AdV (mkVP sleep_V)))
|
||||
mkCl : N -> Cl -- there is a house
|
||||
mkUtt (mkCl house_N)
|
||||
mkCl : CN -> Cl -- there is an old house
|
||||
mkUtt (mkCl (mkCN old_A house_N))
|
||||
mkCl : NP -> Cl -- there are many houses
|
||||
mkUtt (mkCl (mkNP many_Det house_N) )
|
||||
mkCl : NP -> RS -> Cl -- it is she who sleeps
|
||||
mkUtt (mkCl she_NP (mkRS (mkRCl which_RP (mkVP sleep_V))))
|
||||
mkCl : Adv -> S -> Cl -- it is here that she sleeps
|
||||
mkUtt (mkCl here_Adv (mkS (mkCl she_NP sleep_V)) )
|
||||
mkCl : V -> Cl -- it rains
|
||||
mkUtt (mkCl rain_V0 )
|
||||
mkCl : VP -> Cl -- it is raining
|
||||
mkUtt (mkCl (progressiveVP (mkVP rain_V0)))
|
||||
mkCl : SC -> VP -> Cl -- that she sleeps is good
|
||||
mkUtt (mkCl (mkSC (mkS (mkCl she_NP sleep_V))) (mkVP good_A))
|
||||
genericCl : VP -> Cl -- one sleeps
|
||||
mkUtt (mkS (genericCl (mkVP sleep_V)) )
|
||||
mkVP : V -> VP -- sleep
|
||||
mkUtt (mkVP sleep_V)
|
||||
mkVP : V2 -> NP -> VP -- love him
|
||||
mkUtt (mkVP love_V2 he_NP)
|
||||
mkVP : V3 -> NP -> NP -> VP -- send it to him
|
||||
mkUtt (mkVP send_V3 it_NP he_NP)
|
||||
mkVP : VV -> VP -> VP -- want to sleep
|
||||
mkUtt (mkVP want_VV (mkVP sleep_V))
|
||||
mkVP : VS -> S -> VP -- know that she sleeps
|
||||
mkUtt (mkVP know_VS (mkS (mkCl she_NP sleep_V)))
|
||||
mkVP : VQ -> QS -> VP -- wonder who sleeps
|
||||
mkUtt (mkVP wonder_VQ (mkQS (mkQCl who_IP sleep_V)))
|
||||
mkVP : VA -> AP -> VP -- become red
|
||||
mkUtt (mkVP become_VA (mkAP red_A))
|
||||
mkVP : V2A -> NP -> AP -> VP -- paint it red
|
||||
mkUtt (mkVP paint_V2A it_NP (mkAP red_A))
|
||||
mkVP : V2S -> NP -> S -> VP -- answer to him that we sleep
|
||||
mkUtt (mkVP answer_V2S he_NP (mkS (mkCl she_NP sleep_V)))
|
||||
mkVP : V2Q -> NP -> QS -> VP -- ask him who sleeps
|
||||
mkUtt (mkVP ask_V2Q he_NP (mkQS (mkQCl who_IP sleep_V)))
|
||||
mkVP : V2V -> NP -> VP -> VP -- beg him to sleep
|
||||
mkUtt (mkVP beg_V2V he_NP (mkVP sleep_V))
|
||||
mkVP : A -> VP -- be old
|
||||
mkUtt (mkVP old_A)
|
||||
mkVP : A -> NP -> VP -- be older than he
|
||||
mkUtt (mkVP old_A he_NP)
|
||||
mkVP : A2 -> NP -> VP -- be married to him
|
||||
mkUtt (mkVP married_A2 he_NP)
|
||||
mkVP : AP -> VP -- be very old
|
||||
mkUtt (mkVP (mkAP very_AdA old_A))
|
||||
mkVP : N -> VP -- be a woman
|
||||
mkUtt (mkVP woman_N)
|
||||
mkVP : CN -> VP -- be an old woman
|
||||
mkUtt (mkVP (mkCN old_A woman_N))
|
||||
mkVP : NP -> VP -- be the woman
|
||||
mkUtt (mkVP (mkNP the_Det woman_N))
|
||||
mkVP : Adv -> VP -- be here
|
||||
mkUtt (mkVP here_Adv)
|
||||
mkVP : VP -> Adv -> VP -- sleep here
|
||||
mkUtt (mkVP (mkVP sleep_V) here_Adv)
|
||||
mkVP : AdV -> VP -> VP -- always sleep
|
||||
mkUtt (mkVP always_AdV (mkVP sleep_V))
|
||||
mkVP : VPSlash -> NP -> VP -- paint it black
|
||||
mkUtt (mkVP (mkVPSlash paint_V2A (mkAP black_A)) it_NP)
|
||||
mkVP : VPSlash -> VP -- paint itself black
|
||||
mkUtt (mkVP (mkVPSlash paint_V2A (mkAP black_A)))
|
||||
mkVP : Comp -> VP -- be warm
|
||||
mkUtt (mkVP (mkComp (mkAP warm_A)))
|
||||
reflexiveVP : V2 -> VP -- love itself
|
||||
mkUtt (reflexiveVP love_V2)
|
||||
mkVP : VPSlash -> VP -- paint itself black
|
||||
mkUtt (reflexiveVP (mkVPSlash paint_V2A (mkAP black_A)))
|
||||
passiveVP : V2 -> VP -- be loved
|
||||
mkUtt (passiveVP love_V2)
|
||||
passiveVP : V2 -> NP -> VP -- be loved by her
|
||||
mkUtt (passiveVP love_V2 she_NP)
|
||||
progressiveVP : VP -> VP -- be sleeping
|
||||
mkUtt (progressiveVP (mkVP sleep_V))
|
||||
mkComp : AP -> Comp -- very old
|
||||
mkUtt (mkVP (mkComp (mkAP old_A)))
|
||||
mkComp : NP -> Comp -- this man
|
||||
mkUtt (mkVP (mkComp (mkNP this_Det man_N)))
|
||||
mkComp : Adv -> Comp -- here
|
||||
mkUtt (mkVP (mkComp here_Adv))
|
||||
mkSC : S -> SC -- that she sleeps
|
||||
mkSC (mkS (mkCl she_NP sleep_V))
|
||||
mkSC : QS -> SC -- who sleeps
|
||||
mkSC (mkQS (mkQCl who_IP sleep_V))
|
||||
mkSC : VP -> SC -- to sleep
|
||||
mkSC (mkVP sleep_V)
|
||||
mkImp : VP -> Imp -- come to my house
|
||||
mkUtt (mkImp (mkVP (mkVP come_V) (mkAdv to_Prep (mkNP i_Pron house_N))))
|
||||
mkImp : V -> Imp -- come
|
||||
mkUtt (mkImp come_V)
|
||||
mkImp : V2 -> NP -> Imp -- take it
|
||||
mkUtt (mkImp buy_V2 it_NP)
|
||||
mkNP : Quant -> N -> NP -- this man
|
||||
mkUtt (mkNP this_Quant man_N)
|
||||
mkNP : Quant -> CN -> NP -- this old man
|
||||
mkUtt (mkNP this_Quant (mkCN old_A man_N))
|
||||
mkNP : Quant -> Num -> CN -> NP -- these five old men
|
||||
mkUtt (mkNP this_Quant (mkNum (mkNumeral n5_Unit)) (mkCN old_A man_N))
|
||||
mkNP : Quant -> Num -> N -> NP -- these five men
|
||||
mkUtt (mkNP this_Quant (mkNum (mkNumeral n5_Unit)) man_N)
|
||||
mkNP : Det -> CN -> NP -- the first old man
|
||||
mkUtt (mkNP (mkDet the_Quant (mkNum (mkNumeral n5_Unit))) (mkCN old_A man_N))
|
||||
mkNP : Det -> N -> NP -- the first man
|
||||
mkUtt (mkNP (mkDet the_Quant (mkNum (mkNumeral n5_Unit))) man_N)
|
||||
mkNP : Numeral -> CN -> NP -- fifty old men
|
||||
mkUtt (mkNP (mkNumeral (n5_Unit)) (mkCN old_A man_N))
|
||||
mkNP : Numeral -> N -> NP -- fifty men
|
||||
mkUtt (mkNP (mkNumeral (n5_Unit)) man_N)
|
||||
mkNP : Digits -> CN -> NP -- 51 old men
|
||||
mkUtt (mkNP (mkDigits n5_Dig (mkDigits n1_Dig)) (mkCN old_A man_N))
|
||||
mkNP : Digits -> N -> NP -- 51 men
|
||||
mkUtt (mkNP (mkDigits n5_Dig (mkDigits n1_Dig)) man_N)
|
||||
-- mkNP : Card -> CN -> NP -- forty-five old men
|
||||
-- mkNP : Card -> N -> NP -- forty-five men
|
||||
mkNP : Pron -> CN -> NP -- my old man
|
||||
mkUtt (mkNP i_Pron (mkCN old_A man_N))
|
||||
mkNP : Pron -> N -> NP -- my man
|
||||
mkUtt (mkNP i_Pron man_N)
|
||||
mkNP : PN -> NP -- Paris
|
||||
mkUtt (mkNP paris_PN)
|
||||
mkNP : Pron -> NP -- we
|
||||
mkUtt (mkNP we_Pron)
|
||||
mkNP : Quant -> NP -- this
|
||||
mkUtt (mkNP this_Quant)
|
||||
mkNP : Quant -> Num -> NP -- these five
|
||||
mkUtt (mkNP this_Quant (mkNum (mkNumeral n5_Unit)))
|
||||
mkNP : Det -> NP -- the five best
|
||||
mkUtt (mkNP (mkDet the_Quant (mkNum (mkNumeral n5_Unit)) (mkOrd good_A)))
|
||||
mkNP : CN -> NP -- old beer
|
||||
mkUtt (mkNP (mkCN old_A beer_N))
|
||||
mkNP : N -> NP -- beer
|
||||
mkUtt (mkNP beer_N)
|
||||
mkNP : Predet -> NP -> NP -- only this woman
|
||||
mkUtt (mkNP only_Predet (mkNP this_Det woman_N))
|
||||
mkNP : NP -> V2 -> NP -- the man seen
|
||||
mkUtt (mkNP (mkNP the_Det man_N) see_V2)
|
||||
mkNP : NP -> Adv -> NP -- Paris today
|
||||
mkUtt (mkNP (mkNP paris_PN) today_Adv)
|
||||
mkNP : NP -> RS -> NP -- John, who walks
|
||||
mkUtt (mkNP (mkNP john_PN) (mkRS (mkRCl which_RP (mkVP walk_V))))
|
||||
mkNP : Conj -> NP -> NP -> NP
|
||||
mkUtt (mkNP or_Conj (mkNP this_Det woman_N) (mkNP john_PN))
|
||||
mkNP : Conj -> ListNP -> NP
|
||||
mkUtt (mkNP or_Conj (mkListNP (mkNP this_Det woman_N) (mkListNP (mkNP john_PN) i_NP)))
|
||||
i_NP : NP -- I
|
||||
mkUtt i_NP
|
||||
you_NP : NP -- you (singular)
|
||||
mkUtt you_NP
|
||||
youPol_NP : NP -- you (polite singular)
|
||||
mkUtt youPol_NP
|
||||
he_NP : NP -- he
|
||||
mkUtt he_NP
|
||||
she_NP : NP -- she
|
||||
mkUtt she_NP
|
||||
it_NP : NP -- it
|
||||
mkUtt it_NP
|
||||
we_NP : NP -- we
|
||||
mkUtt we_NP
|
||||
youPl_NP : NP -- you (plural)
|
||||
mkUtt youPl_NP
|
||||
they_NP : NP -- they
|
||||
mkUtt they_NP
|
||||
mkDet : Quant -> Det -- this
|
||||
mkUtt (mkNP (mkDet this_Quant))
|
||||
this_NP : NP
|
||||
mkUtt this_NP
|
||||
that_NP : NP
|
||||
mkUtt that_NP
|
||||
these_NP : NP
|
||||
mkUtt these_NP
|
||||
those_NP : NP
|
||||
mkUtt those_NP
|
||||
mkDet : Quant -> Card -> Det -- these five
|
||||
mkUtt (mkNP (mkDet this_Quant (mkCard (mkNumeral n5_Unit))))
|
||||
mkDet : Quant -> Ord -> Det -- the best
|
||||
mkUtt (mkNP (mkDet the_Quant (mkOrd (mkNumeral n5_Unit))))
|
||||
mkDet : Quant -> Num -> Ord -> Det -- these five best
|
||||
mkUtt (mkNP (mkDet the_Quant (mkNum (mkNumeral n5_Unit)) (mkOrd good_A)))
|
||||
mkDet : Quant -> Num -> Det -- these five
|
||||
mkUtt (mkNP (mkDet this_Quant pluralNum))
|
||||
mkDet : Card -> Det -- forty
|
||||
mkUtt (mkNP (mkDet (mkCard (mkNumeral n5_Unit))))
|
||||
-- mkDet : Digits -> Det -- 51
|
||||
-- mkDet : Numeral -> Det -- five
|
||||
mkUtt (mkNP (mkDet (mkNumeral n5_Unit)))
|
||||
mkDet : Pron -> Det -- my
|
||||
mkUtt (mkNP (mkDet i_Pron))
|
||||
mkDet : Pron -> Num -> Det -- my five
|
||||
mkUtt (mkNP (mkDet i_Pron (mkNum (mkNumeral n5_Unit))))
|
||||
the_Det : Det -- the (house)
|
||||
mkUtt (mkNP the_Det house_N)
|
||||
a_Det : Det -- a (house)
|
||||
mkUtt (mkNP a_Det house_N)
|
||||
theSg_Det : Det -- the (houses)
|
||||
mkUtt (mkNP theSg_Det house_N)
|
||||
thePl_Det : Det -- the (houses)
|
||||
mkUtt (mkNP thePl_Det house_N)
|
||||
aSg_Det : Det -- a (house)
|
||||
mkUtt (mkNP aSg_Det woman_N)
|
||||
aPl_Det : Det -- (houses)
|
||||
mkUtt (mkNP aPl_Det woman_N)
|
||||
this_Det : Det
|
||||
mkUtt (mkNP this_Det woman_N)
|
||||
that_Det : Det
|
||||
mkUtt (mkNP that_Det woman_N)
|
||||
these_Det : Det
|
||||
mkUtt (mkNP these_Det woman_N)
|
||||
those_Det : Det
|
||||
mkUtt (mkNP those_Det woman_N)
|
||||
mkQuant : Pron -> Quant -- my
|
||||
mkUtt (mkNP (mkQuant i_Pron) house_N)
|
||||
the_Quant : Quant -- the
|
||||
mkUtt (mkNP the_Quant house_N)
|
||||
a_Quant : Quant -- a
|
||||
mkUtt (mkNP a_Quant house_N)
|
||||
-- mkNum : Str -> Num -- thirty-five (given by "35")
|
||||
mkNum : Numeral -> Num -- twenty
|
||||
mkNum (mkNumeral (tenfoldSub100 n2_Unit))
|
||||
mkNum : Digits -> Num -- 21
|
||||
mkNum (mkDigits n2_Dig (mkDigits n1_Dig))
|
||||
-- mkNum : Digit -> Num -- five)
|
||||
mkNum : Card -> Num -- almost ten
|
||||
mkNum (mkCard almost_AdN (mkCard (mkNumeral n5_Unit)))
|
||||
mkNum : AdN -> Card -> Num -- almost ten
|
||||
mkNum (mkCard almost_AdN (mkCard (mkNumeral n5_Unit)))
|
||||
-- singularNum : Num -- singular )
|
||||
-- pluralNum : Num -- plural )
|
||||
-- mkCard : Str -> Card -- thirty-five (given as "35"))
|
||||
mkCard : Numeral -> Card -- twenty
|
||||
mkUtt (mkCard (mkNumeral n7_Unit))
|
||||
-- mkCard : Digits -> Card -- 51 )
|
||||
-- mkCard : AdN -> Card -> Card -- almost fifty)
|
||||
-- mkOrd : Numeral -> Ord -- twentieth )
|
||||
-- mkOrd : Digits -> Ord -- 51st )
|
||||
-- mkOrd : Digit -> Ord -- fifth )
|
||||
mkOrd : A -> Ord -- largest
|
||||
mkUtt (mkAP (mkOrd small_A))
|
||||
mkAdN : CAdv -> AdN -- more than
|
||||
mkUtt (mkCard (mkAdN more_CAdv) (mkCard (mkNumeral n8_Unit)))
|
||||
mkNumeral : Sub1000 -> Numeral -- coerce 1..999
|
||||
mkUtt (mkCard (mkNumeral (mkSub1000 n9_Unit (mkSub100 n9_Unit n9_Unit))))
|
||||
mkNumeral : Sub1000 -> Sub1000 -> Numeral -- 1000m + n
|
||||
mkUtt (mkCard (mkNumeral (mkSub1000 n9_Unit (mkSub100 n9_Unit n9_Unit)) (mkSub1000 n9_Unit (mkSub100 n9_Unit n9_Unit))))
|
||||
-- mkNumeral : Str -> Numeral -- thirty-five (given by "35") )
|
||||
thousandfoldNumeral : Sub1000 -> Numeral -- 1000n
|
||||
mkUtt (mkCard (thousandfoldNumeral (mkSub1000 n9_Unit (mkSub100 n9_Unit n9_Unit))))
|
||||
mkSub1000 : Sub100 -> Sub1000 -- coerce 1..99
|
||||
mkUtt (mkCard (mkNumeral (mkSub1000 (mkSub100 n9_Unit n9_Unit))))
|
||||
mkSub1000 : Unit -> Sub1000 -- 100n
|
||||
mkUtt (mkCard (mkNumeral (mkSub1000 n9_Unit)))
|
||||
mkSub1000 : Unit -> Sub100 -> Sub1000 -- 100m + n
|
||||
mkUtt (mkCard (mkNumeral (mkSub1000 n9_Unit (mkSub100 n9_Unit n9_Unit))))
|
||||
mkSub100 : Unit -> Sub100 -- eight (coerce 1..9)
|
||||
mkUtt (mkCard (mkNumeral (mkSub100 n8_Unit)))
|
||||
mkSub100 : Unit -> Unit -> Sub100 -- 10m + n
|
||||
mkUtt (mkCard (mkNumeral (mkSub100 n8_Unit n3_Unit)))
|
||||
tenfoldSub100 : Unit -> Sub100 -- 10n
|
||||
mkUtt (mkCard (mkNumeral (mkSub100 n8_Unit)))
|
||||
n1_Unit : Unit -- one
|
||||
mkUtt (mkCard (mkNumeral n1_Unit))
|
||||
n2_Unit : Unit -- two
|
||||
mkUtt (mkCard (mkNumeral n2_Unit))
|
||||
n3_Unit : Unit -- three
|
||||
mkUtt (mkCard (mkNumeral n3_Unit))
|
||||
n4_Unit : Unit -- four
|
||||
mkUtt (mkCard (mkNumeral n4_Unit))
|
||||
n5_Unit : Unit -- five
|
||||
mkUtt (mkCard (mkNumeral n5_Unit))
|
||||
n6_Unit : Unit -- six
|
||||
mkUtt (mkCard (mkNumeral n6_Unit))
|
||||
n7_Unit : Unit -- seven
|
||||
mkUtt (mkCard (mkNumeral n7_Unit))
|
||||
n8_Unit : Unit -- eight
|
||||
mkUtt (mkCard (mkNumeral n8_Unit))
|
||||
n9_Unit : Unit -- nine
|
||||
mkUtt (mkCard (mkNumeral n9_Unit))
|
||||
-- mkDigits : Str -> Digits -- 35 (from string "35"))
|
||||
mkDigits : Dig -> Digits -- 4
|
||||
mkUtt (mkCard (mkDigits n4_Dig))
|
||||
mkDigits : Dig -> Digits -> Digits -- 1,233,486
|
||||
mkUtt (mkCard (mkDigits n1_Dig (mkDigits n2_Dig (mkDigits n3_Dig (mkDigits n3_Dig (mkDigits n4_Dig (mkDigits n8_Dig (mkDigits n6_Dig))))))))
|
||||
-- n0_Dig : Dig -- 0 )
|
||||
-- n1_Dig : Dig -- 1 )
|
||||
-- n2_Dig : Dig -- 2 )
|
||||
-- n3_Dig : Dig -- 3 )
|
||||
-- n4_Dig : Dig -- 4 )
|
||||
-- n5_Dig : Dig -- 5 )
|
||||
-- n6_Dig : Dig -- 6 )
|
||||
-- n7_Dig : Dig -- 7 )
|
||||
-- n8_Dig : Dig -- 8 )
|
||||
-- n9_Dig : Dig -- 9 )
|
||||
mkCN : N -> CN -- house
|
||||
mkUtt (mkCN house_N )
|
||||
mkCN : N2 -> NP -> CN -- mother of the king
|
||||
mkUtt (mkCN mother_N2 (mkNP the_Det king_N))
|
||||
mkCN : N3 -> NP -> NP -> CN -- distance from this city to Paris
|
||||
mkUtt (mkCN distance_N3 (mkNP this_Det city_N) (mkNP paris_PN) )
|
||||
mkCN : N2 -> CN -- mother
|
||||
mkUtt (mkCN mother_N2)
|
||||
mkCN : N3 -> CN -- distance
|
||||
mkUtt (mkCN distance_N3)
|
||||
mkCN : A -> N -> CN -- big house
|
||||
mkUtt (mkCN big_A house_N )
|
||||
mkCN : A -> CN -> CN -- big blue house
|
||||
mkUtt (mkCN big_A (mkCN blue_A house_N))
|
||||
mkCN : AP -> N -> CN -- very big house
|
||||
mkUtt (mkCN (mkAP very_AdA big_A) house_N )
|
||||
mkCN : AP -> CN -> CN -- very big blue house
|
||||
mkUtt (mkCN (mkAP very_AdA big_A) (mkCN blue_A house_N) )
|
||||
mkCN : N -> RS -> CN -- man whom she loves
|
||||
mkUtt (mkCN man_N (mkRS (mkRCl which_RP she_NP love_V2)))
|
||||
mkCN : CN -> RS -> CN -- old man whom she loves
|
||||
mkUtt (mkCN (mkCN old_A man_N) (mkRS (mkRCl which_RP she_NP love_V2)) )
|
||||
mkCN : N -> Adv -> CN -- house on the hill
|
||||
mkUtt (mkCN house_N (mkAdv on_Prep (mkNP the_Det hill_N)))
|
||||
mkCN : CN -> Adv -> CN -- big house on the hill
|
||||
mkUtt (mkCN (mkCN big_A house_N) (mkAdv on_Prep (mkNP the_Det hill_N)))
|
||||
mkCN : CN -> S -> CN -- rule that she sleeps
|
||||
mkUtt (mkCN (mkCN rule_N) (mkS (mkCl she_NP sleep_V)))
|
||||
mkCN : CN -> QS -> CN -- question if she sleeps
|
||||
mkUtt (mkCN (mkCN question_N) (mkQS (mkQCl (mkCl she_NP sleep_V))))
|
||||
mkCN : CN -> VP -> CN -- reason to sleep
|
||||
mkUtt (mkCN (mkCN reason_N) (mkVP sleep_V))
|
||||
mkCN : CN -> SC -> CN -- reason to sleep
|
||||
mkUtt (mkCN (mkCN reason_N) (mkVP sleep_V))
|
||||
mkCN : N -> NP -> CN -- king John
|
||||
mkUtt (mkCN king_N (mkNP john_PN) )
|
||||
mkCN : CN -> NP -> CN -- old king John
|
||||
mkUtt (mkCN (mkCN old_A king_N) (mkNP john_PN))
|
||||
mkAP : A -> AP -- warm
|
||||
mkUtt (mkAP warm_A)
|
||||
mkAP : A -> NP -> AP -- warmer than Paris
|
||||
mkUtt (mkAP warm_A (mkNP paris_PN))
|
||||
mkAP : A2 -> NP -> AP -- married to her
|
||||
mkUtt (mkAP married_A2 she_NP )
|
||||
mkAP : A2 -> AP -- married
|
||||
mkUtt (mkAP married_A2)
|
||||
mkAP : AP -> S -> AP -- probable that she sleeps
|
||||
mkUtt (mkCl (mkVP (mkAP (mkAP good_A) (mkS (mkCl she_NP sleep_V)))))
|
||||
mkAP : AP -> QS -> AP -- uncertain who sleeps
|
||||
mkUtt (mkCl (mkVP (mkAP (mkAP uncertain_A) (mkQS (mkQCl who_IP sleep_V)))))
|
||||
mkAP : AP -> VP -> AP -- ready to go
|
||||
mkUtt (mkCl she_NP (mkAP (mkAP ready_A) (mkVP sleep_V)))
|
||||
mkAP : AP -> SC -> AP -- ready to go
|
||||
mkUtt (mkCl she_NP (mkAP (mkAP ready_A) (mkSC (mkVP sleep_V))))
|
||||
mkAP : AdA -> A -> AP -- very old
|
||||
mkUtt (mkAP very_AdA old_A)
|
||||
mkAP : AdA -> AP -> AP -- very very old
|
||||
mkUtt (mkAP very_AdA (mkAP very_AdA old_A))
|
||||
mkAP : Conj -> AP -> AP -> AP -- old and big
|
||||
mkUtt (mkAP or_Conj (mkAP old_A) (mkAP young_A))
|
||||
mkAP : Conj -> ListAP -> AP -- old, big and warm
|
||||
mkUtt (mkAP and_Conj (mkListAP (mkAP old_A) (mkListAP (mkAP big_A) (mkAP warm_A))))
|
||||
mkAP : Ord -> AP -- oldest
|
||||
mkUtt (mkAP (mkOrd old_A))
|
||||
mkAP : CAdv -> AP -> NP -> AP -- as old as she
|
||||
mkUtt (mkAP as_CAdv (mkAP old_A) she_NP)
|
||||
reflAP : A2 -> AP -- married to himself
|
||||
mkUtt (reflAP married_A2)
|
||||
comparAP : A -> AP -- warmer
|
||||
mkUtt (comparAP warm_A)
|
||||
mkAdv : A -> Adv -- warmly
|
||||
mkUtt (mkAdv warm_A)
|
||||
mkAdv : Prep -> NP -> Adv -- in the house
|
||||
mkUtt (mkAdv in_Prep (mkNP the_Det house_N))
|
||||
mkAdv : Subj -> S -> Adv -- when she sleeps
|
||||
mkUtt (mkAdv when_Subj (mkS (mkCl she_NP sleep_V)))
|
||||
mkAdv : CAdv -> A -> NP -> Adv -- more warmly than he
|
||||
mkUtt (mkAdv more_CAdv warm_A he_NP )
|
||||
mkAdv : CAdv -> A -> S -> Adv -- more warmly than he runs
|
||||
mkUtt (mkAdv more_CAdv warm_A (mkS (mkCl he_NP run_V)) )
|
||||
mkAdv : AdA -> Adv -> Adv -- very warmly
|
||||
mkUtt (mkAdv very_AdA (mkAdv warm_A) )
|
||||
mkAdv : Conj -> Adv -> Adv -> Adv -- here and now
|
||||
mkUtt (mkAdv and_Conj here_Adv now_Adv)
|
||||
mkAdv : Conj -> ListAdv -> Adv -- with her, here and now
|
||||
mkUtt (mkAdv and_Conj (mkListAdv (mkAdv with_Prep she_NP) (mkListAdv here_Adv now_Adv)))
|
||||
mkQS : (Tense) -> (Ant) -> (Pol) -> QCl -> QS -- who wouldn't have slept
|
||||
mkUtt (mkQS conditionalTense anteriorAnt negativePol (mkQCl who_IP sleep_V))
|
||||
mkQS : Cl -> QS --
|
||||
mkUtt (mkQS (mkCl she_NP sleep_V))
|
||||
mkQCl : Cl -> QCl -- does she sleep
|
||||
mkUtt (mkQCl (mkCl she_NP sleep_V))
|
||||
mkQCl : IP -> VP -> QCl -- who sleeps
|
||||
mkUtt (mkQCl who_IP (mkVP (mkVP sleep_V) here_Adv))
|
||||
mkQCl : IP -> V -> QCl -- who sleeps
|
||||
mkUtt (mkQCl who_IP sleep_V)
|
||||
mkQCl : IP -> V2 -> NP -> QCl -- who loves her
|
||||
mkUtt (mkQCl who_IP love_V2 she_NP)
|
||||
mkQCl : IP -> V3 -> NP -> NP -> QCl -- who sends it to her
|
||||
mkUtt (mkQCl who_IP send_V3 it_NP she_NP)
|
||||
mkQCl : IP -> VV -> VP -> QCl -- who wants to sleep
|
||||
mkUtt (mkQCl who_IP want_VV (mkVP sleep_V))
|
||||
mkQCl : IP -> VS -> S -> QCl -- who says that I sleep
|
||||
mkUtt (mkQCl who_IP say_VS (mkS (mkCl i_NP sleep_V)))
|
||||
mkQCl : IP -> VQ -> QS -> QCl -- who wonders who sleeps
|
||||
mkUtt (mkQCl who_IP wonder_VQ (mkQS (mkQCl who_IP sleep_V)))
|
||||
mkQCl : IP -> VA -> A -> QCl -- who becomes old
|
||||
mkUtt (mkQCl who_IP become_VA old_A)
|
||||
mkQCl : IP -> VA -> AP -> QCl -- who becomes very old
|
||||
mkUtt (mkQCl who_IP become_VA (mkAP very_AdA old_A))
|
||||
mkQCl : IP -> V2A -> NP -> A -> QCl -- who paints it red
|
||||
mkUtt (mkQCl who_IP paint_V2A it_NP red_A)
|
||||
mkQCl : IP -> V2A -> NP -> AP -> QCl -- who paints it very red
|
||||
mkUtt (mkQCl who_IP paint_V2A it_NP (mkAP very_AdA red_A))
|
||||
mkQCl : IP -> V2S -> NP -> S -> QCl -- who answers to him that we sleep
|
||||
mkUtt (mkQCl who_IP answer_V2S he_NP (mkS (mkCl we_NP sleep_V)))
|
||||
mkQCl : IP -> V2Q -> NP -> QS -> QCl -- who asks him who sleeps
|
||||
mkUtt (mkQCl who_IP ask_V2Q he_NP (mkQS (mkQCl who_IP sleep_V)))
|
||||
mkQCl : IP -> V2V -> NP -> VP -> QCl -- who begs him to sleep
|
||||
mkUtt (mkQCl who_IP beg_V2V he_NP (mkVP sleep_V))
|
||||
mkQCl : IP -> A -> QCl -- who is old
|
||||
mkUtt (mkQCl who_IP old_A)
|
||||
mkQCl : IP -> A -> NP -> QCl -- who is older than he
|
||||
mkUtt (mkQCl who_IP old_A he_NP)
|
||||
mkQCl : IP -> A2 -> NP -> QCl -- who is married to him
|
||||
mkUtt (mkQCl who_IP married_A2 he_NP)
|
||||
mkQCl : IP -> AP -> QCl -- who is very old
|
||||
mkUtt (mkQCl who_IP (mkAP very_AdA old_A))
|
||||
mkQCl : IP -> NP -> QCl -- who is the woman
|
||||
mkUtt (mkQCl who_IP (mkNP the_Det woman_N))
|
||||
mkQCl : IP -> N -> QCl -- who is a woman
|
||||
mkUtt (mkQCl who_IP woman_N)
|
||||
mkQCl : IP -> CN -> QCl -- who is an old woman
|
||||
mkUtt (mkQCl who_IP (mkCN old_A woman_N))
|
||||
mkQCl : IP -> Adv -> QCl -- who is here
|
||||
mkUtt (mkQCl who_IP here_Adv)
|
||||
mkQCl : IP -> VP -> QCl -- who always sleeps
|
||||
mkUtt (mkQCl who_IP (mkVP always_AdV (mkVP sleep_V)))
|
||||
mkQCl : IAdv -> Cl -> QCl -- why does she sleep
|
||||
mkUtt (mkQCl why_IAdv (mkCl she_NP sleep_V) )
|
||||
mkQCl : Prep -> IP -> Cl -> QCl -- with whom does she sleep
|
||||
mkUtt (mkQCl with_Prep who_IP (mkCl she_NP sleep_V) )
|
||||
mkQCl : IAdv -> NP -> QCl -- where is she
|
||||
mkUtt (mkQCl where_IAdv she_NP )
|
||||
mkQCl : IComp -> NP -> QCl -- who is this man
|
||||
mkUtt (mkQCl (mkIComp who_IP) (mkNP this_Det man_N))
|
||||
mkQCl : IP -> QCl -- which cities are there
|
||||
mkUtt (mkQCl (mkIP which_IQuant city_N))
|
||||
mkQCl : IP -> NP -> V2 -> QCl -- who does she love
|
||||
mkUtt (mkQCl who_IP she_NP)
|
||||
mkQCl : IP -> ClSlash -> QCl -- who does she love today --:
|
||||
mkUtt (mkQCl who_IP (mkClSlash (mkClSlash she_NP love_V2) today_Adv))
|
||||
mkIP : IDet -> CN -> IP -- which five big cities
|
||||
mkUtt (mkIP (mkIDet which_IQuant (mkNum (mkNumeral n5_Unit))) (mkCN big_A city_N) )
|
||||
mkIP : IDet -> N -> IP -- which five cities
|
||||
mkUtt (mkIP (mkIDet which_IQuant (mkNum (mkNumeral n5_Unit))) city_N )
|
||||
mkIP : IDet -> IP -- which five
|
||||
mkUtt (mkIP (mkIDet which_IQuant (mkNum (mkNumeral n5_Unit))))
|
||||
mkIP : IQuant -> CN -> IP -- which big city
|
||||
mkUtt (mkIP which_IQuant (mkCN big_A city_N) )
|
||||
mkIP : IQuant -> Num -> CN -> IP -- which five big cities
|
||||
mkUtt (mkIP which_IQuant (mkNum (mkNumeral n5_Unit)) (mkCN big_A city_N) )
|
||||
mkIP : IQuant -> N -> IP -- which city
|
||||
mkUtt (mkIP which_IQuant city_N)
|
||||
mkIP : IP -> Adv -> IP -- who in Paris
|
||||
mkUtt (mkIP who_IP (mkAdv in_Prep (mkNP paris_PN)))
|
||||
what_IP : IP -- what (singular)
|
||||
mkUtt what_IP
|
||||
who_IP : IP -- who (singular)
|
||||
mkUtt who_IP
|
||||
mkIAdv : Prep -> IP -> IAdv -- in which city
|
||||
mkUtt (mkIAdv in_Prep (mkIP which_IQuant city_N))
|
||||
mkIAdv : IAdv -> Adv -> IAdv -- where in Paris
|
||||
mkUtt (mkIAdv where_IAdv (mkAdv in_Prep (mkNP paris_PN)) )
|
||||
mkIDet : IQuant -> Num -> IDet -- which (songs)
|
||||
mkUtt (mkIP (mkIDet which_IQuant pluralNum) house_N)
|
||||
mkIDet : IQuant -> IDet
|
||||
mkUtt (mkIP (mkIDet which_IQuant) house_N )
|
||||
which_IDet : IDet
|
||||
mkUtt (mkIP which_IDet house_N)
|
||||
whichPl_IDet : IDet
|
||||
mkUtt (mkIP whichPl_IDet house_N)
|
||||
mkRS : (Tense) -> (Ant) -> (Pol) -> RCl -> RS -- that wouldn't have slept
|
||||
mkUtt (mkCN woman_N (mkRS conditionalTense anteriorAnt negativePol (mkRCl which_RP sleep_V)))
|
||||
mkRS : RCl -> RS --
|
||||
mkUtt (mkCN woman_N (mkRS (mkRCl which_RP sleep_V)))
|
||||
mkRS : Conj -> RS -> RS -> RS --
|
||||
mkUtt (mkCN woman_N (mkRS or_Conj (mkRS (mkRCl which_RP sleep_V)) (mkRS (mkRCl which_RP we_NP love_V2))))
|
||||
mkRCl : RP -> VP -> RCl -- who sleeps
|
||||
mkUtt (mkCN woman_N (mkRS (mkRCl which_RP (mkVP (mkVP sleep_V) here_Adv))))
|
||||
mkRCl : RP -> V -> RCl -- who sleeps
|
||||
mkUtt (mkCN woman_N (mkRS (mkRCl which_RP sleep_V)))
|
||||
mkRCl : RP -> V2 -> NP -> RCl -- who loves her
|
||||
mkUtt (mkCN woman_N (mkRS (mkRCl which_RP love_V2 he_NP)))
|
||||
mkRCl : RP -> V3 -> NP -> NP -> RCl -- who sends it to her
|
||||
mkUtt (mkCN woman_N (mkRS (mkRCl which_RP send_V3 it_NP he_NP)))
|
||||
mkRCl : RP -> VV -> VP -> RCl -- who wants to sleep
|
||||
mkUtt (mkCN woman_N (mkRS (mkRCl which_RP want_VV (mkVP sleep_V))))
|
||||
mkRCl : RP -> VS -> S -> RCl -- who says that I sleep
|
||||
mkUtt (mkCN woman_N (mkRS (mkRCl which_RP say_VS (mkS (mkCl i_NP sleep_V)))))
|
||||
mkRCl : RP -> VQ -> QS -> RCl -- who wonders who sleeps
|
||||
mkUtt (mkCN woman_N (mkRS (mkRCl which_RP wonder_VQ (mkQS (mkQCl who_IP sleep_V)))))
|
||||
mkRCl : RP -> VA -> A -> RCl -- who becomes old
|
||||
mkUtt (mkCN woman_N (mkRS (mkRCl which_RP become_VA old_A)))
|
||||
mkRCl : RP -> VA -> AP -> RCl -- who becomes very old
|
||||
mkUtt (mkCN woman_N (mkRS (mkRCl which_RP become_VA (mkAP very_AdA old_A))))
|
||||
mkRCl : RP -> V2A -> NP -> A -> RCl -- who paints it red
|
||||
mkUtt (mkCN woman_N (mkRS (mkRCl which_RP paint_V2A it_NP red_A)))
|
||||
mkRCl : RP -> V2A -> NP -> AP -> RCl -- who paints it very red
|
||||
mkUtt (mkCN woman_N (mkRS (mkRCl which_RP paint_V2A it_NP (mkAP very_AdA red_A))))
|
||||
mkRCl : RP -> V2S -> NP -> S -> RCl -- who answers to him that we sleep
|
||||
mkUtt (mkCN woman_N (mkRS (mkRCl which_RP answer_V2S he_NP (mkS (mkCl we_NP sleep_V)))))
|
||||
mkRCl : RP -> V2Q -> NP -> QS -> RCl -- who asks him who sleeps
|
||||
mkUtt (mkCN woman_N (mkRS (mkRCl which_RP ask_V2Q he_NP (mkQS (mkQCl who_IP sleep_V)))))
|
||||
mkRCl : RP -> V2V -> NP -> VP -> RCl -- who begs him to sleep
|
||||
mkUtt (mkCN woman_N (mkRS (mkRCl which_RP beg_V2V he_NP (mkVP sleep_V))))
|
||||
mkRCl : RP -> A -> RCl -- who is old
|
||||
mkUtt (mkCN woman_N (mkRS (mkRCl which_RP old_A)))
|
||||
mkRCl : RP -> A -> NP -> RCl -- who is older than he
|
||||
mkUtt (mkCN woman_N (mkRS (mkRCl which_RP old_A he_NP)))
|
||||
mkRCl : RP -> A2 -> NP -> RCl -- who is married to him
|
||||
mkUtt (mkCN woman_N (mkRS (mkRCl which_RP married_A2 he_NP)))
|
||||
mkRCl : RP -> AP -> RCl -- who is very old
|
||||
mkUtt (mkCN woman_N (mkRS (mkRCl which_RP (mkAP very_AdA old_A))))
|
||||
mkRCl : RP -> NP -> RCl -- who is the woman
|
||||
mkUtt (mkCN woman_N (mkRS (mkRCl which_RP (mkNP the_Det woman_N))))
|
||||
mkRCl : RP -> N -> RCl -- who is a woman
|
||||
mkUtt (mkCN student_N (mkRS (mkRCl which_RP woman_N)))
|
||||
mkRCl : RP -> CN -> RCl -- who is an old woman
|
||||
mkUtt (mkCN student_N (mkRS (mkRCl which_RP (mkCN old_A woman_N))))
|
||||
mkRCl : RP -> Adv -> RCl -- who is here
|
||||
mkUtt (mkCN woman_N (mkRS (mkRCl which_RP here_Adv)))
|
||||
mkRCl : RP -> VP -> RCl -- who always sleeps
|
||||
mkUtt (mkCN woman_N (mkRS (mkRCl which_RP (mkVP always_AdV (mkVP sleep_V)))))
|
||||
mkRCl : RP -> NP -> V2 -> RCl -- who she loves
|
||||
mkUtt (mkCN woman_N (mkRS (mkRCl which_RP we_NP love_V2)))
|
||||
mkRCl : RP -> ClSlash -> RCl -- who she loves today --:
|
||||
mkUtt (mkCN woman_N (mkRS (mkRCl which_RP (mkClSlash (mkClSlash she_NP love_V2) today_Adv))))
|
||||
which_RP : RP -- which/who )
|
||||
which_RP
|
||||
mkRP : Prep -> NP -> RP -> RP -- all the cities in which
|
||||
mkRP in_Prep (mkNP all_Predet (mkNP the_Quant pluralNum city_N)) which_RP
|
||||
mkSSlash : Temp -> Pol -> ClSlash -> SSlash
|
||||
mkSSlash (mkTemp pastTense anteriorAnt) negativePol (mkClSlash she_NP (mkVPSlash see_V2))
|
||||
mkClSlash : NP -> VPSlash -> ClSlash -- (whom) he sees here
|
||||
mkUtt (mkQCl who_IP (mkClSlash she_NP (mkVPSlash see_V2)))
|
||||
mkClSlash : NP -> V2 -> ClSlash -- (whom) he sees
|
||||
mkUtt (mkQCl who_IP (mkClSlash she_NP see_V2))
|
||||
mkClSlash : NP -> VV -> V2 -> ClSlash -- (whom) he wants to see
|
||||
mkUtt (mkQCl who_IP (mkClSlash she_NP want_VV see_V2))
|
||||
mkClSlash : Cl -> Prep -> ClSlash -- (with whom) he sleeps
|
||||
mkUtt (mkQCl who_IP (mkClSlash (mkCl she_NP sleep_V) with_Prep))
|
||||
mkClSlash : ClSlash -> Adv -> ClSlash -- (whom) he sees tomorrow
|
||||
mkUtt (mkQCl who_IP (mkClSlash (mkClSlash she_NP see_V2) today_Adv))
|
||||
mkClSlash : NP -> VS -> SSlash -> ClSlash -- (whom)she says that he s
|
||||
mkUtt (mkQCl who_IP (mkClSlash she_NP know_VS (mkSSlash (mkTemp pastTense anteriorAnt) negativePol (mkClSlash we_NP (mkVPSlash see_V2)))))
|
||||
mkVPSlash : V2 -> VPSlash -- (whom) (she) loves
|
||||
mkUtt (mkQCl who_IP (mkClSlash she_NP (mkVPSlash see_V2)))
|
||||
mkVPSlash : V3 -> NP -> VPSlash -- (whom) (she) gives an apple
|
||||
mkUtt (mkQCl who_IP (mkClSlash she_NP (mkVPSlash send_V3 it_NP)) )
|
||||
mkVPSlash : V2A -> AP -> VPSlash -- (whom) (she) paints red
|
||||
mkUtt (mkQCl who_IP (mkClSlash she_NP (mkVPSlash paint_V2A (mkAP red_A))) )
|
||||
mkVPSlash : V2Q -> QS -> VPSlash -- (whom) (she) asks who sleeps
|
||||
mkUtt (mkQCl who_IP (mkClSlash she_NP (mkVPSlash ask_V2Q (mkQS (mkQCl where_IAdv (mkCl i_NP sleep_V))))) )
|
||||
mkVPSlash : V2S -> S -> VPSlash -- (whom) (she) tells that we sleep
|
||||
mkUtt (mkQCl who_IP (mkClSlash she_NP (mkVPSlash answer_V2S (mkS (mkCl i_NP sleep_V)))) )
|
||||
mkVPSlash : V2V -> VP -> VPSlash -- (whom) (she) forces to sleep
|
||||
mkUtt (mkQCl who_IP (mkClSlash she_NP (mkVPSlash beg_V2V (mkVP sleep_V))))
|
||||
mkVPSlash : VV -> VPSlash -> VPSlash -- want always to buy
|
||||
mkUtt (mkQCl who_IP (mkClSlash she_NP (mkVPSlash want_VV (mkVPSlash see_V2))))
|
||||
mkVPSlash : V2V -> NP -> VPSlash -> VPSlash -- beg me always to buy
|
||||
mkUtt (mkQCl who_IP (mkClSlash she_NP (mkVPSlash beg_V2V i_NP (mkVPSlash see_V2))))
|
||||
above_Prep : Prep
|
||||
mkUtt (mkAdv above_Prep it_NP)
|
||||
after_Prep : Prep
|
||||
mkUtt (mkAdv after_Prep it_NP)
|
||||
all_Predet : Predet
|
||||
mkUtt (mkNP all_Predet (mkNP thePl_Det man_N))
|
||||
almost_AdA : AdA
|
||||
mkUtt (mkAP almost_AdA red_A)
|
||||
almost_AdN : AdN
|
||||
mkUtt (mkCard almost_AdN (mkCard (mkNumeral n8_Unit)) )
|
||||
although_Subj : Subj
|
||||
mkUtt (mkAdv although_Subj (mkS (mkCl she_NP sleep_V)))
|
||||
always_AdV : AdV
|
||||
always_AdV
|
||||
and_Conj : Conj
|
||||
mkUtt (mkAdv and_Conj here_Adv now_Adv)
|
||||
because_Subj : Subj
|
||||
mkUtt (mkAdv because_Subj (mkS (mkCl she_NP sleep_V)))
|
||||
before_Prep : Prep
|
||||
mkUtt (mkAdv before_Prep it_NP)
|
||||
behind_Prep : Prep
|
||||
mkUtt (mkAdv behind_Prep it_NP)
|
||||
between_Prep : Prep
|
||||
mkUtt (mkAdv between_Prep (mkNP and_Conj you_NP i_NP))
|
||||
both7and_DConj : Conj -- both...and
|
||||
mkUtt (mkAdv both7and_DConj here_Adv there_Adv)
|
||||
but_PConj : PConj
|
||||
but_PConj
|
||||
by8agent_Prep : Prep -- by (agent)
|
||||
mkUtt (mkAdv by8agent_Prep it_NP)
|
||||
by8means_Prep : Prep -- by (means of)
|
||||
mkUtt (mkAdv by8means_Prep it_NP)
|
||||
can8know_VV : VV -- can (capacity)
|
||||
mkUtt (mkVP can8know_VV (mkVP sleep_V))
|
||||
can_VV : VV -- can (possibility)
|
||||
mkUtt (mkVP can_VV (mkVP sleep_V))
|
||||
during_Prep : Prep
|
||||
mkUtt (mkAdv during_Prep it_NP)
|
||||
either7or_DConj : Conj -- either...or
|
||||
mkUtt (mkAdv either7or_DConj here_Adv there_Adv)
|
||||
every_Det : Det
|
||||
mkUtt (mkNP every_Det woman_N)
|
||||
everybody_NP : NP -- everybody
|
||||
mkUtt everybody_NP
|
||||
everything_NP : NP
|
||||
mkUtt everything_NP
|
||||
everywhere_Adv : Adv
|
||||
mkUtt (everywhere_Adv)
|
||||
few_Det : Det
|
||||
mkUtt (mkNP few_Det woman_N)
|
||||
for_Prep : Prep
|
||||
mkUtt (mkAdv for_Prep it_NP)
|
||||
from_Prep : Prep
|
||||
mkUtt (mkAdv from_Prep it_NP)
|
||||
he_Pron : Pron
|
||||
mkUtt (mkNP he_Pron)
|
||||
here_Adv : Adv
|
||||
mkUtt (here_Adv)
|
||||
here7to_Adv : Adv -- to here
|
||||
mkUtt (here7to_Adv)
|
||||
here7from_Adv : Adv -- from here
|
||||
mkUtt (here7from_Adv)
|
||||
how_IAdv : IAdv
|
||||
mkUtt how_IAdv
|
||||
how8many_IDet : IDet
|
||||
mkUtt (mkIP how8many_IDet house_N)
|
||||
how8much_IAdv : IAdv
|
||||
mkUtt how8much_IAdv
|
||||
i_Pron : Pron
|
||||
mkUtt (mkNP i_Pron)
|
||||
if_Subj : Subj
|
||||
mkUtt (mkAdv if_Subj (mkS (mkCl she_NP sleep_V)))
|
||||
in8front_Prep : Prep -- in front of
|
||||
mkUtt (mkAdv in8front_Prep it_NP)
|
||||
in_Prep : Prep
|
||||
mkUtt (mkAdv in_Prep it_NP)
|
||||
it_Pron : Pron
|
||||
mkUtt (mkNP it_Pron)
|
||||
less_CAdv : CAdv
|
||||
less_CAdv
|
||||
many_Det : Det
|
||||
mkUtt (mkNP many_Det house_N)
|
||||
more_CAdv : CAdv
|
||||
more_CAdv
|
||||
most_Predet : Predet
|
||||
most_Predet
|
||||
much_Det : Det
|
||||
mkUtt (mkNP much_Det wine_N)
|
||||
must_VV : VV
|
||||
must_VV
|
||||
no_Utt : Utt
|
||||
no_Utt
|
||||
on_Prep : Prep
|
||||
mkUtt (mkAdv on_Prep it_NP)
|
||||
only_Predet : Predet
|
||||
only_Predet
|
||||
or_Conj : Conj
|
||||
mkUtt (mkAdv or_Conj here_Adv there_Adv)
|
||||
otherwise_PConj : PConj
|
||||
otherwise_PConj
|
||||
part_Prep : Prep
|
||||
mkUtt (mkAdv part_Prep it_NP)
|
||||
please_Voc : Voc
|
||||
please_Voc
|
||||
possess_Prep : Prep -- of (possessive)
|
||||
mkUtt (mkAdv possess_Prep it_NP)
|
||||
quite_Adv : AdA
|
||||
quite_Adv
|
||||
she_Pron : Pron
|
||||
mkUtt (mkNP she_Pron)
|
||||
so_AdA : AdA
|
||||
mkUtt (mkAP so_AdA warm_A)
|
||||
someSg_Det : Det
|
||||
mkUtt (mkNP someSg_Det wine_N)
|
||||
somePl_Det : Det
|
||||
mkUtt (mkNP somePl_Det woman_N)
|
||||
somebody_NP : NP
|
||||
mkUtt somebody_NP
|
||||
something_NP : NP
|
||||
mkUtt something_NP
|
||||
somewhere_Adv : Adv
|
||||
mkUtt (somewhere_Adv)
|
||||
that_Quant : Quant
|
||||
mkUtt (mkNP that_Quant house_N)
|
||||
that_Subj : Subj
|
||||
mkUtt (mkAdv that_Subj (mkS (mkCl she_NP sleep_V)))
|
||||
there_Adv : Adv
|
||||
mkUtt (there_Adv)
|
||||
there7to_Adv : Adv -- to there
|
||||
mkUtt (there7to_Adv)
|
||||
there7from_Adv : Adv -- from there
|
||||
mkUtt (there7from_Adv)
|
||||
therefore_PConj : PConj
|
||||
therefore_PConj
|
||||
they_Pron : Pron
|
||||
mkUtt (mkNP they_Pron)
|
||||
this_Quant : Quant
|
||||
mkUtt (mkNP this_Quant house_N)
|
||||
through_Prep : Prep
|
||||
mkUtt (mkAdv through_Prep it_NP)
|
||||
to_Prep : Prep
|
||||
mkUtt (mkAdv to_Prep it_NP)
|
||||
too_AdA : AdA
|
||||
mkUtt (mkAP too_AdA warm_A)
|
||||
under_Prep : Prep
|
||||
mkUtt (mkAdv under_Prep it_NP)
|
||||
very_AdA : AdA
|
||||
mkUtt (mkAP very_AdA warm_A)
|
||||
want_VV : VV
|
||||
mkUtt (mkVP want_VV (mkVP sleep_V))
|
||||
we_Pron : Pron
|
||||
mkUtt (mkNP we_Pron)
|
||||
whatPl_IP : IP -- what (plural)
|
||||
mkUtt (whatPl_IP)
|
||||
whatSg_IP : IP -- what (singular)
|
||||
mkUtt (whatSg_IP)
|
||||
when_IAdv : IAdv
|
||||
mkUtt when_IAdv
|
||||
when_Subj : Subj
|
||||
mkUtt (mkAdv when_Subj (mkS (mkCl she_NP sleep_V)))
|
||||
where_IAdv : IAdv
|
||||
mkUtt where_IAdv
|
||||
which_IQuant : IQuant
|
||||
mkUtt (mkIP which_IQuant house_N)
|
||||
whoPl_IP : IP -- who (plural)
|
||||
mkUtt (whoPl_IP)
|
||||
whoSg_IP : IP -- who (singular)
|
||||
mkUtt (whoSg_IP)
|
||||
why_IAdv : IAdv
|
||||
mkUtt why_IAdv
|
||||
with_Prep : Prep
|
||||
mkUtt (mkAdv with_Prep it_NP)
|
||||
without_Prep : Prep
|
||||
mkUtt (mkAdv without_Prep it_NP)
|
||||
yes_Utt : Utt
|
||||
yes_Utt
|
||||
youSg_Pron : Pron -- you (singular)
|
||||
mkUtt (mkNP youSg_Pron)
|
||||
youPl_Pron : Pron -- you (plural)
|
||||
mkUtt (mkNP youPl_Pron)
|
||||
youPol_Pron : Pron -- you (polite)
|
||||
mkUtt (mkNP youPol_Pron)
|
||||
no_Quant : Quant
|
||||
mkUtt (mkNP no_Quant house_N)
|
||||
not_Predet : Predet
|
||||
mkUtt (mkNP not_Predet everybody_NP)
|
||||
if_then_Conj : Conj
|
||||
mkUtt (mkAdv if_then_Conj here_Adv there_Adv)
|
||||
at_least_AdN : AdN
|
||||
mkUtt (mkCard at_least_AdN (mkCard (mkNumeral n8_Unit)))
|
||||
at_most_AdN : AdN
|
||||
mkUtt (mkCard at_most_AdN (mkCard (mkNumeral n8_Unit)))
|
||||
nobody_NP : NP
|
||||
mkUtt nobody_NP
|
||||
nothing_NP : NP
|
||||
mkUtt nothing_NP
|
||||
except_Prep : Prep
|
||||
mkUtt (mkAdv except_Prep it_NP)
|
||||
as_CAdv : CAdv
|
||||
as_CAdv
|
||||
have_V2 : V2
|
||||
mkUtt (mkVP have_V2 it_NP)
|
||||
22
doc/synopsis/browse.txt
Normal file
22
doc/synopsis/browse.txt
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
|
||||
|
||||
|
||||
=Browsing the libraries with GF commands=
|
||||
|
||||
**Note**: You can browse using the syntax editor
|
||||
[directly on the web http://cloud.grammaticalframework.org/syntax-editor/editor.html].
|
||||
|
||||
All of the following assume that
|
||||
``GF_LIB_PATH`` points to the directory ``GF/lib`` with compiled libraries.
|
||||
|
||||
To try out inflection paradigms:
|
||||
```
|
||||
> i -retain alltenses/ParadigmsGer.gfo
|
||||
> cc mkN "Farbe"
|
||||
```
|
||||
To try out overloaded syntax, test lexicon, and inflection paradigms:
|
||||
```
|
||||
> i -retain alltenses/TryGer.gfo
|
||||
> cc mkCl (mkNP this_Quant (mkN "Farbe")) (mkA "dunkel")
|
||||
```
|
||||
19
doc/synopsis/categories-intro.txt
Normal file
19
doc/synopsis/categories-intro.txt
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
|
||||
The chart below shows the categories in a hierarchical top-down order.
|
||||
The edges do not define the complete dependency structure; if they did,
|
||||
the graph would have many many more edges, and also many cycles. The precise
|
||||
meaning of a directed edge from //C// to //D// is: there is a constructor
|
||||
of //C// that takes //D// as an argument. What the constructors exactly are,
|
||||
and what other arguments they take, is described by separate tables for
|
||||
each category.
|
||||
|
||||
| [categories.png] |
|
||||
|
||||
%!include(html): ''categories-imagemap.html''
|
||||
|
||||
|
||||
The rectangular boxes mark open lexical categories, which have constructors
|
||||
also in the ``Paradigms`` modules.
|
||||
|
||||
|
||||
149
doc/synopsis/categories.dot
Normal file
149
doc/synopsis/categories.dot
Normal file
@@ -0,0 +1,149 @@
|
||||
|
||||
digraph categories {
|
||||
|
||||
size = "11,11" ;
|
||||
node [href="#\N"];
|
||||
|
||||
Text [style = "solid", shape = "ellipse"];
|
||||
Text -> Punct [style = "solid"];
|
||||
Text -> Phr [style = "solid"];
|
||||
|
||||
Punct [style = "solid", shape = "ellipse"];
|
||||
|
||||
Phr [style = "solid", shape = "ellipse"];
|
||||
Phr -> PConj [style = "solid"];
|
||||
Phr -> Utt [style = "solid"];
|
||||
Phr -> Voc [style = "solid"];
|
||||
|
||||
PConj [style = "solid", shape = "ellipse"];
|
||||
Voc [style = "solid", shape = "ellipse"];
|
||||
|
||||
Utt [style = "solid", shape = "ellipse"];
|
||||
Utt -> Imp [style = "solid"];
|
||||
Utt -> S [style = "solid"];
|
||||
Utt -> QS [style = "solid"];
|
||||
|
||||
Imp [style = "solid", shape = "ellipse"];
|
||||
|
||||
S [style = "solid", shape = "ellipse"];
|
||||
S -> Tense [style = "solid"];
|
||||
S -> Ant [style = "solid"];
|
||||
S -> Pol [style = "solid"];
|
||||
S -> Cl [style = "solid"];
|
||||
S -> ListS [style = "solid"];
|
||||
S -> Conjs [style = "solid"];
|
||||
|
||||
Conjs [label = "Conj", href="#Conj", style = "solid", shape = "ellipse"];
|
||||
|
||||
Tense [style = "solid", shape = "ellipse"];
|
||||
Ant [style = "solid", shape = "ellipse"];
|
||||
Pol [style = "solid", shape = "ellipse"];
|
||||
|
||||
Cl [style = "solid", shape = "ellipse"];
|
||||
Cl -> NP [style = "solid"];
|
||||
Cl -> VP [style = "solid"];
|
||||
Cl -> Adv [style = "solid"];
|
||||
|
||||
Adv [style = "solid", shape = "rectangle"];
|
||||
Adv -> Subj [style = "solid"];
|
||||
Adv -> ListAdj [style = "solid"];
|
||||
|
||||
|
||||
NP [style = "solid", shape = "ellipse"];
|
||||
NP -> Predet [style = "solid"];
|
||||
NP -> Pron [style = "solid"];
|
||||
NP -> PN [style = "solid"];
|
||||
NP -> Det [style = "solid"];
|
||||
NP -> CN [style = "solid"];
|
||||
NP -> ListNP [style = "solid"];
|
||||
|
||||
Predet [style = "solid", shape = "ellipse"];
|
||||
|
||||
Pron [style = "solid", shape = "ellipse"];
|
||||
PN [style = "solid", shape = "rectangle"];
|
||||
|
||||
Det [style = "solid", shape = "ellipse"];
|
||||
Det -> Art [style = "solid"];
|
||||
Det -> Quant [style = "solid"];
|
||||
Det -> Num [style = "solid"];
|
||||
Det -> Ord [style = "solid"];
|
||||
|
||||
|
||||
Art [label = "Art", style = "solid", shape = "ellipse"];
|
||||
Quant [label = "Quant", style = "solid", shape = "ellipse"];
|
||||
|
||||
|
||||
Num [style = "solid", shape = "ellipse"];
|
||||
Num -> Card [style = "solid"];
|
||||
|
||||
Card [style = "solid", shape = "ellipse"];
|
||||
Card -> Numerals [style = "solid"];
|
||||
Card -> AdN [style = "solid"];
|
||||
|
||||
AdN [style = "solid", shape = "ellipse"];
|
||||
AdN -> CAdv [style = "solid"];
|
||||
|
||||
Numerals [label = "Numeral,Digits", href="#Numeral", style = "solid", shape = "ellipse"];
|
||||
|
||||
|
||||
Ord [style = "solid", shape = "ellipse"];
|
||||
|
||||
CN [style = "solid", shape = "ellipse"];
|
||||
CN -> Ns [style = "solid"];
|
||||
CN -> RS [style = "solid"];
|
||||
|
||||
Ns [label = "N,N2,N3", href="#N", style = "solid", shape = "rectangle"];
|
||||
|
||||
|
||||
VP [style = "solid", shape = "ellipse"];
|
||||
VP -> AdV [style = "solid"];
|
||||
VP -> Vs [style = "solid"];
|
||||
VP -> AP [style = "solid"];
|
||||
|
||||
AdV [style = "solid", shape = "ellipse"];
|
||||
|
||||
Vs [label = "V,V2,V3,V*,V2*", href="#V", style = "solid", shape = "rectangle"];
|
||||
|
||||
AP [style = "solid", shape = "ellipse"];
|
||||
AP -> AdA [style = "solid"];
|
||||
AP -> As [style = "solid"];
|
||||
AP -> ListAP [style = "solid"];
|
||||
|
||||
As [label = "A, A2", href="#A", style = "solid", shape = "rectangle"];
|
||||
|
||||
|
||||
|
||||
|
||||
QS [style = "solid", shape = "ellipse"];
|
||||
QS -> QCl [style = "solid"];
|
||||
|
||||
QCl [style = "solid", shape = "ellipse"];
|
||||
QCl -> IP [style = "solid"];
|
||||
QCl -> IAdv [style = "solid"];
|
||||
QCl -> ClSlash [style = "solid"];
|
||||
|
||||
IP [style = "solid", shape = "ellipse"];
|
||||
IP -> IDet [style = "solid"];
|
||||
|
||||
IDet [style = "solid", shape = "ellipse"];
|
||||
IDet -> IQuant [style = "solid"];
|
||||
|
||||
IQuant [style = "solid", shape = "ellipse"];
|
||||
|
||||
IAdv [style = "solid", shape = "ellipse"];
|
||||
|
||||
ClSlash [style = "solid", shape = "ellipse"];
|
||||
ClSlash -> VPSlash [style = "solid"];
|
||||
|
||||
VPSlash [style = "solid", shape = "ellipse"];
|
||||
|
||||
RS [style = "solid", shape = "ellipse"];
|
||||
RS -> RCl [style = "solid"];
|
||||
|
||||
RCl [style = "solid", shape = "ellipse"];
|
||||
RCl -> RP [style = "solid"];
|
||||
|
||||
RP [style = "solid", shape = "ellipse"];
|
||||
|
||||
|
||||
}
|
||||
51
doc/synopsis/example.txt
Normal file
51
doc/synopsis/example.txt
Normal file
@@ -0,0 +1,51 @@
|
||||
|
||||
The standard way of building an application has the following modules.
|
||||
|
||||
An abstract syntax:
|
||||
```
|
||||
abstract Music = {
|
||||
cat
|
||||
Kind,
|
||||
Property ;
|
||||
fun
|
||||
PropKind : Kind -> Property -> Kind ;
|
||||
Song : Kind ;
|
||||
American : Property ;
|
||||
}
|
||||
```
|
||||
A domain lexicon interface:
|
||||
```
|
||||
interface LexMusic = open Cat in {
|
||||
oper
|
||||
song_N : N ;
|
||||
american_A : A ;
|
||||
}
|
||||
```
|
||||
A functor on ``Syntax`` and the domain lexicon interface:
|
||||
```
|
||||
incomplete concrete MusicI of Music = open Syntax, MusicLex in {
|
||||
lincat
|
||||
Kind = CN ;
|
||||
Property = AP ;
|
||||
lin
|
||||
PropKind k p = mkCN p k ;
|
||||
Song = mkCN song_N ;
|
||||
American = mkAP american_A ;
|
||||
}
|
||||
```
|
||||
For each language, an instance of the domain lexicon:
|
||||
```
|
||||
instance LexMusicGer of LexMusic = CatGer ** open ParadigmsGer in {
|
||||
oper
|
||||
song_N = mkN "Lied" "Lieder" neuter ;
|
||||
american_A = mkA "amerikanisch" ;
|
||||
}
|
||||
```
|
||||
For each language, an instantiation of the functor:
|
||||
```
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete MusicGer of Music = MusicI with
|
||||
(Syntax = SyntaxGer),
|
||||
(LexMusic = LexMusicGer) ;
|
||||
```
|
||||
99
doc/synopsis/intro.txt
Normal file
99
doc/synopsis/intro.txt
Normal file
@@ -0,0 +1,99 @@
|
||||
|
||||
|
||||
Versions: [3.9 ./synopsis-v3.9.html] | latest (this one)
|
||||
|
||||
|
||||
=Introduction=
|
||||
|
||||
The GF Resource Grammar Library is the standard library for Grammatical Framework.
|
||||
It covers the morphology and basic syntax of currently 34 languages:
|
||||
Afrikaans,
|
||||
Arabic,
|
||||
Bulgarian,
|
||||
Catalan,
|
||||
Chinese (simplified),
|
||||
Danish,
|
||||
Dutch,
|
||||
English,
|
||||
Estonian,
|
||||
Finnish,
|
||||
French,
|
||||
German,
|
||||
Greek,
|
||||
Hindi,
|
||||
Icelandic,
|
||||
Japanese,
|
||||
Italian,
|
||||
Latvian,
|
||||
Maltese,
|
||||
Mongolian,
|
||||
Nepali,
|
||||
Norwegian (bokmål),
|
||||
Norwegial (nynorsk),
|
||||
Persian,
|
||||
Polish,
|
||||
Portuguese,
|
||||
Punjabi,
|
||||
Romanian,
|
||||
Russian,
|
||||
Sindhi,
|
||||
Spanish,
|
||||
Swedish,
|
||||
Thai,
|
||||
Urdu.
|
||||
|
||||
This document contains the most important parts of the GF Resource Grammar API,
|
||||
as needed by a GF application programmer.
|
||||
It has been machine-generated from the source files; there are links
|
||||
to the relevant source files, which give more information. Some of the files have
|
||||
not yet been prepared so that the machine generated documentation has the nicest
|
||||
possible format.
|
||||
|
||||
The main contents are:
|
||||
- [Chapter 1 #toc2]: categories, with links to the functions for
|
||||
constructing trees in them.
|
||||
- [Chapter 2 #toc5]: syntactic construction functions, with cross-links and
|
||||
examples.
|
||||
- [Chapter 3 #toc85]: morphological paradigms.
|
||||
- [Chapter 4 #toc120]: additional libraries.
|
||||
- [Chapter 5 #toc126]: how to "browse" the library by
|
||||
loading the grammars into the ``gf`` command editor.
|
||||
- [Chapter 6 #toc127]: a brief example of how application grammars can
|
||||
use the resource modules.
|
||||
- [Detailed table of contents #toc128].
|
||||
|
||||
|
||||
Other relevant documents:
|
||||
- [The RGL Status Document ./status.html]: the current status of different languages
|
||||
and the authors of each grammar
|
||||
- [The Resource Grammar Library coverage map http://www.postcrashgames.com/gf_world/]
|
||||
- [RGL Documentation and Publications ./rgl-publications.html]: links to publications and other documentation
|
||||
- [More modules gfdoc/sources.html]: extra modules, dictionaries, and
|
||||
the internals of the resource grammar
|
||||
- [Internal abstract syntax ./absfuns.html]: synopsis of internal
|
||||
abstract functions and their Universal Dependency labels
|
||||
- [RGL Source Browser ./browse]: look up functions and their source code
|
||||
- [Minibar http://cloud.grammaticalframework.org/minibar/minibar.html]:
|
||||
find resource grammar expressions by parsing (select Grammar: LibraryBrowser)
|
||||
or test translations between all languages (select Grammar: ResourceDemo)
|
||||
- [Resource Grammar Tutorial http://www.grammaticalframework.org/doc/gf-lrec-2010.pdf]
|
||||
as presented in LREC-2010.
|
||||
- Paper "The GF Resource Grammar Library" by A. Ranta
|
||||
(//Linguistic Issues in Language Technology//, 2 (2), 2009). An overview of
|
||||
the library with linguistic motivations.
|
||||
[PDF http://elanguage.net/journals/index.php/lilt/article/viewFile/214/158]
|
||||
- Paper "Grammars as Software Libraries" by A. Ranta
|
||||
(In Y. Bertot, G. Huet, J-J. Lévy, and G. Plotkin (eds.),
|
||||
//From Semantics to Computer Science//, Cambridge University Press,
|
||||
Cambridge, pp. 281--308, 2009).
|
||||
The library from a software engineering point of view.
|
||||
[PDF http://www.cse.chalmers.se/~aarne/old/articles/libraries-kahn.pdf]
|
||||
|
||||
|
||||
Many examples in [Chapter 2 #toc5] can be seen in multiple languages by hovering the
|
||||
mouse over the example, as shown in the following screenshot:
|
||||
|
||||
[hovering.png]
|
||||
|
||||
|
||||
|
||||
118
doc/synopsis/quicklinks.js
Normal file
118
doc/synopsis/quicklinks.js
Normal file
@@ -0,0 +1,118 @@
|
||||
// Find an element with a certain tag containing a certain text.
|
||||
function findElement (tagname, text) {
|
||||
var els = document.body.getElementsByTagName(tagname)
|
||||
for (var i = 0; i < els.length; i++) {
|
||||
if (els[i].innerText === text) return els[i]
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
function text (s) {
|
||||
return document.createTextNode(s)
|
||||
}
|
||||
|
||||
function appendChildren (n, ds) {
|
||||
if (Array.isArray(ds)) for (var i in ds) n.appendChild(ds[i])
|
||||
else if (typeof ds === 'string') n.appendChild(text(ds))
|
||||
else n.appendChild(ds)
|
||||
}
|
||||
|
||||
function node (tag, cls, ds) {
|
||||
var n = document.createElement(tag)
|
||||
if (cls) n.className = cls
|
||||
if (ds) appendChildren(n, ds)
|
||||
return n
|
||||
}
|
||||
|
||||
function a (href, txt) {
|
||||
var a = node('a', '', txt)
|
||||
a.href = href
|
||||
return a
|
||||
}
|
||||
|
||||
function forAllLinks (list, f) {
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
var c = list[i].firstElementChild
|
||||
if (c && c.tagName === 'A' && c.href) f(c)
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
// Extract links to the syntax rules
|
||||
function listrules (ul) {
|
||||
var rules = []
|
||||
if (ul.tagName !== 'UL') return []
|
||||
forAllLinks(ul.children, function (c) {
|
||||
rules.push({
|
||||
href: c.href,
|
||||
text: c.innerText.split(' -')[0],
|
||||
full: c.innerText
|
||||
})
|
||||
})
|
||||
return rules
|
||||
}
|
||||
|
||||
// Extract the links to the paradigm sections for all the languages
|
||||
function listlangs (ul) {
|
||||
var langs = []
|
||||
if (ul.tagName !== 'UL') return []
|
||||
forAllLinks(ul.children, function (c) {
|
||||
if (/^Paradigms for /.test(c.innerText)) {
|
||||
langs.push({
|
||||
href: c.href,
|
||||
text: c.innerText.substr(14),
|
||||
full: c.innerText
|
||||
})
|
||||
}
|
||||
})
|
||||
return langs
|
||||
}
|
||||
|
||||
function linklist (links) {
|
||||
var d = node('div')
|
||||
for (var i = 0; i < links.length; i++) {
|
||||
var l = a(links[i].href, links[i].text)
|
||||
l.title = links[i].full
|
||||
d.appendChild(l)
|
||||
d.appendChild(text(' '))
|
||||
}
|
||||
return d
|
||||
}
|
||||
|
||||
function quicklinks () {
|
||||
// Find the detailed table of contents
|
||||
var h1toc = findElement('h1', 'Table of Contents')
|
||||
var ultoc = h1toc.nextElementSibling
|
||||
while (ultoc && ultoc.tagName !== 'UL') {
|
||||
ultoc = ultoc.nextElementSibling
|
||||
}
|
||||
|
||||
var lis = ultoc.children
|
||||
|
||||
var syntaxrules = []
|
||||
var langs = []
|
||||
|
||||
// Find the Syntax Rules and Lexical Paradigms sections in the toc
|
||||
for (var i = 0; i < lis.length; i++) {
|
||||
var li = lis[i]
|
||||
var c = li.firstElementChild
|
||||
if (c.tagName === 'A') {
|
||||
if (/^Syntax Rules /.test(c.innerText)) {
|
||||
syntaxrules = listrules(c.nextElementSibling)
|
||||
} else if (c.innerText === 'Lexical Paradigms') {
|
||||
langs = listlangs(c.nextElementSibling)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return node(
|
||||
'div',
|
||||
'row',
|
||||
[ node('div', 'col-5', [ node('h6', '', 'Syntax'), linklist(syntaxrules) ]),
|
||||
node('div', 'col-7', [ node('h6', '', 'Morphology'), linklist(langs) ])
|
||||
]
|
||||
)
|
||||
}
|
||||
|
||||
document.getElementById('quicklinks').appendChild(quicklinks())
|
||||
13
doc/synopsis/synopsis.css
Normal file
13
doc/synopsis/synopsis.css
Normal file
@@ -0,0 +1,13 @@
|
||||
#quicklinks {
|
||||
line-height: 130%;
|
||||
}
|
||||
|
||||
#quicklinks.sidebar {
|
||||
overflow-y: scroll;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
#quicklinks a {
|
||||
display: block;
|
||||
}
|
||||
126
doc/synopsis/template.html
Normal file
126
doc/synopsis/template.html
Normal file
@@ -0,0 +1,126 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="$lang$" xml:lang="$lang$"$if(dir)$ dir="$dir$"$endif$>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
$for(author-meta)$
|
||||
<meta name="author" content="$author-meta$" />
|
||||
$endfor$
|
||||
$if(date-meta)$
|
||||
<meta name="dcterms.date" content="$date-meta$" />
|
||||
$endif$
|
||||
$if(keywords)$
|
||||
<meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
|
||||
$endif$
|
||||
<title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
|
||||
$for(css)$
|
||||
<link rel="stylesheet" href="$css$" />
|
||||
$endfor$
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
|
||||
$if(math)$
|
||||
$math$
|
||||
$endif$
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
|
||||
<![endif]-->
|
||||
$for(header-includes)$
|
||||
$header-includes$
|
||||
$endfor$
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid my-4">
|
||||
<div class="row">
|
||||
|
||||
<nav class="col-md-3 col-xl-2 d-none d-md-block sidebar" id="quicklinks">
|
||||
<h5>Quick links</h5>
|
||||
<!-- filled dynamically via quicklinks.js -->
|
||||
</nav>
|
||||
|
||||
<main role="main" class="col-md-9 col-xl-10 offset-md-3 offset-xl-2">
|
||||
$if(title)$
|
||||
<header id="title-block-header">
|
||||
<a href="$rel-root$" title="Home">
|
||||
<img src="$rel-root$/doc/Logos/gf1.svg" height="200px" class="float-md-right mb-3 bg-white" alt="GF Logo">
|
||||
</a>
|
||||
<h1 class="title">$title$</h1>
|
||||
$if(subtitle)$
|
||||
<p class="subtitle">$subtitle$</p>
|
||||
$endif$
|
||||
$for(author)$
|
||||
<p class="author">$author$</p>
|
||||
$endfor$
|
||||
$if(date)$
|
||||
<p class="date">$date$</p>
|
||||
$endif$
|
||||
</header>
|
||||
$endif$
|
||||
$if(toc)$
|
||||
<nav id="$idprefix$TOC">
|
||||
$table-of-contents$
|
||||
</nav>
|
||||
$endif$
|
||||
$body$
|
||||
</main>
|
||||
</div><!-- .row -->
|
||||
</div><!-- .container-fluid -->
|
||||
|
||||
<footer class="bg-light mt-5 py-5">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<a href="$rel-root$">
|
||||
<i class="fas fa-home"></i>
|
||||
Home
|
||||
</a>
|
||||
<h6 class="text-muted mt-3">Use</h6>
|
||||
<ul class="list-unstyled">
|
||||
<li><a href="$rel-root$/demos">Demos</a></li>
|
||||
<li><a href="$rel-root$/download">Download GF</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<h6 class="text-muted">Documentation</h6>
|
||||
<ul class="list-unstyled">
|
||||
<li><a href="$rel-root$/doc/gf-shell-reference.html">GF Shell Reference</a></li>
|
||||
<li><a href="$rel-root$/lib/doc/synopsis.html">RGL Library Synopsis</a></li>
|
||||
<li><a href="$rel-root$/gf-book">The GF Book</a></li>
|
||||
<li><a href="$rel-root$/doc/gf-refman.html">Reference Manual</a></li>
|
||||
<li><a href="$rel-root$/doc/tutorial/gf-tutorial.html">Tutorial</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<h6 class="text-muted">Reference</h6>
|
||||
<ul class="list-unstyled">
|
||||
<li><a href="http://hackage.haskell.org/package/gf/docs/PGF.html">PGF library API (Haskell runtime)</a></li>
|
||||
<li><a href="$rel-root$/doc/runtime-api.html">PGF library API (C runtime)</a></li>
|
||||
<li><a href="http://hackage.haskell.org/package/gf/docs/GF.html">GF compiler API</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<h6 class="text-muted">
|
||||
Repositories
|
||||
<i class="fab fa-github"></i>
|
||||
</h6>
|
||||
<ul class="list-unstyled">
|
||||
<li><a href="https://github.com/GrammaticalFramework/gf-core">GF Core</a></li>
|
||||
<li><a href="https://github.com/GrammaticalFramework/gf-rgl">RGL</a></li>
|
||||
<li><a href="https://github.com/GrammaticalFramework/gf-contrib">Contrib</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
</footer>
|
||||
|
||||
<script src="quicklinks.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
||||
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
try {
|
||||
var pageTracker = _gat._getTracker("UA-7811807-3");
|
||||
pageTracker._trackPageview();
|
||||
} catch(err) {}</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user