本文整理汇总了Java中is2.parser.Parser类的典型用法代码示例。如果您正苦于以下问题:Java Parser类的具体用法?Java Parser怎么用?Java Parser使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Parser类属于is2.parser包,在下文中一共展示了Parser类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPreprocessor
import is2.parser.Parser; //导入依赖的package包/类
public Preprocessor getPreprocessor(FullPipelineOptions options) throws IOException {
Tokenizer tokenizer=(options.loadPreprocessorWithTokenizer ? getTokenizer(options.tokenizer): null);
Lemmatizer lemmatizer=getLemmatizer(options.lemmatizer);
Tagger tagger=options.tagger==null?null:BohnetHelper.getTagger(options.tagger);
is2.mtag.Tagger mtagger=options.morph==null?null:BohnetHelper.getMTagger(options.morph);
Parser parser=options.parser==null?null:BohnetHelper.getParser(options.parser);
Preprocessor pp=new Preprocessor(tokenizer, lemmatizer, tagger, mtagger, parser);
return pp;
}
示例2: getPreprocessor
import is2.parser.Parser; //导入依赖的package包/类
@Override
public Preprocessor getPreprocessor(FullPipelineOptions options) throws IOException {
Tokenizer tokenizer=options.loadPreprocessorWithTokenizer ? getTokenizer(options.tokenizer):null;
Lemmatizer lemmatizer=options.lemmatizer==null?null:BohnetHelper.getLemmatizer(options.lemmatizer);
Tagger tagger=options.tagger==null?null:BohnetHelper.getTagger(options.tagger);
is2.mtag.Tagger mtagger=options.morph==null?null:BohnetHelper.getMTagger(options.morph);
Parser parser=options.parser==null?null:BohnetHelper.getParser(options.parser);
Preprocessor pp=new Preprocessor(tokenizer, lemmatizer, tagger, mtagger, parser);
return pp;
}
示例3: Preprocessor
import is2.parser.Parser; //导入依赖的package包/类
public Preprocessor(Tokenizer tokenizer,Lemmatizer lemmatizer,Tagger tagger,is2.mtag.Tagger mtagger,Parser parser){
this.tokenizer=tokenizer;
this.lemmatizer=(Tool) lemmatizer;
this.tagger=tagger;
this.mtagger=mtagger;
this.parser=parser;
}
示例4: PipelinedPreprocessor
import is2.parser.Parser; //导入依赖的package包/类
public PipelinedPreprocessor(Tokenizer tokenizer, Lemmatizer lemmatizer,
Tagger tagger, is2.mtag.Tagger mtagger, Parser parser) {
this.tokenizer = tokenizer;
this.lemmatizer = (Tool) lemmatizer;
this.tagger = tagger;
this.mtagger = mtagger;
this.parser = parser;
}
示例5: getParser
import is2.parser.Parser; //导入依赖的package包/类
public static Parser getParser(File modelFile) {
String[] argsDP = {
"-model",
modelFile.toString(),
"-cores",
Integer.toString(Math.min(Options.cores,
FullPipelineOptions.cores)) };
return new Parser(modelFile.toString());
// new is2.parser.Options(argsDP));
}
示例6: getParser
import is2.parser.Parser; //导入依赖的package包/类
public static Parser getParser(File modelFile){
String[] argsDP={"-model",modelFile.toString(),"-cores",Integer.toString(Math.min(Options.cores,FullPipelineOptions.cores))};
return new Parser(new is2.parser.Options(argsDP));
}