• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ResourceManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: resolveFile

import org.apache.uima.resource.ResourceManager; //导入依赖的package包/类
public static File resolveFile(String path, ResourceManager resMgr)
        throws URISyntaxException, MalformedURLException {
    Preconditions.checkArgument(path != null);
    if (resMgr == null) {
        resMgr = UIMAFramework.newDefaultResourceManager();
    }
    URL modelBaseURL = resMgr.resolveRelativePath(path);
    if (modelBaseURL == null)
        throw new IllegalStateException(format(
                "Can't resolve path %s using an UIMA relative path resolver", path));
    return new File(modelBaseURL.toURI());
}
 
开发者ID:textocat,项目名称:textokit-core,代码行数:13,代码来源:UimaResourceUtils.java


示例2: resolveDirectory

import org.apache.uima.resource.ResourceManager; //导入依赖的package包/类
public static File resolveDirectory(String path, ResourceManager resMgr)
        throws MalformedURLException, URISyntaxException {
    File f = resolveFile(path, resMgr);
    if (!f.isDirectory()) {
        throw new IllegalStateException(format(
                "Path '%s' is resolved into '%s' but it is not a directory", path, f));
    }
    return f;
}
 
开发者ID:textocat,项目名称:textokit-core,代码行数:10,代码来源:UimaResourceUtils.java


示例3: JCasFactoryImpl

import org.apache.uima.resource.ResourceManager; //导入依赖的package包/类
/**
 * Constructor
 * 
 * @param typeSystemDescriptions
 */
public JCasFactoryImpl(TypeSystemDescription[] typeSystemDescriptions) {
	// Initialize cas manager
	ResourceManager resManager = new ResourceManager_impl();
	casManager = resManager.getCasManager();
	
	for (TypeSystemDescription desc : typeSystemDescriptions) {
		ProcessingResourceMetaData metaData = new ProcessingResourceMetaData_impl();
		metaData.setTypeSystem(desc);
		
		casManager.addMetaData(metaData);
	}
}
 
开发者ID:HeidelTime,项目名称:heideltime,代码行数:18,代码来源:JCasFactoryImpl.java


示例4: createCpe

import org.apache.uima.resource.ResourceManager; //导入依赖的package包/类
public CollectionProcessingEngine createCpe(StatusCallbackListener aListener)
        throws ResourceInitializationException, CpeDescriptorException {
    ResourceManager resMgr = UIMAFramework.newDefaultResourceManager();

    // max errors
    if (maxErrors != 0) {
        for (CpeCasProcessor cpeCasProcessor : cpeDesc
                .getCpeCasProcessors().getAllCpeCasProcessors()) {
            if (maxErrors == -1) // infinite nr errors ok
                cpeCasProcessor.setActionOnMaxError("continue");
            else if (maxErrors > 0)
                cpeCasProcessor.setMaxErrorCount(maxErrors);
        }
    }

    // thread cnt
    if (maxProcessingUnitThreatCount == 0) {
        cpeDesc.getCpeCasProcessors().setPoolSize(3);
    } else {
        cpeDesc.getCpeCasProcessors().setPoolSize(
                maxProcessingUnitThreatCount + 2);
        cpeDesc.setProcessingUnitThreadCount(maxProcessingUnitThreatCount);
    }

    CollectionProcessingEngine cpe = UIMAFramework
            .produceCollectionProcessingEngine(cpeDesc, resMgr, null);
    cpe.addStatusCallbackListener(aListener);
    return cpe;
}
 
开发者ID:BlueBrain,项目名称:bluima,代码行数:30,代码来源:CpeBuilder.java


示例5: setResourceManager

import org.apache.uima.resource.ResourceManager; //导入依赖的package包/类
public void setResourceManager(ResourceManager resourceManager) {
    mResourceManager = resourceManager;
}
 
开发者ID:textocat,项目名称:textokit-core,代码行数:4,代码来源:Slf4jLoggerImpl.java


示例6: createEngine

import org.apache.uima.resource.ResourceManager; //导入依赖的package包/类
/**
 * Create a new analysis engine
 */
private AnalysisEngine createEngine(Class<? extends AnalysisComponent> componentClass, ResourceManager resourceManager, Object... configurationData) throws ResourceInitializationException{
	return UIMAFramework.produceAnalysisEngine(AnalysisEngineFactory.createEngineDescription(componentClass, configurationData), resourceManager, null);
}
 
开发者ID:dstl,项目名称:baleen,代码行数:7,代码来源:PipelineBuilder.java


示例7: asService

import org.apache.uima.resource.ResourceManager; //导入依赖的package包/类
private PreprocessorService asService(Lang lang, CorpusMetadata corpusMetadata) {
	PreprocessingPipelineBuilder builder = PreprocessingPipelineBuilder
			.create(lang, taggerPath)
			.setNbDocuments(corpusMetadata.getNbDocuments())
			.setCorpusSize(corpusMetadata.getTotalSize());
	
	if(tagger.isPresent()) 
		builder.setTagger(tagger.get());
	
	if(documentLoggingEnabled.isPresent())
		builder.setDocumentLoggingEnabled(documentLoggingEnabled.get());
	
	if(fixedExpressionEnabled.isPresent())
		builder.setFixedExpressionEnabled(fixedExpressionEnabled.get());
		
	if(listener.isPresent())
		builder.addPipelineListener(listener.get());
	
	for(AnalysisEngineDescription customAE:customAEs) 
		builder.addCustomAE(customAE);
	
	if(resourceOptions.isPresent()) 
		builder.setResourceConfig(resourceOptions.get());


	if(history.isPresent())
			builder.setHistory(history.get());
	
	final AnalysisEngine aae;
	try {
		logger.info("Initializing analysis engine");
		ResourceManager resMgr = UIMAFramework.newDefaultResourceManager();
    	AnalysisEngineDescription aaeDesc;
		aaeDesc = createEngineDescription(builder.create());
		// Instantiate AAE
		aae = UIMAFramework.produceAnalysisEngine(aaeDesc, resMgr, null);
	} catch (ResourceInitializationException e) {
		throw new TermSuiteException(e);
	}
	
	
	return Guice.createInjector(
				new TermSuiteModule(),
				new PreprocessingModule(lang, aae))
			.getInstance(PreprocessorService.class);
}
 
开发者ID:termsuite,项目名称:termsuite-core,代码行数:47,代码来源:Preprocessor.java


示例8: setResourceManager

import org.apache.uima.resource.ResourceManager; //导入依赖的package包/类
@Override
public void setResourceManager(ResourceManager resourceManager) {
}
 
开发者ID:termsuite,项目名称:termsuite-core,代码行数:4,代码来源:UIMASlf4jWrapperLogger.java


示例9: getResourceManager

import org.apache.uima.resource.ResourceManager; //导入依赖的package包/类
@Override
public ResourceManager getResourceManager() {
	throw new UnsupportedOperationException();
}
 
开发者ID:termsuite,项目名称:termsuite-core,代码行数:5,代码来源:UIMATermSuiteResourceWrapper.java



注:本文中的org.apache.uima.resource.ResourceManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RevokeSecurityGroupIngressRequest类代码示例发布时间:2022-05-23
下一篇:
Java ConsoleErrorReporter类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap