本文整理汇总了Java中edu.stanford.nlp.ling.CategoryWordTag.suppressTerminalDetails方法的典型用法代码示例。如果您正苦于以下问题:Java CategoryWordTag.suppressTerminalDetails方法的具体用法?Java CategoryWordTag.suppressTerminalDetails怎么用?Java CategoryWordTag.suppressTerminalDetails使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edu.stanford.nlp.ling.CategoryWordTag
的用法示例。
在下文中一共展示了CategoryWordTag.suppressTerminalDetails方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import edu.stanford.nlp.ling.CategoryWordTag; //导入方法依赖的package包/类
/**
* Go through trees and determine their heads and print them.
* Just for debuggin'. <br>
* Usage: <code>
* java edu.stanford.nlp.trees.CollinsHeadFinder treebankFilePath
* </code>
*
* @param args The treebankFilePath
*/
public static void main(String[] args) {
Treebank treebank = new DiskTreebank();
CategoryWordTag.suppressTerminalDetails = true;
treebank.loadPath(args[0]);
final HeadFinder chf = new CollinsHeadFinder();
treebank.apply(new TreeVisitor() {
public void visitTree(Tree pt) {
pt.percolateHeads(chf);
pt.pennPrint();
System.out.println();
}
});
}
示例2: main
import edu.stanford.nlp.ling.CategoryWordTag; //导入方法依赖的package包/类
/**
* Go through trees and determine their heads and print them.
* Just for debuggin'. <br>
* Usage: <code>
* java edu.stanford.nlp.trees.CollinsHeadFinder treebankFilePath
* </code>
*
* @param args The treebankFilePath
*/
public static void main(String[] args) {
Treebank treebank = new DiskTreebank();
CategoryWordTag.suppressTerminalDetails = true;
treebank.loadPath(args[0]);
final HeadFinder chf = new CollinsHeadFinder();
treebank.apply(new TreeVisitor() {
@Override
public void visitTree(Tree pt) {
pt.percolateHeads(chf);
pt.pennPrint();
System.out.println();
}
});
}
示例3: main
import edu.stanford.nlp.ling.CategoryWordTag; //导入方法依赖的package包/类
/**
* Go through trees and determine their heads and print them.
* Just for debugging. <br>
* Usage: <code>
* java edu.stanford.nlp.trees.DybroFrenchHeadFinder treebankFilePath
* </code>
*
* @param args The treebankFilePath
*/
public static void main(String[] args) {
Treebank treebank = new DiskTreebank();
CategoryWordTag.suppressTerminalDetails = true;
treebank.loadPath(args[0]);
final HeadFinder chf = new DybroFrenchHeadFinder();
treebank.apply(new TreeVisitor() {
public void visitTree(Tree pt) {
pt.percolateHeads(chf);
pt.pennPrint();
System.out.println();
}
});
}
示例4: main
import edu.stanford.nlp.ling.CategoryWordTag; //导入方法依赖的package包/类
/**
* Go through trees and determine their heads and print them.
* Just for debugging. <br>
* Usage: <code>
* java edu.stanford.nlp.trees.FrenchHeadFinder treebankFilePath
* </code>
*
* @param args The treebankFilePath
*/
public static void main(String[] args) {
Treebank treebank = new DiskTreebank();
CategoryWordTag.suppressTerminalDetails = true;
treebank.loadPath(args[0]);
final HeadFinder chf = new FrenchHeadFinder();
treebank.apply(new TreeVisitor() {
public void visitTree(Tree pt) {
pt.percolateHeads(chf);
pt.pennPrint();
System.out.println();
}
});
}
示例5: main
import edu.stanford.nlp.ling.CategoryWordTag; //导入方法依赖的package包/类
public static void main(String[] args) {
// simple testing code
Treebank treebank = new DiskTreebank();
CategoryWordTag.suppressTerminalDetails = true;
treebank.loadPath(args[0]);
final HeadFinder chf = new NoPunctuationHeadFinder();
treebank.apply(new TreeVisitor() {
public void visitTree(Tree pt) {
pt.percolateHeads(chf);
pt.pennPrint();
System.out.println();
}
});
}