From 4bd0ea1136ca61a12e5079baca7f7129ca89d133 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Sun, 7 Jul 2024 18:12:09 +0200 Subject: Some extra mappings These are conspicuously absent from the word list --- process-database.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'process-database.hs') diff --git a/process-database.hs b/process-database.hs index bfbd4b7..a9eb97c 100755 --- a/process-database.hs +++ b/process-database.hs @@ -152,12 +152,16 @@ main :: IO () main = do (csvfname, outfname) <- getArgs >>= \case [csvfname, outfname] -> return (csvfname, outfname) - _ -> die "Usage: process-database " + _ -> die "Usage: process-database \n\ + \Additionally reads and ." (hira2kata, kata2id, nIDs) <- readTable <$> readFile "table.txt" let any2id = Map.map (kata2id Map.!) hira2kata <> kata2id - rows <- concatMap (normalise any2id) . tail . readCSV <$> readFile csvfname + rows <- do + rows1 <- tail . readCSV <$> readFile csvfname + rows2 <- tail . readCSV <$> readFile "database-extra.csv" + return (concatMap (normalise any2id) (rows1 ++ rows2)) let trie = makeTrie 0 rows -- print trie -- cgit v1.2.3-70-g09d2