adjustments in Phrasebook and synopsis

This commit is contained in:
aarne
2011-12-08 14:04:42 +00:00
parent c20745480f
commit 2cc65efff8
16 changed files with 271 additions and 236 deletions

View File

@@ -65,11 +65,11 @@ she sleeps
mkUtt (mkQS pastTense negativePol (mkQCl who_IP sleep_V))
who didn't sleep
ครไม่นอนหลับ -- neg place not preferred
ครไม่นอนหลับ -- neg place not preferred
mkUtt (mkQCl who_IP sleep_V)
who sleeps
ครนอนหลับ
ครนอนหลับ
mkUtt pluralImpForm negativePol (mkImp (mkVP man_N))
don't be men
@@ -217,7 +217,7 @@ she answers to him that we sleep
mkCl she_NP ask_V2Q he_NP (mkQS (mkQCl who_IP sleep_V))
she asks him who sleeps
หล่อนถามเขาว่าครนอนหลับ
หล่อนถามเขาว่าครนอนหลับ
mkCl she_NP beg_V2V he_NP (mkVP sleep_V)
she begs him to sleep
@@ -854,7 +854,7 @@ it is good that she sleeps
mkCl (mkVP (mkAP (mkAP uncertain_A) (mkQS (mkQCl who_IP sleep_V))))
it is uncertain who sleeps
ลังเลใจว่าครนอนหลับ
ลังเลใจว่าครนอนหลับ
mkCl she_NP (mkAP (mkAP ready_A) (mkVP sleep_V))
she is ready to sleep

22
lib/doc/Test.hs Normal file
View File

@@ -0,0 +1,22 @@
import qualified Data.Map as Map
import Data.Char
gold = "CC_eng_tha.txt"
tested = "api-examples-Tha.txt"
main = do
s <- readFile gold
let corrects = Map.fromList $ exx 1 5 2 (lines s)
-- mapM_ putStrLn $ concat [[t,s] | (t,s) <- Map.toList corrects]
t <- readFile tested
mapM_ (doTest corrects) (exx 18 22 1 (map (drop 4) (lines t)))
exx x y z ss = [(ss!!k,ss!!(k+z)) | k <- [x,y .. length ss - 2]]
doTest corrects (t,s) = case Map.lookup t corrects of
Just c -> if unspace s == uncomment c then return () else mapM_ putStrLn [t,unspace s,c]
_ -> return ()
unspace = filter (not . isSpace)
uncomment = unspace . takeWhile (/= '-')

View File

@@ -750,7 +750,7 @@ mkUtt everything_NP
everywhere_Adv : Adv
everywhere_Adv
few_Det : Det
mkUtt (mkNP few_Det women_N)
mkUtt (mkNP few_Det woman_N)
for_Prep : Prep
mkAdv for_Prep it_NP
from_Prep : Prep

File diff suppressed because it is too large Load Diff