Пример #1
0
  private static void runJob(final Class<?> mainClass) throws Exception {
    final long started = System.currentTimeMillis();

    System.out.println("Starting " + mainClass.getName() + " ...");
    mainClass.getMethod("main", String[].class).invoke(mainClass, ProduceAll.DEFAULT_ARGS);

    System.out.println(
        mainClass.getName()
            + " finished in "
            + Helper.formatDuration(System.currentTimeMillis() - started)
            + "\n\n");
  }
Пример #2
0
  /**
   * @param args
   * @throws Exception
   */
  public static void main(final String[] args) throws Exception {
    final long timeStarted = System.currentTimeMillis();

    ProduceAll.runJob(QQPinyinQpydExtractor.class);
    ProduceAll.runJob(SogouScelPinyinExtractor.class);
    ProduceAll.runJob(BaiduBcdExtractor.class);
    ProduceAll.runJob(PinyinOccurrenceCounter.class);
    ProduceAll.runJob(PinyinIndexGenerator.class);
    ProduceAll.runJob(WordsMerger.class);

    // runJob(EdictZhDeExtractor.class);
    // WikiPagesMetaCurrentChineseExtractor.main(DEFAULT_ARGS);
    // WikiPagesMetaCurrentGermanExtractor.main(DEFAULT_ARGS);
    // WikiPagesMetaCurrentEnglishExtractor.main(DEFAULT_ARGS);

    System.out.println(
        "\n\n======================================\nTotal Producing Time: "
            + Helper.formatDuration(System.currentTimeMillis() - timeStarted));
    System.out.println("======================================\n");
  }