org.cogroo.tools.featurizer
Interface Featurizer

All Known Implementing Classes:
FeaturizerME

public interface Featurizer

The interface for featurizers which provide feature annotation for a sequence of tokens.


Method Summary
 String[] featurize(String[] toks, String[] tags)
          Generates chunk tags for the given sequence returning the result in an array.
 opennlp.tools.util.Sequence[] topKSequences(String[] sentence, String[] tags)
          Returns the top k chunk sequences for the specified sentence with the specified pos-tags
 opennlp.tools.util.Sequence[] topKSequences(String[] sentence, String[] tags, double minSequenceScore)
          Returns the top k chunk sequences for the specified sentence with the specified pos-tags
 

Method Detail

featurize

String[] featurize(String[] toks,
                   String[] tags)
Generates chunk tags for the given sequence returning the result in an array.

Parameters:
toks - an array of the tokens or words of the sequence.
tags - an array of the pos tags of the sequence.
Returns:
an array of feature tags for each token in the sequence.

topKSequences

opennlp.tools.util.Sequence[] topKSequences(String[] sentence,
                                            String[] tags)
Returns the top k chunk sequences for the specified sentence with the specified pos-tags

Parameters:
sentence - The tokens of the sentence.
tags - The pos-tags for the specified sentence.
Returns:
the top k feature sequences for the specified sentence.

topKSequences

opennlp.tools.util.Sequence[] topKSequences(String[] sentence,
                                            String[] tags,
                                            double minSequenceScore)
Returns the top k chunk sequences for the specified sentence with the specified pos-tags

Parameters:
sentence - The tokens of the sentence.
tags - The pos-tags for the specified sentence.
minSequenceScore - A lower bound on the score of a returned sequence.
Returns:
the top k feature sequences for the specified sentence.


Copyright © 2012-2013 CoGrOO. All Rights Reserved.