concraft-0.12.1: Morphological disambiguation based on constrained CRFs

Safe HaskellNone
LanguageHaskell98

NLP.Concraft.Guess

Contents

Synopsis

Types

data Guesser t Source #

A guessing model.

Constructors

Guesser 

Fields

Instances
(Ord t, Binary t) => Binary (Guesser t) Source # 
Instance details

Defined in NLP.Concraft.Guess

Methods

put :: Guesser t -> Put #

get :: Get (Guesser t) #

putList :: [Guesser t] -> Put #

Guessing

guess :: (Word w, Ord t) => Int -> Guesser t -> Sent w t -> [[t]] Source #

Determine the k most probable labels for each word in the sentence. TODO: Perhaps it would be better to use sets instead of lists as output?

include :: (Word w, Ord t) => [[t]] -> Sent w t -> Sent w t Source #

Insert guessing results into the sentence. Only interpretations of OOV words will be extended.

guessSent :: (Word w, Ord t) => Int -> Guesser t -> Sent w t -> Sent w t Source #

Combine guess with include.

Training

data TrainConf Source #

Training configuration.

Constructors

TrainConf 

Fields

data R0T Source #

Method of constructing the default set of labels (R0).

Instances
Enum R0T Source # 
Instance details

Defined in NLP.Concraft.Guess

Methods

succ :: R0T -> R0T #

pred :: R0T -> R0T #

toEnum :: Int -> R0T #

fromEnum :: R0T -> Int #

enumFrom :: R0T -> [R0T] #

enumFromThen :: R0T -> R0T -> [R0T] #

enumFromTo :: R0T -> R0T -> [R0T] #

enumFromThenTo :: R0T -> R0T -> R0T -> [R0T] #

Eq R0T Source # 
Instance details

Defined in NLP.Concraft.Guess

Methods

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

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

Data R0T Source # 
Instance details

Defined in NLP.Concraft.Guess

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> R0T -> c R0T #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c R0T #

toConstr :: R0T -> Constr #

dataTypeOf :: R0T -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c R0T) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c R0T) #

gmapT :: (forall b. Data b => b -> b) -> R0T -> R0T #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> R0T -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> R0T -> r #

gmapQ :: (forall d. Data d => d -> u) -> R0T -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> R0T -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> R0T -> m R0T #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> R0T -> m R0T #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> R0T -> m R0T #

Ord R0T Source # 
Instance details

Defined in NLP.Concraft.Guess

Methods

compare :: R0T -> R0T -> Ordering #

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

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

(>) :: R0T -> R0T -> Bool #

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

max :: R0T -> R0T -> R0T #

min :: R0T -> R0T -> R0T #

Show R0T Source # 
Instance details

Defined in NLP.Concraft.Guess

Methods

showsPrec :: Int -> R0T -> ShowS #

show :: R0T -> String #

showList :: [R0T] -> ShowS #

train Source #

Arguments

:: (Word w, Ord t) 
=> TrainConf

Training configuration

-> IO [Sent w t]

Training data

-> IO [Sent w t]

Evaluation data

-> IO (Guesser t) 

Train guesser.