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

Java CollectionProcessingEngine类代码示例

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

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



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

示例1: main

import org.apache.uima.collection.CollectionProcessingEngine; //导入依赖的package包/类
public static void main(String[] args) throws IOException, UIMAException,
        CpeDescriptorException {
    if (args.length != 1) {
        System.err.println("Usage: <cpeDescriptorPath>");
        return;
    }
    String cpeDescPath = args[0];

    XMLInputSource cpeDescSource = new XMLInputSource(cpeDescPath);
    CpeDescription cpeDesc = UIMAFramework.getXMLParser().parseCpeDescription(cpeDescSource);

    // produce
    CollectionProcessingEngine cpe = UIMAFramework
            .produceCollectionProcessingEngine(cpeDesc);
    cpe.addStatusCallbackListener(new ReportingStatusCallbackListener(cpe));

    // run
    cpe.process();
}
 
开发者ID:textocat,项目名称:textokit-core,代码行数:20,代码来源:CpeLauncher.java


示例2: process

import org.apache.uima.collection.CollectionProcessingEngine; //导入依赖的package包/类
@Override
public Boolean process() throws ResourceInitializationException,
        CpeDescriptorException {
    StatusCallbackListenerSlf4J listener = new StatusCallbackListenerSlf4J();
    CollectionProcessingEngine cpe = createCpe(listener);
    listener.setCpe(cpe);// workaround to get performanceReports

    cpe.process();
    StatusCallbackListenerSlf4J callback = (StatusCallbackListenerSlf4J) listener;
    while (!callback.isCollectionProcessComplete()) {
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            throw new RuntimeException("should not happen, though...");
        }
    }
    StopwatchUtils.closeAndPrint(); // close all stopwatches (for profiling)
    return true;
}
 
开发者ID:BlueBrain,项目名称:bluima,代码行数:20,代码来源:CpeBuilder.java


示例3: main

import org.apache.uima.collection.CollectionProcessingEngine; //导入依赖的package包/类
public static void main(String[] args) throws IOException, UIMAException,
        CpeDescriptorException {
    if (args.length != 2) {
        System.err.println("Usage: <txtInputDir> <xmiOutputDir>");
        return;
    }
    String cpeDescPath = "desc/cpe/cpe-txt-to-xmi.xml";
    String inputDirPath = args[0];
    String outputDirPath = args[1];

    XMLInputSource cpeDescSource = new XMLInputSource(cpeDescPath);
    CpeDescription cpeDesc = UIMAFramework.getXMLParser().parseCpeDescription(cpeDescSource);

    // configure reader
    cpeDesc.getAllCollectionCollectionReaders()[0]
            .getConfigurationParameterSettings().setParameterValue("DirectoryPath",
            inputDirPath);

    // configure writer
    cpeDesc.getCpeCasProcessors().getAllCpeCasProcessors()[0]
            .getConfigurationParameterSettings()
            .setParameterValue("XmiOutputDir", outputDirPath);

    // produce
    CollectionProcessingEngine cpe = UIMAFramework
            .produceCollectionProcessingEngine(cpeDesc);
    cpe.addStatusCallbackListener(new ReportingStatusCallbackListener(cpe));

    // run
    cpe.process();
}
 
开发者ID:textocat,项目名称:textokit-core,代码行数:32,代码来源:TxtToXmiLauncher.java


示例4: createCpe

import org.apache.uima.collection.CollectionProcessingEngine; //导入依赖的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: main

import org.apache.uima.collection.CollectionProcessingEngine; //导入依赖的package包/类
/**
 * @param args
 * @throws IOException 
 * @throws InvalidXMLException 
 * @throws ResourceInitializationException 
 */
public static void main(String[] args) throws InvalidXMLException, IOException, ResourceInitializationException {
	
	CpeDescription cpeDesc = UIMAFramework.getXMLParser().
	        parseCpeDescription(new XMLInputSource(desc_fname));
	      
	//instantiate CPE
	CollectionProcessingEngine mCPE = UIMAFramework.produceCollectionProcessingEngine(cpeDesc);
	
	mCPE.process();
}
 
开发者ID:UTHealth-CCB,项目名称:Medex,代码行数:17,代码来源:MedexUIMACPE.java


示例6: TestCPERunner

import org.apache.uima.collection.CollectionProcessingEngine; //导入依赖的package包/类
public TestCPERunner(CollectionProcessingEngine collectionProcessingEngine) {
  this.collectionProcessingEngine = collectionProcessingEngine;
}
 
开发者ID:nlpie,项目名称:biomedicus,代码行数:4,代码来源:TestCPERunner.java


示例7: ReportingStatusCallbackListener

import org.apache.uima.collection.CollectionProcessingEngine; //导入依赖的package包/类
public ReportingStatusCallbackListener(CollectionProcessingEngine cpe) {
    this(cpe, 0);
}
 
开发者ID:textocat,项目名称:textokit-core,代码行数:4,代码来源:ReportingStatusCallbackListener.java


示例8: setCpe

import org.apache.uima.collection.CollectionProcessingEngine; //导入依赖的package包/类
public void setCpe(CollectionProcessingEngine cpe) {
    this.cpe = cpe;
}
 
开发者ID:BlueBrain,项目名称:bluima,代码行数:4,代码来源:StatusCallbackListenerSlf4J.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java VoiceInteractor类代码示例发布时间:2022-05-23
下一篇:
Java OAuth2Auth类代码示例发布时间: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