Package com.clearnlp.component.evaluation

Examples of com.clearnlp.component.evaluation.SRLEvalFull


  public void run(String goldFile, String autoFile, int goldIndex, int autoIndex)
  {
    BufferedReader fGold = UTInput.createBufferedFileReader(goldFile);
    BufferedReader fAuto = UTInput.createBufferedFileReader(autoFile);
    StringIntPair[] gHeads, aHeads;
    SRLEvalFull eval = new SRLEvalFull();
    String[] gold, auto;
    String line;
   
    try
    {
      while ((line = fGold.readLine()) != null)
      {
        gold = line.split(AbstractColumnReader.DELIM_COLUMN);
        auto = fAuto.readLine().split(AbstractColumnReader.DELIM_COLUMN);
       
        line = line.trim();
        if (line.isEmpty())   continue;
       
        gHeads = toSHeads(gold[goldIndex]);
        aHeads = toSHeads(auto[autoIndex]);
        eval.evaluate(gHeads, aHeads);
      }
    }
    catch (IOException e) {e.printStackTrace();}
   
    eval.print();
  }
View Full Code Here

TOP

Related Classes of com.clearnlp.component.evaluation.SRLEvalFull

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.