Examples of pw()


Examples of edu.stanford.nlp.parser.lexparser.EnglishTreebankParserParams.pw()

    }

    List<String> biggestKeys = new ArrayList<String>(vocab.keySet());
    Collections.sort(biggestKeys, Counters.toComparatorDescending(vocab));

    PrintWriter pw = tlpp.pw();
    for(String wordType : biggestKeys)
      pw.printf("%s\t%d%n", wordType,(int) vocab.getCount(wordType));
    pw.close();
  }
}
View Full Code Here

Examples of edu.stanford.nlp.parser.lexparser.EnglishTreebankParserParams.pw()

    }

    List<String> biggestKeys = new ArrayList<String>(puncTypes.keySet());
    Collections.sort(biggestKeys, Counters.toComparatorDescending(puncTypes));

    PrintWriter pw = tlpp.pw();
    for(String wordType : biggestKeys)
      pw.printf("%s\t%d%n", wordType,(int) puncTypes.getCount(wordType));
    pw.close();
  }
View Full Code Here

Examples of edu.stanford.nlp.parser.lexparser.EnglishTreebankParserParams.pw()

      goldFile = rest[0];
      guessFile = rest[1];
    }

    tlpp.setInputEncoding(encoding);
    final PrintWriter pwOut = tlpp.pw();

    final Treebank guessTreebank = tlpp.diskTreebank();
    guessTreebank.loadPath(guessFile);
    pwOut.println("GUESS TREEBANK:");
    pwOut.println(guessTreebank.textualSummary());
View Full Code Here

Examples of edu.stanford.nlp.parser.lexparser.EnglishTreebankParserParams.pw()

    }

    List<String> biggestKeys = new ArrayList<String>(rhsCounter.keySet());
    Collections.sort(biggestKeys, Counters.toComparatorDescending(rhsCounter));

    PrintWriter pw = tlpp.pw();
    for(String rhs : biggestKeys)
      pw.printf("%s\t%d%n", rhs,(int) rhsCounter.getCount(rhs));
    pw.close();
  }
 
View Full Code Here

Examples of edu.stanford.nlp.parser.lexparser.TreebankLangParserParams.pw()

    }
    File goldFile = new File(parsedArgs[0]);
    File guessFile = new File(parsedArgs[1]);
   
    final TreebankLangParserParams tlpp = Languages.getLanguageParams(LANGUAGE);
    final PrintWriter pwOut = tlpp.pw();

    final Treebank guessTreebank = tlpp.diskTreebank();
    guessTreebank.loadPath(guessFile);
    pwOut.println("GUESS TREEBANK:");
    pwOut.println(guessTreebank.textualSummary());
View Full Code Here

Examples of edu.stanford.nlp.parser.lexparser.TreebankLangParserParams.pw()

        guessFile = args[i];
        break;
      }
    }

    final PrintWriter pwOut = tlpp.pw();

    final Treebank guessTreebank = tlpp.diskTreebank();
    guessTreebank.loadPath(guessFile);
    pwOut.println("GUESS TREEBANK:");
    pwOut.println(guessTreebank.textualSummary());
View Full Code Here

Examples of edu.stanford.nlp.parser.lexparser.TreebankLangParserParams.pw()

        }
        tb.loadPath(args[i]);
      }
    }

    PrintWriter pw = tlpp.pw();
    Options op = new Options();
    Options.LexOptions lexOptions = op.lexOptions;
    if(lang == Language.French) {
      lexOptions.useUnknownWordSignatures = 1;
      lexOptions.smartMutation = false;
View Full Code Here

Examples of edu.stanford.nlp.parser.lexparser.TreebankLangParserParams.pw()

    int nUnaryRules = 0;
    int nBinaryRules = 0;
    int binaryBranchingFactors = 0;

    // Read the treebank
    PrintWriter pw = tlpp.pw();
    for (Tree tree : tb) {
      if (tree.value().equals("ROOT")) {
        tree = tree.firstChild();
      }
      ++nTrees;
View Full Code Here

Examples of edu.stanford.nlp.parser.lexparser.TreebankLangParserParams.pw()

      System.err.println(USAGE);
      System.exit(-1);
    }

    final TreebankLangParserParams tlpp = Languages.getLanguageParams(LANGUAGE);
    final PrintWriter pwOut = tlpp.pw();

    final Treebank guessTreebank = tlpp.diskTreebank();
    guessTreebank.loadPath(guessFile);
    pwOut.println("GUESS TREEBANK:");
    pwOut.println(guessTreebank.textualSummary());
View Full Code Here

Examples of edu.stanford.nlp.parser.lexparser.TreebankLangParserParams.pw()

      goldFile = rest[0];
      guessFile = rest[1];
    }

    tlpp.setInputEncoding(encoding);
    final PrintWriter pwOut = tlpp.pw();

    final Treebank guessTreebank = tlpp.diskTreebank();
    guessTreebank.loadPath(guessFile);
    pwOut.println("GUESS TREEBANK:");
    pwOut.println(guessTreebank.textualSummary());
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.