1
0
forked from GitHub/gf-rgl

Pinyin versions of chinese, named Cmn; mostly automatically generated

This commit is contained in:
aarne
2012-10-15 12:51:55 +00:00
parent 8c7d3bb6e0
commit 39b53acb5c
28 changed files with 1812 additions and 2 deletions
+15
View File
@@ -0,0 +1,15 @@
import qualified Data.Map as Map
import Pinyin (c2pMap, useMapGF, mkList)
main = do
s <- readFile pinyinFile
let m = c2pMap (mkList (words s))
mapM_ (mkPinyin m) ["Lexicon", "Numeral", "Res", "Structural"]
return ()
pinyinFile = "../pinyin.txt"
mkPinyin ma mo = do
s <- readFile (mo ++ "Chi.gf")
writeFile (mo ++ "Cmn.gf") (useMapGF ma s)