Cadmium::Classifier::Viterbi
TODO : add Kneser-Ney smoothing This is a Hidden Markov Model classifier which uses the Viterbi algorithm. It is efficient in predicting a state given prior observations matched to states. In NLP, it is often used to attribut POS tags to words of a text. As such it is used by Cadmium::POSTagger.
Constructors
Instance methods
emission_matrix
Sourceemission_matrix_to_a
Helper to get emission matrix as nested array (for testing/compatibility)
epsilon
Sourcelabel_count
Sourcelookup_table
Sourcengram_label_count
Sourceobservation_space
Sourcepredicted_states
Sourceprior_ngram_label_count
Sourcesequence_of_ngrams
Sourcesequence_of_observations
Sourcesequence_of_prior_ngrams
Sourcestate_space
Sourcetoken_count
observation_space, state_space, initial_probabilities, sequence_of_observations, transition_matrix, emission_matrix
token_label_count
Sourcetraining_data
Sourcetransition_matrix
Sourcetransition_matrix_to_a
Helper to get transition matrix as nested array (for testing/compatibility)