如何同时处理CAS Multiplier生成的CAS

时间:2014-01-20 15:08:38

标签: uima

我正在使用CASMultiplier和UIMA AS实现UIMA管道。我有一个Segmenter分析引擎(一个CASMultiplier)和一个分析引擎(Annotator A)。我创建了Segmenter和Annotator A的聚合分析引擎,然后我创建了一个有意图的UIMA AS部署描述符文件,Segmenter生成CAS,然后是带有CASes的Annotator A进程。聚合分析引擎描述符文件和部署描述符文件的内容如下:

AAE描述符文件:

    <analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
    <primitive>false</primitive>

    <delegateAnalysisEngineSpecifiers>
        <delegateAnalysisEngine key="Segmenter">
            <import location="../cas_multiplier/SimpleTextSegmenter.xml"/>
        </delegateAnalysisEngine>

        <delegateAnalysisEngine key="AnnotatorA">
            <import location="AnnotatorA.xml"/>
    </delegateAnalysisEngine>
    </delegateAnalysisEngineSpecifiers>

    <analysisEngineMetaData>
        <name>Segmenter and AnnotatorA</name>
        <description>Splits a document into pieces and runs Annotator on each 
            piece independently.  All segments are output.</description>

        <configurationParameters/>
    <configurationParameterSettings/>
    <flowConstraints>
          <fixedFlow>
            <node>Segmenter</node>
            <node>AnnotatorA</node>
          </fixedFlow>
        </flowConstraints>

        <capabilities>
            <capability>
                <inputs/>
                <outputs>
                  <type allAnnotatorFeatures="true">com.trang.uima.types.Target</type>
          <type allAnnotatorFeatures="true">com.eg.uima.types.IntermediateResult</type>
        </outputs>
                <languagesSupported>
                    </languagesSupported>
            </capability>
        </capabilities>
        <operationalProperties>
            <modifiesCas>true</modifiesCas>
            <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
            <outputsNewCASes>true</outputsNewCASes>
        </operationalProperties>
    </analysisEngineMetaData>
</analysisEngineDescription>

部署描述符文件:

    <?xml version="1.0" encoding="UTF-8"?><analysisEngineDeploymentDescription xmlns="http://uima.apache.org/resourceSpecifier">
  <name>SegmenterAndBackTranstion</name>
  <description>Deploys Segmenter and BackTranskation with 3 instances of BackTransation</description>
  <version/>
  <vendor/>
  <deployment protocol="jms" provider="activemq">
    <casPool numberOfCASes="5" initialFsHeapSize="2000000"/>
    <service>
      <inputQueue endpoint="SegmentAnBackTranslationQueue" brokerURL="tcp://localhost:61616" prefetch="0"/>
      <topDescriptor>
<import location="../../descriptors/langrid_uima/SegmenterAndBackTranslationAE.xml"/>
      </topDescriptor>
      <analysisEngine async="false">
        <scaleout numberOfInstances="5"/>
        <casMultiplier poolSize="8" initialFsHeapSize="2000000" processParentLast="false"/>
        <asyncPrimitiveErrorConfiguration>
          <processCasErrors thresholdCount="0" thresholdWindow="0" thresholdAction="terminate"/>
          <collectionProcessCompleteErrors timeout="0" additionalErrorAction="terminate"/>
        </asyncPrimitiveErrorConfiguration>
      </analysisEngine>
    </service>
  </deployment>
</analysisEngineDeploymentDescription>

有了这个设置之后,我运行了管道,但是,看起来CASes是同步处理的,一次一个。 谁能告诉我,做错了什么?有没有办法同时处理CASMultiplier生成的CAS?

非常感谢!

0 个答案:

没有答案