diff options
| author | krasimir <krasimir@chalmers.se> | 2008-04-22 11:39:46 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2008-04-22 11:39:46 +0000 |
| commit | fc111c1a7910ab4a2a1bf40c0473bbaacadedd61 (patch) | |
| tree | 6f9c2bed83320272ebe41f314fd930f2a13ce3d9 /src/GF/UseGrammar | |
| parent | 7a6adbf35932efeed283f762b300b6f5a3b21d8a (diff) | |
use the standard System.FilePath module instead of our own broken file path manipulation functions
Diffstat (limited to 'src/GF/UseGrammar')
| -rw-r--r-- | src/GF/UseGrammar/Treebank.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/GF/UseGrammar/Treebank.hs b/src/GF/UseGrammar/Treebank.hs index d353efc8a..841a9c6dc 100644 --- a/src/GF/UseGrammar/Treebank.hs +++ b/src/GF/UseGrammar/Treebank.hs @@ -50,6 +50,7 @@ import qualified Data.Map as M import qualified Data.Set as S import qualified Data.List as L import Control.Monad (liftM) +import System.FilePath -- Generate a treebank with a multilingual grammar. AR 8/2/2006 -- (c) Aarne Ranta 2006 under GNU GPL @@ -68,14 +69,14 @@ readUniTreebanks file = do then multi2uniTreebank $ getTreebank $ lines s else let tb = getUniTreebank $ lines s - in [(zIdent (unsuffixFile file),tb)] + in [(zIdent (dropExtension file),tb)] readMultiTreebank :: FilePath -> IO MultiTreebank readMultiTreebank file = do s <- readFileIf file return $ if isMultiTreebank s then getTreebank $ lines s - else uni2multiTreebank (zIdent (unsuffixFile file)) $ getUniTreebank $ lines s + else uni2multiTreebank (zIdent (dropExtension file)) $ getUniTreebank $ lines s isMultiTreebank :: String -> Bool isMultiTreebank s = take 10 s == "<treebank>" |
