Skip to content
Snippets Groups Projects
Commit d786c741 authored by Alice Brenon's avatar Alice Brenon
Browse files

Complete making CSV a special case by renaming the module to SSV for «Something-Separated Values»

parent 4b5d0966
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,7 @@ import Text.TEIWA.Config (Config(..)) ...@@ -25,7 +25,7 @@ import Text.TEIWA.Config (Config(..))
import Text.TEIWA.Error (Error(..)) import Text.TEIWA.Error (Error(..))
import Text.TEIWA.Source.Common (AnnotationContext(..), Row) import Text.TEIWA.Source.Common (AnnotationContext(..), Row)
import qualified Text.TEIWA.Source.ConLLX as ConLLX (getContext, sentences) import qualified Text.TEIWA.Source.ConLLX as ConLLX (getContext, sentences)
import qualified Text.TEIWA.Source.CSV as CSV (body, getContext) import qualified Text.TEIWA.Source.SSV as SSV (body, getContext)
type TEIWAParser = ParsecT Text () (ReaderT Config (Either Error)) type TEIWAParser = ParsecT Text () (ReaderT Config (Either Error))
type Format = TEIWAParser Annotation type Format = TEIWAParser Annotation
...@@ -49,8 +49,8 @@ coNLLX = do ...@@ -49,8 +49,8 @@ coNLLX = do
ssv :: Char -> Format ssv :: Char -> Format
ssv separator = do ssv separator = do
context <- CSV.getContext separator =<< reader formColumn context <- SSV.getContext separator =<< reader formColumn
TokenLevel <$> (CSV.body separator >>= mapM (annotateToken context)) TokenLevel <$> (SSV.body separator >>= mapM (annotateToken context))
csv :: Format csv :: Format
csv = ssv ',' csv = ssv ','
......
{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleContexts #-}
module Text.TEIWA.Source.CSV ( module Text.TEIWA.Source.SSV (
body body
, getContext , getContext
) where ) where
......
...@@ -30,7 +30,7 @@ library ...@@ -30,7 +30,7 @@ library
, Text.TEIWA.Source , Text.TEIWA.Source
, Text.TEIWA.Source.Common , Text.TEIWA.Source.Common
, Text.TEIWA.Source.ConLLX , Text.TEIWA.Source.ConLLX
, Text.TEIWA.Source.CSV , Text.TEIWA.Source.SSV
build-depends: base >=4.12 && <4.15 build-depends: base >=4.12 && <4.15
, bytestring , bytestring
, mtl , mtl
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment