*/
public class SpotterEvaluator {
public static void main(String[] args) throws IOException, ConfigurationException, JSONException, InitializationException, SpottingException, org.json.JSONException {
SpotlightConfiguration configuration = new SpotlightConfiguration("conf/server.properties");
LingPipeFactory lingPipeFactory = new LingPipeFactory(new File(configuration.getTaggerFile()), new IndoEuropeanSentenceModel());
//AnnotatedDataset evaluationCorpus = new AnnotatedDataset(new File("/Users/jodaiber/Documents/workspace/ba/" +
// "BachelorThesis/01 Evaluation/02 Annotation/Software/custom/src/annotation/final.test.json"),
// AnnotatedDataset.Format.JSON, spotlightFactory);
//
AnnotatedDataset evaluationCorpus =
new AnnotatedDataset(new File("/home/pablo/eval/csaw/original"),
AnnotatedDataset.Format.CSAW, lingPipeFactory);
/**
* Base:
*/
SelectorResult baseResult = getDatasetBaseResult(evaluationCorpus);
System.out.println(baseResult);
/**
* No selection:
*/
Spotter spotter = new LingPipeSpotter(new File(configuration.getSpotterConfiguration().getSpotterFile()), configuration.getAnalyzer());
SelectorResult spotterBaseResult = getSelectorResult(spotter, evaluationCorpus);
spotterBaseResult.printResult(baseResult);
/**
* Advanced Spotter:
*/
Spotter spotterWithSelector = SpotterWithSelector.getInstance(
spotter,
new CoOccurrenceBasedSelector(configuration.getSpotterConfiguration()),
new LingPipeTaggedTokenProvider(lingPipeFactory)
);
SelectorResult selectorResultCoOc = getSelectorResult(spotterWithSelector, evaluationCorpus);
selectorResultCoOc.printResult(baseResult);