Package interfaces

Examples of interfaces.IRouge


  SummaryStatistics rss = new SummaryStatistics();
  SummaryStatistics pss = new SummaryStatistics();
  SummaryStatistics fss = new SummaryStatistics();

  System.out.println("ROUGE-" + parsedArgs.getInt(Config.GRAM_SIZE.toString()));
  IRouge rouge = null;
  RougeN.DEBUG = parsedArgs.getBoolean(Config.VERBOSE.toString());
  for (IRougeSummaryModel document : results.keySet())
  {
      rouge = new RougeN(
        document,
        results.get(document),
        parsedArgs.getInt(Config.BYTE_LIMIT.toString()),
        parsedArgs.getInt(Config.WORD_LIMIT.toString()),
        parsedArgs.getInt(Config.GRAM_SIZE.toString()),
        parsedArgs.getChar(Config.METHOD.toString()),
        parsedArgs.getDouble(Config.ALPHA.toString())
        );

      Map<ScoreType, Double> scores = rouge.evaluate();

      rss.addValue(scores.get(ScoreType.R));
      pss.addValue(scores.get(ScoreType.P));
      fss.addValue(scores.get(ScoreType.F));
  }
View Full Code Here


  double r = 0;
  double p = 0;
  double f = 0;
 
  System.out.println("ROUGE-N");
  IRouge rouge = null;
  for (IRougeSummaryModel system : results.keySet())
  {
      rouge = new RougeN(system, results.get(system), Integer.MAX_VALUE, Integer.MAX_VALUE, 2, 'A', 0.5);
      Map<ScoreType, Double> scores = rouge.evaluate();
      r += scores.get(ScoreType.R);
      p += scores.get(ScoreType.P);
      f += scores.get(ScoreType.F);
  }
 
  r = r / (double)results.size();
  p = p / (double)results.size();
  f = f / (double)results.size();
  System.out.println("Average_R: " + r);
  System.out.println("Average_P: " + p);
  System.out.println("Average_F: " + f);
 
  System.out.println("JROUGE-N");
  r = p = f = 0;
  rouge = null;
  for (IRougeSummaryModel system : results.keySet())
  {
      rouge = new JRougeN(system, results.get(system), Integer.MAX_VALUE, Integer.MAX_VALUE, 2, 'A', 0.5);
      Map<ScoreType, Double> scores = rouge.evaluate();
      r += scores.get(ScoreType.R);
      p += scores.get(ScoreType.P);
      f += scores.get(ScoreType.F);
  }
 
View Full Code Here

TOP

Related Classes of interfaces.IRouge

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.