edu.mit.jmwe.harness.result
Interface IResultBuilder<T extends IToken,S extends IMarkedSentence<T>>

Type Parameters:
T - the type of tokens in the unit
S - the type of sentence the harness runs over. Is parameterized by tokens of type T.
All Known Implementing Classes:
MWEResultBuilder, TokenResultBuilder

public interface IResultBuilder<T extends IToken,S extends IMarkedSentence<T>>

Classes implementing this interface build an IOverallResult object. These classes store the sentence result objects collected from running a test harness over a group of IMarkedSentence objects and carry out all the calculations needed to build the final result.

Since:
jMWE 1.0.0
Version:
$Id: IResultBuilder.java 620 2011-05-08 21:13:58Z markaf $
Author:
M.A. Finlayson, Nidhi Kulkarni

Method Summary
 void addDetail(String id, ISentenceResult<T,S> detail)
          Stores the results for a unit under its ID.
 IOverallResult<T,S> createResult()
          Creates a result from the data stored in this builder.
 void process(List<IMWE<T>> found, List<IMWE<T>> answers)
          Updates the internal data stored in this builder by comparing the multi-word expressions found by an MWE detector to the answer multi-word expressions.
 

Method Detail

process

void process(List<IMWE<T>> found,
             List<IMWE<T>> answers)
Updates the internal data stored in this builder by comparing the multi-word expressions found by an MWE detector to the answer multi-word expressions.

Parameters:
found - A non-null list of multi-word expressions found by an IMWEDetector.
answers - A non-null list of answer multi-word expressions
Throws:
NullPointerException - if either list is null
Since:
jMWE 1.0.0

addDetail

void addDetail(String id,
               ISentenceResult<T,S> detail)
Stores the results for a unit under its ID.

Parameters:
id - the non-null identification String for the unit
detail - the unit result. May not be null.
Since:
jMWE 1.0.0

createResult

IOverallResult<T,S> createResult()
Creates a result from the data stored in this builder. Should not return null.

Returns:
a non-null result that contains the data stored in this builder.
Since:
jMWE 1.0.0


Copyright © 2011 Massachusetts Institute of Technology. All Rights Reserved.