So I've tracked down the issue where POS tags were null in the dependency parser, but not when the Chunker was added to the pipeline. The issue was that the POSTagger uses the subiterator method, which requires priorityList section in the descriptor to work. The POSTagger descriptor is missing it but the Chunker descriptor has it, so loading the Chunker descriptor was allowing the subiterator call in POSTagger to work.

With me so far? I will check in the change to the POS descriptor. But to fully fix I had to re-generate the dependency parser descriptors (using the WriteClearParserDescriptors class). This results in some additional changes to those which are a result of the type priority change (see diff below). Is it safe to check in all of that or just the POS descriptor change and expect others to generate their own dependency descriptors?

Diff:


Index: ctakes-dependency-parser/desc/analysis_engine/ClearParserDependencyParserPlaintextAggregate.xml
===================================================================
--- ctakes-dependency-parser/desc/analysis_engine/ClearParserDependencyParserPlaintextAggregate.xml(revision 1404664) +++ ctakes-dependency-parser/desc/analysis_engine/ClearParserDependencyParserPlaintextAggregate.xml(working copy)
@@ -1,24 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements.  See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership.  The ASF licenses this file
-    to you under the Apache License, Version 2.0 (the
-    "License"); you may not use this file except in compliance
-    with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing,
-    software distributed under the License is distributed on an
-    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-    KIND, either express or implied.  See the License for the
-    specific language governing permissions and limitations
-    under the License.
-
--->
<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier";>
<frameworkImplementation>org.apache.uima.java</frameworkImplementation>
     <primitive>false</primitive>
@@ -42,6 +22,13 @@
<mandatory>false</mandatory>
                         </configurationParameter>
                         <configurationParameter>
+ <name>LemmatizerDataFile</name>
+ <description>This parameter provides the data file required for the MorphEnAnalyzer. If not specified, this analysis engine will use a default model from the resources directory</description>
+                            <type>String</type>
+ <multiValued>false</multiValued>
+ <mandatory>false</mandatory>
+                        </configurationParameter>
+                        <configurationParameter>
<name>ParserAlgorithmName</name>
<description>This parameter provides the algorithm name used by the dependency parser that is required by the factory method provided by ClearParserUtil. If in doubt, do not change from the default value.</description>
                             <type>String</type>
@@ -72,7 +59,7 @@
                     </configurationParameterSettings>
                     <typeSystemDescription>
                         <imports>
- <import name="org.apache.ctakes.typesystem.types.TypeSystem"/> + <import location="../../../ctakes-type-system/src/main/resources/org/apache/ctakes/typesystem/types/TypeSystem.xml"/>
                         </imports>
                     </typeSystemDescription>
                     <fsIndexCollection/>
@@ -363,7 +350,7 @@
                     </configurationParameterSettings>
                     <typeSystemDescription>
                         <imports>
- <import name="org.apache.ctakes.typesystem.types.TypeSystem"/> + <import name="org.apache.ctakes.typesystem.types.TypeSystem"/>
                         </imports>
                     </typeSystemDescription>
                     <typePriorities/>
@@ -555,8 +542,18 @@
                             </value>
                         </nameValuePair>
                     </configurationParameterSettings>
-                    <typeSystemDescription/>
-                    <typePriorities/>
+                    <typeSystemDescription>
+                        <imports>
+ <import name="org.apache.ctakes.typesystem.types.TypeSystem"/>
+                        </imports>
+                    </typeSystemDescription>
+                    <typePriorities>
+                        <priorityList>
+ <type>org.apache.ctakes.typesystem.type.textspan.Segment</type>
+ <type>org.apache.ctakes.typesystem.type.textspan.Sentence</type>
+ <type>org.apache.ctakes.typesystem.type.syntax.BaseToken</type>
+                        </priorityList>
+                    </typePriorities>
                     <fsIndexCollection/>
                     <capabilities>
                         <capability>

Reply via email to