|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.aliasi.sentences.SentenceEvaluation
public class SentenceEvaluation
A SentenceEvaluation stores and reports the results of
evaluating a set of reference sentence chunkings and response
sentence chunkings. Evaluation results are available through the
method chunkingEvaluation(), which returns the evaluation
of the sentences as chunkings, and the method endBoundaryEvaluation(), which returns the evaluation of the
sentences chunkings solely on the basis of the end boundary index of the sentence.
| Constructor Summary | |
|---|---|
SentenceEvaluation()
Construct a sentence evaluation. |
|
| Method Summary | |
|---|---|
void |
addCase(Chunking referenceChunking,
Chunking responseChunking)
Add the case corresponding to the specified reference and response chunkings. |
ChunkingEvaluation |
chunkingEvaluation()
Return the chunking evaluation for this sentence evaluation. |
PrecisionRecallEvaluation |
endBoundaryEvaluation()
Returns a precision/recall evaluation based on the end boundaries in the reference and response cases. |
Set<ChunkAndCharSeq> |
falseNegativeEndBoundaries()
Return the set of chunks and character sequences whose end boundaries are in reference but not the response chunking. |
Set<ChunkAndCharSeq> |
falsePositiveEndBoundaries()
Return the set of chunks and character sequences whose end boundaries are in response but not the reference chunking. |
String |
lastCaseToString(int lineLength)
Returns a formatted listing for the last case that was evaluated, showing the underlying character sequence for the chunkings, annotated with the sentence boundaries from the reference and response chunking, with linebreaks inserted every lineLength characters. |
static String |
sentenceCaseToString(Chunking referenceChunking,
Chunking responseChunking,
int lineLength)
Given a pair of reference and response chunkings, returns a string showing the underlying character sequence chunking pair, annotated with the sentence boundaries from each chunking, with linebreaks inserted every lineLength characters. |
Set<ChunkAndCharSeq> |
truePositiveEndBoundaries()
Return the set of chunks and character sequences whose end boundaries are in both the reference and response. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SentenceEvaluation()
| Method Detail |
|---|
public void addCase(Chunking referenceChunking,
Chunking responseChunking)
SentenceChunker.SENTENCE_CHUNK_TYPE.
referenceChunking - The reference chunking.responseChunking - The response chunking.
IllegalArgumentException - If the reference chunking and
response chunking are not over the same characters or if either
contains chunks of type other than
SentenceChunker.SENTENCE_CHUNK_TYPE.public ChunkingEvaluation chunkingEvaluation()
public PrecisionRecallEvaluation endBoundaryEvaluation()
public Set<ChunkAndCharSeq> truePositiveEndBoundaries()
public Set<ChunkAndCharSeq> falsePositiveEndBoundaries()
public Set<ChunkAndCharSeq> falseNegativeEndBoundaries()
public String lastCaseToString(int lineLength)
lineLength - The line length of the formatted string.
IllegalArgumentException - If the lineLength is < 1.
IllegalStateException - If no cases have been evaluated.
public static String sentenceCaseToString(Chunking referenceChunking,
Chunking responseChunking,
int lineLength)
SentenceChunker.SENTENCE_CHUNK_TYPE. The lineLength must be a
positive integer.
referenceChunking - The reference chunking.responseChunking - The response chunking.lineLength - The line length of the formatted string.
IllegalArgumentException - If the reference chunking and
response chunking are not over the same characters or if either
contains chunks of type other than
SentenceChunker.SENTENCE_CHUNK_TYPE, or if the
lineLength is < 1.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||