Examples of ArticleSummarizer


Examples of it.cnr.isti.hpc.wikipedia.article.ArticleSummarizer

    GetDumpSummaryCLI cli = new GetDumpSummaryCLI(args);
    ProgressLogger pl = new ProgressLogger("dumped {} titles", 10000);
    cli.openOutput();
    RecordReader<Article> reader = new RecordReader<Article>(
        cli.getInput(), new JsonRecordParser<Article>(Article.class));
    ArticleSummarizer summarizer = new ArticleSummarizer();

    for (Article a : reader) {
      pl.up();
      cli.writeInOutput(a.getTypeName());
      cli.writeInOutput(TAB);
      cli.writeInOutput(String.valueOf(a.getWikiId()));
      cli.writeInOutput(TAB);
      cli.writeInOutput(a.getWikiTitle());
      cli.writeInOutput(TAB);
      if (a.isRedirect()) {
        cli.writeInOutput("-> " + a.getRedirect());
      } else {
        cli.writeInOutput(summarizer.getSummary(a));
      }
      cli.writeInOutput("\n");

    }
    cli.closeOutput();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.