tagset-positional-0.3.1: Positional tags and tagsets

Safe HaskellSafe
LanguageHaskell98

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 
Instances
Eq Tagset Source # 
Instance details

Defined in Data.Tagset.Positional

Methods

(==) :: Tagset -> Tagset -> Bool #

(/=) :: Tagset -> Tagset -> Bool #

Ord Tagset Source # 
Instance details

Defined in Data.Tagset.Positional

Show Tagset Source # 
Instance details

Defined in Data.Tagset.Positional

Binary Tagset Source # 
Instance details

Defined in Data.Tagset.Positional

Methods

put :: Tagset -> Put #

get :: Get Tagset #

putList :: [Tagset] -> Put #

type Attr = Text Source #

Attribute name.

type AttrVal = Text Source #

Attribute name.

type POS = Text Source #

Part of speech.

type Optional = Bool Source #

Is the attribute optional?

domain :: Tagset -> Attr -> Set AttrVal Source #

Set of potential values for the given attribute.

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

Parsing rule for the given POS.

Parsing

parseTagset :: String -> String -> Tagset Source #

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

Instances
Eq Tag Source # 
Instance details

Defined in Data.Tagset.Positional

Methods

(==) :: Tag -> Tag -> Bool #

(/=) :: Tag -> Tag -> Bool #

Ord Tag Source # 
Instance details

Defined in Data.Tagset.Positional

Methods

compare :: Tag -> Tag -> Ordering #

(<) :: Tag -> Tag -> Bool #

(<=) :: Tag -> Tag -> Bool #

(>) :: Tag -> Tag -> Bool #

(>=) :: Tag -> Tag -> Bool #

max :: Tag -> Tag -> Tag #

min :: Tag -> Tag -> Tag #

Read Tag Source # 
Instance details

Defined in Data.Tagset.Positional

Show Tag Source # 
Instance details

Defined in Data.Tagset.Positional

Methods

showsPrec :: Int -> Tag -> ShowS #

show :: Tag -> String #

showList :: [Tag] -> ShowS #

Binary Tag Source # 
Instance details

Defined in Data.Tagset.Positional

Methods

put :: Tag -> Put #

get :: Get Tag #

putList :: [Tag] -> Put #

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

Expand optional attributes of the tag.

tagSim :: Tag -> Tag -> Int Source #

Measure of similarity between two tags.

Parsing and printing

parseTag :: Tagset -> Text -> Tag Source #

Parse the tag given the corresponding tagset.

showTag :: Tagset -> Tag -> Text Source #

Print the tag given the corresponding tagset.