-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Positional tags and tagsets -- -- The library provides printing and parsing functions for positional -- tags and tagsets. @package tagset-positional @version 0.2.0 module Data.Tagset.Positional -- | The tagset consists of a domain for each attribute name and of a -- parsing rule for each part of speech. data Tagset Tagset :: Map Attr (Set AttrVal) -> Map POS [(Attr, Optional)] -> Tagset domains :: Tagset -> Map Attr (Set AttrVal) rules :: Tagset -> Map POS [(Attr, Optional)] -- | Attribute name. type Attr = Text -- | Attribute name. type AttrVal = Text -- | Part of speech. type POS = Text -- | Is the attribute optional? type Optional = Bool -- | Set of potential values for the given attribute. domain :: Tagset -> Attr -> Set AttrVal -- | Parsing rule for the given POS. rule :: Tagset -> POS -> [(Attr, Optional)] -- | Parse the textual representation of the tagset. The first argument -- should be the name of the source. parseTagset :: String -> String -> Tagset -- | The morphosyntactic tag consists of the POS value and corresponding -- attribute values. data Tag Tag :: POS -> Map Attr AttrVal -> Tag pos :: Tag -> POS atts :: Tag -> Map Attr AttrVal -- | Expand optional attributes of the tag. expand :: Tagset -> Tag -> [Tag] -- | Measure of similarity between two tags. tagSim :: Tag -> Tag -> Int -- | Parse the tag given the corresponding tagset. parseTag :: Tagset -> Text -> Tag -- | Print the tag given the corresponding tagset. showTag :: Tagset -> Tag -> Text instance Show Tagset instance Eq Tagset instance Ord Tagset instance Show Tag instance Read Tag instance Eq Tag instance Ord Tag instance Binary Tagset