Safe Haskell | None |
---|---|
Language | Haskell2010 |
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.
fromNERTag :: a -> Text Source #
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..)
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.