edu.stanford.nlp.parser.lexparser
Interface Reranker
- All Superinterfaces:
- java.io.Serializable
public interface Reranker
- extends java.io.Serializable
A scorer which the RerankingParserQuery can use to rescore
sentences. process(sentence) will be called with the words in the
sentence before score(tree) is called for any candidate trees for
that sentence.
For example, TaggerReranker is a Reranker that adds a score based
on how well a tree sentence matches the result of running a tagger,
although this does not help the basic parser.
We want the interface to be threadsafe, so process() should return
a RerankerQuery in a threadsafe manner. The resulting
RerankerQuery should store any needed temporary data about the
sentence, etc. For example, the TaggerReranker returns a
RerankerQuery which stores the output of the tagger. This way,
subsequent calls to process() will not clobber existing data, and
the RerankerQuery can potentially have RerankerQuery.score() called
for different trees from different threads.
- Author:
- John Bauer
process
RerankerQuery process(java.util.List<? extends HasWord> sentence)
Stanford NLP Group