tagset-positional-0.1.0: Handling positional tags and tagsets

Safe HaskellNone

Data.Tagset.Positional

Synopsis

Documentation

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 

Fields

domains :: Map Attr (Set Text)
 
rules :: Map POS [(Attr, Optional)]
 

Instances

type Attr = TextSource

Attribute name.

type POS = TextSource

Part of speech.

type Optional = BoolSource

Is the attribute optional?

domain :: Tagset -> Attr -> Set TextSource

Set of potential values for the given attribute.

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

Parsing rule for the given POS.

data Tag Source

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

Constructors

Tag 

Fields

pos :: POS
 
atts :: Map Attr Text
 

Instances

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

Expand optional attributes of the tag.

tagSim :: Tag -> Tag -> IntSource

Measure of similarity between two tags.