com.aliasi.tag
Interface NBestTagger<E>

Type Parameters:
E - Type of tokens in the tagging.
All Superinterfaces:
Tagger<E>
All Known Implementing Classes:
ChainCrf, HmmDecoder

public interface NBestTagger<E>
extends Tagger<E>

The NBestTagger<E> interface for objects that tag a list of objects with multiple tagged results. The number of results may be limited, which may improve efficiency for large result sets. The n-best scored taggings are returned in order through an iterator.

An optional method returns the same n-best list with scores normalized to conditional probabilities.

Since:
LingPipe3.9
Version:
3.9
Author:
Bob Carpenter

Method Summary
 Iterator<ScoredTagging<E>> tagNBest(List<E> tokens, int maxResults)
          Return an iterator over the n-best scored taggings for the specified input tokens up to a specified maximum n.
 Iterator<ScoredTagging<E>> tagNBestConditional(List<E> tokens, int maxResults)
          Return an iterator over the n-best scored taggings for the specified input tokens up to a specified maximum n, with scores normalized to conditional probabilities.
 
Methods inherited from interface com.aliasi.tag.Tagger
tag
 

Method Detail

tagNBest

Iterator<ScoredTagging<E>> tagNBest(List<E> tokens,
                                    int maxResults)
Return an iterator over the n-best scored taggings for the specified input tokens up to a specified maximum n.

Parameters:
tokens - Input tokens to tag.
maxResults - Maximum number of results to return.
Returns:
Iterator over the n-best scored taggings for the specified tokens.

tagNBestConditional

Iterator<ScoredTagging<E>> tagNBestConditional(List<E> tokens,
                                               int maxResults)
Return an iterator over the n-best scored taggings for the specified input tokens up to a specified maximum n, with scores normalized to conditional probabilities.

Optional operation.

Parameters:
tokens - Input tokens to tag.
maxResults - Maximum number of results to return.
Returns:
Iterator over the n-best scored taggings for the specified tokens.
Throws:
UnsupportedOperationException - If this method is not supported.