chatter-0.9.1.0: A library of simple NLP algorithms.

Safe HaskellNone
LanguageHaskell2010

NLP.Types.Tags

Synopsis

Documentation

class (Ord a, Eq a, Read a, Show a, Generic a, Serialize a) => NERTag a where Source #

The class of named entity sets. This typeclass can be defined entirely in terms of the required class constraints.

class (Ord a, Eq a, Read a, Show a, Generic a, Serialize a) => ChunkTag a where Source #

The class of things that can be regarded as chunks; Chunk tags are much like POS tags, but should not be confused. Generally, chunks distinguish between different phrasal categories (e.g.; Noun Phrases, Verb Phrases, Prepositional Phrases, etc..)

Minimal complete definition

fromChunk, parseChunk, notChunk

class (Ord a, Eq a, Read a, Show a, Generic a, Serialize a) => Tag a where Source #

The class of POS Tags.

We use a typeclass here because POS tags just need a few things in excess of equality (they also need to be serializable and human readable). Passing around all the constraints everywhere becomes a hassle, and it's handy to have a uniform interface to the diferent kinds of tag types.

This typeclass also allows for corpus-specific tags to be distinguished; They have different semantics, so they should not be merged. That said, if you wish to create a unifying POS Tag set, and mappings into that set, you can use the type system to ensure that that is done correctly.

This may get renamed to POSTag at some later date.

Minimal complete definition

fromTag, parseTag, tagUNK, tagTerm, startTag, endTag, isDt

Methods

fromTag :: a -> Text Source #

parseTag :: Text -> a Source #

tagUNK :: a Source #

tagTerm :: a -> Text Source #

startTag :: a Source #

endTag :: a Source #

isDt :: a -> Bool Source #

Check if a tag is a determiner tag.

newtype RawTag Source #

A fallback POS tag instance.

Constructors

RawTag Text