public class SentenceEvaluator extends Object implements ObjectHandler<Chunking>
SentenceEvaluatorhandles reference chunkings by constructing a response chunking and adding them to a sentence evaluation. The resulting evaluation may be retrieved through the method
evaluation()at any time.
This evaluator class implements the
ObjectHandler<Chunking> interface. The chunkings passed to the
handle(Chunking) method are treated as reference
chunkings. Their character sequence is extracted using
Chunking.charSequence() and the contained sentence chunker is used
to produce a response chunking over the character sequence. The
resulting pair of chunkings is passed to the contained sentence
|Constructor and Description|
Construct a sentence evaluator using the specified sentence chunker to construct responses.
|Modifier and Type||Method and Description|
Return the evaluation for this evaluator.
Handle the specified reference chunking by extracting its character sequence, producing a response chunking from the contained sentence chunker, and adding the reference and result to the evaluation.
public SentenceEvaluator(SentenceChunker sentenceChunker)
sentenceChunker- Sentence chunker for responses.
public void handle(Chunking refChunking)
public SentenceEvaluation evaluation()