[
https://issues.apache.org/jira/browse/OPENNLP-1154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16278231#comment-16278231
]
ASF GitHub Bot commented on OPENNLP-1154:
-----------------------------------------
kottmann commented on a change in pull request #286: OPENNLP-1154: change the
XML format for feature generator config in N…
URL: https://github.com/apache/opennlp/pull/286#discussion_r154881948
##########
File path:
opennlp-tools/src/main/resources/opennlp/tools/namefind/ner-default-features_classic.xml
##########
@@ -0,0 +1,36 @@
+<!--
+ 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.
+-->
+
+<!-- Default name finder feature generator configuration -->
+<generators>
+ <cache>
+ <generators>
+ <window prevLength = "2" nextLength = "2">
+ <tokenclass/>
+ </window>
+ <window prevLength = "2" nextLength = "2">
+ <token/>
+ </window>
+ <definition/>
+ <prevmap/>
+ <bigram/>
+ <sentence begin="true" end="false"/>
+ </generators>
+ </cache>
+</generators>
Review comment:
new line is missing here
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> change the XML format for feature generator config in NameFinder and POS
> Tagger
> -------------------------------------------------------------------------------
>
> Key: OPENNLP-1154
> URL: https://issues.apache.org/jira/browse/OPENNLP-1154
> Project: OpenNLP
> Issue Type: Improvement
> Components: Name Finder
> Affects Versions: 1.8.3
> Reporter: Koji Sekiguchi
> Assignee: Koji Sekiguchi
>
> NameFinder provides many kinds of feature generator (factories). Users can
> define their config via XML which looks like:
> {code:xml}
> <generators>
> <cache>
> <generators>
> <window prevLength = "2" nextLength = "2">
> <tokenclass/>
> </window>
> <window prevLength = "2" nextLength = "2">
> <token/>
> </window>
> <definition/>
> <prevmap/>
> <bigram/>
> <sentence begin="true" end="false"/>
> </generators>
> </cache>
> </generators>
> {code}
> If a user wants to implement their own feature generator, he can use <custom
> .../>, but if he wants to have two or more feature generators at once, he may
> be able to implement it by providing a wrapper feature generator which wraps
> two or more feature generators that he originally wants to have, but it is
> not good.
> I'd like to suggest that we make the config format more flexible like below:
> {code:xml}
> <generator
> class="opennlp.tools.util.featuregen.AggregatedFeatureGeneratorFactory">
> <args>
> <generator
> class="opennlp.tools.util.featuregen.CachedFeatureGeneratorFactory">
> <args>
> <generator
> class="opennlp.tools.util.featuregen.AggregatedFeatureGeneratorFactory">
> <args>
> <generator
> class="opennlp.tools.util.featuregen.WindowFeatureGeneratorFactory">
> <args>
> <int name="prevLength">2</int>
> <int name="nextLength">2</int>
> <generator
> class="opennlp.tools.util.featuregen.TokenClassFeatureGeneratorFactory"/>
> </args>
> </generator>
> <generator
> class="opennlp.tools.util.featuregen.WindowFeatureGeneratorFactory">
> <args>
> <int name="prevLength">2</int>
> <int name="nextLength">2</int>
> <generator
> class="opennlp.tools.util.featuregen.TokenFeatureGeneratorFactory"/>
> </args>
> </generator>
> </args>
> </generator>
> </args>
> </generator>
> </args>
> </generator>
> {code}
> If <args>...</args> is too noisy, I'm thinking another format as well:
> {code:xml}
> <generator
> class="opennlp.tools.util.featuregen.AggregatedFeatureGeneratorFactory">
> <generator
> class="opennlp.tools.util.featuregen.CachedFeatureGeneratorFactory">
> <generator
> class="opennlp.tools.util.featuregen.AggregatedFeatureGeneratorFactory">
> <generator
> class="opennlp.tools.util.featuregen.WindowFeatureGeneratorFactory">
> <int name="prevLength">2</int>
> <int name="nextLength">2</int>
> <generator
> class="opennlp.tools.util.featuregen.TokenClassFeatureGeneratorFactory"/>
> </generator>
> <generator
> class="opennlp.tools.util.featuregen.WindowFeatureGeneratorFactory">
> <int name="prevLength">2</int>
> <int name="nextLength">2</int>
> <generator
> class="opennlp.tools.util.featuregen.TokenFeatureGeneratorFactory"/>
> </generator>
> </generator>
> </generator>
> </generator>
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)