Package fig.basic

Examples of fig.basic.StopWatch


    Pattern QUIT =
        Pattern.compile("quit|exit|q|bye", Pattern.CASE_INSENSITIVE);
    FbEntitySearcher searcher = new FbEntitySearcher(args[0], 10000, args[1]);
    BufferedReader is = new BufferedReader(new InputStreamReader(System.in));
    StopWatch watch = new StopWatch();
    for (; ; ) {
      System.out.print("Search> ");
      String question = is.readLine().trim();
      if (QUIT.matcher(question).matches()) {
        System.out.println("Quitting.");
        break;
      }
      if (question.equals(""))
        continue;
     
      watch.reset();
      watch.start();
      List<Document> docs = searcher.searchDocs(question);
      watch.stop();
      for (Document doc : docs) {
        LogInfo.log(
            "Mid: " + doc.get(FbIndexField.MID.fieldName()) + "\t" +
                "id: " + doc.get(FbIndexField.ID.fieldName()) + "\t" +
                "types: " + doc.get(FbIndexField.TYPES.fieldName()) + "\t" +
View Full Code Here


  public void infer() {
    if (numTokens == 0)
      return;

    watch = new StopWatch();
    watch.start();
    if (parser.verbose(2))
      LogInfo.begin_track("ParserState.infer");

    for (Derivation deriv : gatherTokenAndPhraseDerivations()) {
View Full Code Here

TOP

Related Classes of fig.basic.StopWatch

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.