public class SentenceEvaluator extends Object implements ObjectHandler<Chunking>
SentenceEvaluator handles 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
evaluation.
| Constructor and Description |
|---|
SentenceEvaluator(SentenceChunker sentenceChunker)
Construct a sentence evaluator using the specified sentence
chunker to construct responses.
|
| Modifier and Type | Method and Description |
|---|---|
SentenceEvaluation |
evaluation()
Return the evaluation for this evaluator.
|
void |
handle(Chunking refChunking)
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)
handle in interface ObjectHandler<Chunking>refChunking - Refernece chunking.public SentenceEvaluation evaluation()
Copyright © 2019 Alias-i, Inc.. All rights reserved.