diff --git a/lib/src/chinese/pinyin/MkPinyin.hs b/lib/src/chinese/pinyin/MkPinyin.hs index df243ffc3..670fce152 100644 --- a/lib/src/chinese/pinyin/MkPinyin.hs +++ b/lib/src/chinese/pinyin/MkPinyin.hs @@ -1,11 +1,12 @@ import qualified Data.Map as Map import Numeric +import System.Environment main = do + xx <- getArgs s <- readFile pinyinFile let m = c2pMap (mkList (words s)) - mapM_ (mkPinyin m) resModules --- mapM_ (mkPinyin m) ["HSKGrammar"] + mapM_ (mkPinyin m) xx return () pinyinFile = "pinyin.txt" @@ -15,8 +16,8 @@ resModules = [mo | mo <- ] mkPinyin ma mo = do - s <- readFile ("../" ++ mo ++ "Chi.gf") - writeFile (mo ++ "Chi.gf") (useMapGF ma s) + s <- readFile mo + writeFile (mo ++ "-cmn") (useMapGF ma s) --import Pinyin (c2pMap, useMapGF, mkList) diff --git a/lib/src/chinese/pinyin/ResChi.gf b/lib/src/chinese/pinyin/ResChi.gf index c0c1612d0..f72d20790 100644 --- a/lib/src/chinese/pinyin/ResChi.gf +++ b/lib/src/chinese/pinyin/ResChi.gf @@ -252,7 +252,7 @@ oper } ; getAdvType : Str -> AdvType = \s -> case s of { - "在" + _ => ATPlace True ; -- certain that True + "zai4" + _ => ATPlace True ; -- certain that True _ => ATPlace False -- uncertain whether ATPlace } ;