1
0
forked from GitHub/gf-core

Separate .trees and .treebank, and add a script for making the latter from the former

This commit is contained in:
John J. Camilleri
2021-02-02 21:46:38 +01:00
parent c94bffe435
commit d09838e97e
6 changed files with 44 additions and 41 deletions

View File

@@ -34,7 +34,7 @@ doGrammar gname = do
lpgf <- readLPGF $ gname ++ ".lpgf"
-- Read treebank
gs <- groups . lines <$> readFile (dir </> gname <.> "trees")
gs <- groups . lines <$> readFile (dir </> gname <.> "treebank")
forM_ gs $ \grp -> do
let ast = drop 2 $ dropWhile (/=':') $ head grp
printf "%s: %s\n" gname ast