tagset-positional-0.3.0: Positional tags and tagsets

Safe HaskellNone

Data.Tagset.Positional

Contents

Synopsis

Tagset

data Tagset Source

The tagset consists of a domain for each attribute name and of a parsing rule for each part of speech.

Constructors

Tagset 

type Attr = TextSource

Attribute name.

type AttrVal = TextSource

Attribute name.

type POS = TextSource

Part of speech.

type Optional = BoolSource

Is the attribute optional?

domain :: Tagset -> Attr -> Set AttrValSource

Set of potential values for the given attribute.

rule :: Tagset -> POS -> [(Attr, Optional)]Source

Parsing rule for the given POS.

Parsing

parseTagset :: String -> String -> TagsetSource

Parse the textual representation of the tagset. The first argument should be the name of the source.

Tag

data Tag Source

The morphosyntactic tag consists of the POS value and corresponding attribute values.

Constructors

Tag 

Fields

pos :: POS
 
atts :: Map Attr AttrVal
 

Instances

expand :: Tagset -> Tag -> [Tag]Source

Expand optional attributes of the tag.

tagSim :: Tag -> Tag -> IntSource

Measure of similarity between two tags.

Parsing and printing

parseTag :: Tagset -> Text -> TagSource

Parse the tag given the corresponding tagset.

showTag :: Tagset -> Tag -> TextSource

Print the tag given the corresponding tagset.