Package org.apache.ctakes.coreference.eval.helpers

Examples of org.apache.ctakes.coreference.eval.helpers.SpanAlignment


    goldSpans = new Vector<Span>();
//    markables = new HashMap<String, Markable>();
//    initializeDataStructures();
    loadGoldStandard();
    loadSystemPairs(lm);
    SpanAlignment sa = new SpanAlignment(goldSpans.toArray(new Span[goldSpans.size()]),
        sysSpans.toArray(new Span[sysSpans.size()]));
    int[] id = sa.get1();
    for (int i = 0; i < id.length; i++){
      alignId2GoldId.put(id[i], goldSpan2id.get(goldSpans.get(i).toString()));
      goldId2AlignId.put(goldSpan2id.get(goldSpans.get(i).toString()), id[i]);
    }
    id = sa.get2();
    for (int i = 0; i < id.length; i++){
      sysId2AlignId.put(sysSpan2id.get(sysSpans.get(i).toString()), id[i]);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.ctakes.coreference.eval.helpers.SpanAlignment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.