mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
biglex experiment
This commit is contained in:
10
examples/big/BigEnglish.gf
Normal file
10
examples/big/BigEnglish.gf
Normal file
@@ -0,0 +1,10 @@
|
||||
--# -path=.:../abstract:../common:prelude
|
||||
|
||||
concrete BigEnglish of BigEnglishAbs =
|
||||
LangEng,
|
||||
IrregEng-[
|
||||
blow_V,burn_V,come_V,dig_V,fall_V,fly_V,freeze_V,go_V,lie_V,run_V,
|
||||
sew_V,sing_V,sit_V,sleep_V,spit_V,stand_V,swell_V,swim_V,think_V],
|
||||
ExtraEng,
|
||||
BigLexEng
|
||||
** {} ;
|
||||
10
examples/big/BigEnglishAbs.gf
Normal file
10
examples/big/BigEnglishAbs.gf
Normal file
@@ -0,0 +1,10 @@
|
||||
--# -path=.:../abstract:../common:prelude
|
||||
|
||||
abstract BigEnglishAbs =
|
||||
Lang,
|
||||
IrregEngAbs-[
|
||||
blow_V,burn_V,come_V,dig_V,fall_V,fly_V,freeze_V,go_V,lie_V,run_V,
|
||||
sew_V,sing_V,sit_V,sleep_V,spit_V,stand_V,swell_V,swim_V,think_V],
|
||||
ExtraEngAbs,
|
||||
BigLexEngAbs
|
||||
** {} ;
|
||||
5980
examples/big/BigLexEng.gf
Normal file
5980
examples/big/BigLexEng.gf
Normal file
File diff suppressed because it is too large
Load Diff
5968
examples/big/BigLexEngAbs.gf
Normal file
5968
examples/big/BigLexEngAbs.gf
Normal file
File diff suppressed because it is too large
Load Diff
11809
examples/big/BigLexSwe.gf
Normal file
11809
examples/big/BigLexSwe.gf
Normal file
File diff suppressed because it is too large
Load Diff
11809
examples/big/BigLexSweAbs.gf
Normal file
11809
examples/big/BigLexSweAbs.gf
Normal file
File diff suppressed because it is too large
Load Diff
28
examples/big/extract2gf.hs
Normal file
28
examples/big/extract2gf.hs
Normal file
@@ -0,0 +1,28 @@
|
||||
import System
|
||||
import Char
|
||||
|
||||
-- usage: extract2gf <lang> <extracted>
|
||||
|
||||
main = do
|
||||
la:f:_ <- getArgs
|
||||
let cnc = f ++ ".gf"
|
||||
let abs = f ++ "Abs.gf"
|
||||
s <- readFile f
|
||||
writeFile abs $ "abstract " ++ f ++ "Abs = Cat ** {\n"
|
||||
writeFile cnc $ "concrete " ++ f ++ " of " ++ f ++
|
||||
"Abs = Cat" ++ la ++ " ** open Paradigms" ++ la ++ " in {\n"
|
||||
mapM_ (mkOne abs cnc . words) $ filter (not . empty) $ lines s
|
||||
appendFile abs "}"
|
||||
appendFile cnc "}"
|
||||
|
||||
-- format: cat oper args
|
||||
|
||||
mkOne abs cnc (cat : oper : args@(a1:_)) = do
|
||||
appendFile abs $ " fun " ++ fun ++ " : " ++ cat ++ " ;\n"
|
||||
appendFile cnc $ " lin " ++ fun ++ " = " ++ lin ++ " ;\n"
|
||||
where
|
||||
fun = a1 ++ "_" ++ cat ++ "_" ++ oper
|
||||
lin = unwords $ oper:["\"" ++ s ++ "\"" | s <- args]
|
||||
mkOne _ _ ws = putStrLn $ unwords ws
|
||||
|
||||
empty s = all isSpace s || take 2 s == "--"
|
||||
@@ -5,5 +5,5 @@ concrete English of EnglishAbs =
|
||||
IrregEng-[
|
||||
blow_V,burn_V,come_V,dig_V,fall_V,fly_V,freeze_V,go_V,lie_V,run_V,
|
||||
sew_V,sing_V,sit_V,sleep_V,spit_V,stand_V,swell_V,swim_V,think_V],
|
||||
ExtraEng
|
||||
ExtraEng
|
||||
** {} ;
|
||||
|
||||
@@ -434,7 +434,8 @@ oper
|
||||
lek + "a" => conj1 leker ; --- bw compat
|
||||
lek + "ar" => conj1 (lek + "a") ;
|
||||
lek + "er" => conj2 (lek + "a") ;
|
||||
bo + "r" => conj3 bo
|
||||
bo + "r" => conj3 bo ;
|
||||
_ => conj3 leker
|
||||
} ;
|
||||
|
||||
mk2V leka lekte = case <leka,lekte> of {
|
||||
|
||||
Reference in New Issue
Block a user