• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java ConcurrentMaltParserService类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.maltparser.concurrent.ConcurrentMaltParserService的典型用法代码示例。如果您正苦于以下问题:Java ConcurrentMaltParserService类的具体用法?Java ConcurrentMaltParserService怎么用?Java ConcurrentMaltParserService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

ConcurrentMaltParserService类属于org.maltparser.concurrent包,在下文中一共展示了ConcurrentMaltParserService类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: MaltParser

点赞 2

import org.maltparser.concurrent.ConcurrentMaltParserService; //导入依赖的package包/类
@Inject
public MaltParser(@LanguageCode String langcode, @Model(MODEL_ID) Resource modelpath) {
	Logger logger = LoggerFactory.getLogger(MaltParser.class);

	logger.info("Loading maltparser model " + modelpath.name() + " for lang " + langcode);

	try {
		model = ConcurrentMaltParserService.initializeParserModel(modelpath.file().toURI().toURL());
		this.langcode = langcode;
	} catch (Exception e) {
		throw new IOError(e);
	}

	logger.info("Completed loading maltparser model " + modelpath.name() + " for lang " + langcode + ".");
}
 

开发者ID:marcusklang,
项目名称:langforia,
代码行数:16,
代码来源:MaltParser.java

示例2: MaltParserWrapper

点赞 2

import org.maltparser.concurrent.ConcurrentMaltParserService; //导入依赖的package包/类
public MaltParserWrapper(String modelFilename)
{
    try
    {
        URL swemaltMiniModelURL = new File(modelFilename).toURI().toURL();
        model = ConcurrentMaltParserService.initializeParserModel(swemaltMiniModelURL);
    } catch (Exception e)
    {
        LogInfo.error("Error load maltparser model: " + modelFilename);
    }
}
 

开发者ID:sinantie,
项目名称:PLTAG,
代码行数:12,
代码来源:MaltParserWrapper.java

示例3: loadModel

点赞 2

import org.maltparser.concurrent.ConcurrentMaltParserService; //导入依赖的package包/类
public void loadModel() throws MaltChainedException {
	System.out.println("Start loadModel");
	long startTime = System.nanoTime();
	File workingDirectory = getWorkingDirectory(OptionManager.instance().getOptionValue(optionContainer, "config", "workingdir").toString());
	String configName = OptionManager.instance().getOptionValueString(optionContainer,"config", "name");
	String pathToModel = workingDirectory.getPath()+File.separator+configName+".mco";
	try {
		model = ConcurrentMaltParserService.initializeParserModel(new File(pathToModel).toURI().toURL());
	} catch (Exception e) {
		e.printStackTrace();
	}
	System.out.println(getMessageWithElapsed("Loading time", startTime));
}
 

开发者ID:jhamalt,
项目名称:maltparser,
代码行数:14,
代码来源:ConcurrentEngine.java

示例4: getModel

点赞 2

import org.maltparser.concurrent.ConcurrentMaltParserService; //导入依赖的package包/类
private ConcurrentMaltParserModel getModel()
        throws IOException,
        MaltChainedException {
    if (model == null) {
        URL maltModelURL = new File(this.modelFile).toURI().toURL();
        this.model = ConcurrentMaltParserService.initializeParserModel(maltModelURL);
    }
    return model;
}
 

开发者ID:mojtaba-khallash,
项目名称:JHazm,
代码行数:10,
代码来源:DependencyParser.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)