Safe Haskell | None |
---|---|
Language | Haskell98 |
NLP.Concraft.Croatian.Morphosyntax
Description
Morphosyntax data layer in Croatian.
- packSent :: ListLike a => Tagset -> [a] -> Sent Word Tag
- packSentT :: ListLike a => Tagset -> [a] -> Sent Word Tag
- addAnalysis :: Sent Word Tag -> [Set Tag] -> Sent Word Tag
- extractSentences :: ListLike a => a -> [[a]]
- transformToConfig :: ListLike a => a -> a
- data Word = Word {}
- class IsString a => ListLike a where
Documentation
packSent :: ListLike a => Tagset -> [a] -> Sent Word Tag Source
Given a tagset and a list of words it packs them into
Sent
data from, used by the tagging model. It is assumedd
that all of the tags do not have any prior probabilites. If
this was used on the training set the function wouldn't differentiate
correct from possible tags.
packSentT :: ListLike a => Tagset -> [a] -> Sent Word Tag Source
Packs the training data to sentences with the first tag having the highest probability. Suitable for using on the training set.
addAnalysis :: Sent Word Tag -> [Set Tag] -> Sent Word Tag Source
Given a sentence and a list of tags for each word this function adds the tags.
extractSentences :: ListLike a => a -> [[a]] Source
Extracts sentences from a given input. Rarely used since it's not always the case that we can assume the sentences are separated only by two newline characters.
transformToConfig :: ListLike a => a -> a Source
Transforms a given string to a model suited string.
Ex. Nsmnn -> N:s:m:n:n, or Vmp-sf -> V:m:p:9:s:f, all
-
to '9'.
Representation of a word.
Constructors
Word | |
Fields
|
class IsString a => ListLike a where Source
Used to allow use of same functions on lazy and strict
inputs. It is assumed that the function behave as they do
in Text
, Text
or String
modules.