You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by rz...@apache.org on 2023/06/18 10:05:11 UTC

[opennlp] branch OPENNLP-1174 updated (31581629 -> 08a7f43b)

This is an automated email from the ASF dual-hosted git repository.

rzo1 pushed a change to branch OPENNLP-1174
in repository https://gitbox.apache.org/repos/asf/opennlp.git


 discard 31581629 WIP - OPENNLP-1174
 discard 561d725f WIP - OPENNLP-1174
 discard 00635101 WIP - OPENNLP-1174
 discard 14cafe4c WIP - OPENNLP-1174
 discard 52ced908 WIP - OPENNLP-1174
     new 08a7f43b OPENNLP-1174 - Remove classic format support in feature generator XML config

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (31581629)
            \
             N -- N -- N   refs/heads/OPENNLP-1174 (08a7f43b)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:


[opennlp] 01/01: OPENNLP-1174 - Remove classic format support in feature generator XML config

Posted by rz...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rzo1 pushed a commit to branch OPENNLP-1174
in repository https://gitbox.apache.org/repos/asf/opennlp.git

commit 08a7f43b8a64100ae400dc9ec9d9058df44e66e6
Author: Richard Zowalla <ri...@hs-heilbronn.de>
AuthorDate: Fri Jun 16 13:04:20 2023 +0200

    OPENNLP-1174 - Remove classic format support in feature generator XML config
---
 .../opennlp/tools/postag/POSTaggerFactory.java     |  57 +-
 .../AggregatedFeatureGeneratorFactory.java         |  40 +-
 .../featuregen/ArtifactToSerializerMapper.java     |  27 -
 .../BigramNameFeatureGeneratorFactory.java         |  19 +-
 .../BrownClusterBigramFeatureGeneratorFactory.java |  29 +-
 ...wnClusterTokenClassFeatureGeneratorFactory.java |  29 +-
 .../BrownClusterTokenFeatureGeneratorFactory.java  |  29 +-
 .../featuregen/CachedFeatureGeneratorFactory.java  |  43 +-
 .../CharacterNgramFeatureGeneratorFactory.java     |  39 +-
 .../util/featuregen/CustomFeatureGenerator.java    |  35 -
 .../DefinitionFeatureGeneratorFactory.java         |  18 +-
 .../DictionaryFeatureGeneratorFactory.java         |  30 +-
 .../DocumentBeginFeatureGeneratorFactory.java      |  18 +-
 .../tools/util/featuregen/GeneratorFactory.java    | 825 ++++++++-------------
 .../POSTaggerNameFeatureGeneratorFactory.java      |  28 +-
 .../PosTaggerFeatureGeneratorFactory.java          |  18 +-
 .../featuregen/PrefixFeatureGeneratorFactory.java  |  28 +-
 .../PreviousMapFeatureGeneratorFactory.java        |  18 +-
 .../SentenceFeatureGeneratorFactory.java           |  30 +-
 .../featuregen/SuffixFeatureGeneratorFactory.java  |  28 +-
 .../TokenClassFeatureGeneratorFactory.java         |  32 +-
 .../featuregen/TokenFeatureGeneratorFactory.java   |  18 +-
 .../TokenPatternFeatureGeneratorFactory.java       |  18 +-
 .../TrigramNameFeatureGeneratorFactory.java        |  19 +-
 .../featuregen/WindowFeatureGeneratorFactory.java  |  66 +-
 .../WordClusterFeatureGeneratorFactory.java        |  32 +-
 .../namefind/ner-default-features_classic.xml      |  36 -
 .../tools/postag/pos-default-features_classic.xml  |  38 -
 .../FeatureGenWithSerializerMapping.java           |  55 --
 .../GeneratorFactoryClassicFormatTest.java         | 147 ----
 .../tools/namefind/ner-pos-features_classic.xml    |  36 -
 .../CustomClassLoadingWithSerializers_classic.xml  |  22 -
 .../util/featuregen/CustomClassLoading_classic.xml |  22 -
 ...ureGeneratorConfigWithUnkownElement_classic.xml |  26 -
 ...ctionarySerializerMappingExtraction_classic.xml |  22 -
 .../TestFeatureGeneratorConfig_classic.xml         |  25 -
 ...estTokenClassFeatureGeneratorConfig_classic.xml |  24 -
 37 files changed, 358 insertions(+), 1668 deletions(-)

diff --git a/opennlp-tools/src/main/java/opennlp/tools/postag/POSTaggerFactory.java b/opennlp-tools/src/main/java/opennlp/tools/postag/POSTaggerFactory.java
index f8e4017c..c9be3053 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/postag/POSTaggerFactory.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/postag/POSTaggerFactory.java
@@ -68,8 +68,8 @@ public class POSTaggerFactory extends BaseToolFactory {
    * Initializes a {@link POSTaggerFactory} from a given set of the resources.
    *
    * @param featureGeneratorBytes The bytes for feature generation.
-   * @param resources Additional resources as key-value map.
-   * @param posDictionary A {@link TagDictionary} used for the new instance.
+   * @param resources             Additional resources as key-value map.
+   * @param posDictionary         A {@link TagDictionary} used for the new instance.
    */
   public POSTaggerFactory(byte[] featureGeneratorBytes, final Map<String, Object> resources,
                           TagDictionary posDictionary) {
@@ -94,7 +94,8 @@ public class POSTaggerFactory extends BaseToolFactory {
   }
 
   // reduced visibility to ensure deprecation is respected in future versions
-  @Deprecated // will be removed when only 8 series models are supported
+  @Deprecated
+  // will be removed when only 8 series models are supported
   void init(Dictionary ngramDictionary, TagDictionary posDictionary) {
     this.ngramDictionary = ngramDictionary;
     this.posDictionary = posDictionary;
@@ -114,7 +115,7 @@ public class POSTaggerFactory extends BaseToolFactory {
 
     ByteArrayOutputStream bytes = new ByteArrayOutputStream();
     InputStream resource = POSTaggerFactory.class.getResourceAsStream(
-            "/opennlp/tools/postag/pos-default-features.xml");
+        "/opennlp/tools/postag/pos-default-features.xml");
     if (resource == null) {
       throw new IllegalStateException("Classpath must contain 'pos-default-features.xml' file!");
     }
@@ -125,8 +126,7 @@ public class POSTaggerFactory extends BaseToolFactory {
       while ((len = in.read(buf)) > 0) {
         bytes.write(buf, 0, len);
       }
-    }
-    catch (IOException e) {
+    } catch (IOException e) {
       throw new IllegalStateException("Failed reading from 'pos-default-features.xml' file on classpath!");
     }
 
@@ -154,15 +154,12 @@ public class POSTaggerFactory extends BaseToolFactory {
       featureGeneratorBytes = loadDefaultFeatureGeneratorBytes();
     }
 
-    InputStream descriptorIn = new ByteArrayInputStream(featureGeneratorBytes);
-
     AdaptiveFeatureGenerator generator;
-    try {
+    try (InputStream descriptorIn = new ByteArrayInputStream(featureGeneratorBytes)) {
       generator = GeneratorFactory.create(descriptorIn, key -> {
         if (artifactProvider != null) {
           return artifactProvider.getArtifact(key);
-        }
-        else {
+        } else {
           return resources.get(key);
         }
       });
@@ -178,7 +175,7 @@ public class POSTaggerFactory extends BaseToolFactory {
       // that this can only be caused by a programming mistake and therefore
       // throwing a Runtime Exception is reasonable
 
-      throw new IllegalStateException(); // FeatureGeneratorCreationError(e);
+      throw new IllegalStateException(e); // FeatureGeneratorCreationError(e);
     } catch (IOException e) {
       throw new IllegalStateException("Reading from mem cannot result in an I/O error", e);
     }
@@ -202,11 +199,13 @@ public class POSTaggerFactory extends BaseToolFactory {
   public Map<String, Object> createArtifactMap() {
     Map<String, Object> artifactMap = super.createArtifactMap();
 
-    if (posDictionary != null)
+    if (posDictionary != null) {
       artifactMap.put(TAG_DICTIONARY_ENTRY_NAME, posDictionary);
+    }
 
-    if (ngramDictionary != null)
+    if (ngramDictionary != null) {
       artifactMap.put(NGRAM_DICTIONARY_ENTRY_NAME, ngramDictionary);
+    }
 
     return artifactMap;
   }
@@ -216,7 +215,6 @@ public class POSTaggerFactory extends BaseToolFactory {
    *
    * @param dictionary The {@link File} used for creating the dictionary.
    * @return A valid {@link TagDictionary} ready for use.
-   *
    * @throws IOException Thrown if IO errors occurred during creation.
    */
   public TagDictionary createTagDictionary(File dictionary)
@@ -229,7 +227,6 @@ public class POSTaggerFactory extends BaseToolFactory {
    *
    * @param in The {@link InputStream} used for creating the dictionary.
    * @return A valid {@link TagDictionary} ready for use.
-   *
    * @throws IOException Thrown if IO errors occurred during creation.
    */
   public TagDictionary createTagDictionary(InputStream in)
@@ -267,15 +264,17 @@ public class POSTaggerFactory extends BaseToolFactory {
    * @return The {@link TagDictionary} used.
    */
   public TagDictionary getTagDictionary() {
-    if (this.posDictionary == null && artifactProvider != null)
+    if (this.posDictionary == null && artifactProvider != null) {
       this.posDictionary = artifactProvider.getArtifact(TAG_DICTIONARY_ENTRY_NAME);
+    }
     return this.posDictionary;
   }
 
   @Deprecated(forRemoval = true) // will be removed when only 8 series models are supported
   private Dictionary getDictionary() {
-    if (this.ngramDictionary == null && artifactProvider != null)
+    if (this.ngramDictionary == null && artifactProvider != null) {
       this.ngramDictionary = artifactProvider.getArtifact(NGRAM_DICTIONARY_ENTRY_NAME);
+    }
     return this.ngramDictionary;
   }
 
@@ -302,7 +301,7 @@ public class POSTaggerFactory extends BaseToolFactory {
         return new DefaultPOSContextGenerator(cacheSize, getDictionary());
       }
     }
-    
+
     return new ConfigurablePOSContextGenerator(cacheSize, createFeatureGenerators());
   }
 
@@ -333,7 +332,7 @@ public class POSTaggerFactory extends BaseToolFactory {
   }
 
   protected void validatePOSDictionary(POSDictionary posDict, AbstractModel posModel)
-          throws InvalidFormatException {
+      throws InvalidFormatException {
     Set<String> dictTags = new HashSet<>();
 
     for (String word : posDict) {
@@ -392,7 +391,7 @@ public class POSTaggerFactory extends BaseToolFactory {
   // reduced visibility to ensure deprecation is respected in future versions
   @Deprecated
   static POSTaggerFactory create(String subclassName,
-      Dictionary ngramDictionary, TagDictionary posDictionary)
+                                 Dictionary ngramDictionary, TagDictionary posDictionary)
       throws InvalidFormatException {
     if (subclassName == null) {
       // will create the default factory
@@ -413,15 +412,14 @@ public class POSTaggerFactory extends BaseToolFactory {
   /**
    * Instantiates a {@link POSTaggerFactory} via a given {@code subclassName}.
    *
-   * @param subclassName The class name used for instantiation. If {@code null}, an
-   *                     instance of {@link POSTaggerFactory} will be returned
-   *                     per default. Otherwise, the {@link ExtensionLoader} mechanism
-   *                     is applied to load the requested {@code subclassName}.
+   * @param subclassName          The class name used for instantiation. If {@code null}, an
+   *                              instance of {@link POSTaggerFactory} will be returned
+   *                              per default. Otherwise, the {@link ExtensionLoader} mechanism
+   *                              is applied to load the requested {@code subclassName}.
    * @param featureGeneratorBytes The bytes for feature generation.
-   * @param resources Additional resources as key-value map.
-   * @param posDictionary A {@link TagDictionary} used for the new instance.
+   * @param resources             Additional resources as key-value map.
+   * @param posDictionary         A {@link TagDictionary} used for the new instance.
    * @return @return A valid {@link POSTaggerFactory} instance.
-   * 
    * @throws InvalidFormatException Thrown if the {@link ExtensionLoader} mechanism failed to
    *                                load the factory via the {@code subclassName}.
    */
@@ -435,8 +433,7 @@ public class POSTaggerFactory extends BaseToolFactory {
       // will create the default factory
       theFactory = new POSTaggerFactory();
       theFactory.init(featureGeneratorBytes, resources, posDictionary);
-    }
-    else {
+    } else {
       try {
         theFactory = ExtensionLoader.instantiateExtension(POSTaggerFactory.class, subclassName);
       } catch (Exception e) {
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/AggregatedFeatureGeneratorFactory.java b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/AggregatedFeatureGeneratorFactory.java
index 442eba4d..a3f3595c 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/AggregatedFeatureGeneratorFactory.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/AggregatedFeatureGeneratorFactory.java
@@ -18,63 +18,31 @@
 package opennlp.tools.util.featuregen;
 
 import java.util.ArrayList;
-import java.util.Collection;
-import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
 import opennlp.tools.util.InvalidFormatException;
 
 /**
  * @see AggregatedFeatureGenerator
  */
 public class AggregatedFeatureGeneratorFactory
-    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory
-    implements GeneratorFactory.XmlFeatureGeneratorFactory {
+    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory {
 
   public AggregatedFeatureGeneratorFactory() {
     super();
   }
 
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  public AdaptiveFeatureGenerator create(Element generatorElement,
-             FeatureGeneratorResourceProvider resourceManager)  throws InvalidFormatException {
-
-    Collection<AdaptiveFeatureGenerator> aggregatedGenerators = new LinkedList<>();
-
-    NodeList childNodes = generatorElement.getChildNodes();
-
-    for (int i = 0; i < childNodes.getLength(); i++) {
-      Node childNode = childNodes.item(i);
-      if (childNode instanceof Element) {
-        Element aggregatedGeneratorElement = (Element) childNode;
-        aggregatedGenerators.add(
-            GeneratorFactory.createGenerator(aggregatedGeneratorElement, resourceManager));
-      }
-    }
-
-    return new AggregatedFeatureGenerator(aggregatedGenerators.toArray(
-            new AdaptiveFeatureGenerator[0]));
-  }
-
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  static void register(Map<String, GeneratorFactory.XmlFeatureGeneratorFactory> factoryMap) {
-    factoryMap.put("generators", new AggregatedFeatureGeneratorFactory());
-  }
 
   @Override
   public AdaptiveFeatureGenerator create() throws InvalidFormatException {
     List<AdaptiveFeatureGenerator> aggregatedGenerators = new ArrayList<>();
-    for (Map.Entry<String, Object> arg: args.entrySet()) {
+    for (Map.Entry<String, Object> arg : args.entrySet()) {
       if (arg.getKey().startsWith("generator#")) {
-        aggregatedGenerators.add((AdaptiveFeatureGenerator)arg.getValue());
+        aggregatedGenerators.add((AdaptiveFeatureGenerator) arg.getValue());
       }
     }
     return new AggregatedFeatureGenerator(aggregatedGenerators.toArray(
-            new AdaptiveFeatureGenerator[0]));
+        new AdaptiveFeatureGenerator[0]));
   }
 }
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/ArtifactToSerializerMapper.java b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/ArtifactToSerializerMapper.java
deleted file mode 100644
index f4723188..00000000
--- a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/ArtifactToSerializerMapper.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.
- */
-
-package opennlp.tools.util.featuregen;
-
-import java.util.Map;
-
-import opennlp.tools.util.model.ArtifactSerializer;
-
-@Deprecated   // TODO: (OPENNLP-1174) remove back-compat support when it is unnecessary
-public interface ArtifactToSerializerMapper {
-  Map<String, ArtifactSerializer<?>> getArtifactSerializerMapping();
-}
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/BigramNameFeatureGeneratorFactory.java b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/BigramNameFeatureGeneratorFactory.java
index c1f666a6..8b60d8ae 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/BigramNameFeatureGeneratorFactory.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/BigramNameFeatureGeneratorFactory.java
@@ -17,32 +17,15 @@
 
 package opennlp.tools.util.featuregen;
 
-import java.util.Map;
-
-import org.w3c.dom.Element;
-
 import opennlp.tools.util.InvalidFormatException;
 
 public class BigramNameFeatureGeneratorFactory
-    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory
-    implements GeneratorFactory.XmlFeatureGeneratorFactory {
+    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory {
 
   public BigramNameFeatureGeneratorFactory() {
     super();
   }
 
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  public AdaptiveFeatureGenerator create(Element generatorElement,
-             FeatureGeneratorResourceProvider resourceManager) {
-
-    return new BigramNameFeatureGenerator();
-  }
-
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  static void register(Map<String, GeneratorFactory.XmlFeatureGeneratorFactory> factoryMap) {
-    factoryMap.put("bigram", new BigramNameFeatureGeneratorFactory());
-  }
-
   @Override
   public AdaptiveFeatureGenerator create() throws InvalidFormatException {
     return new BigramNameFeatureGenerator();
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/BrownClusterBigramFeatureGeneratorFactory.java b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/BrownClusterBigramFeatureGeneratorFactory.java
index 668a2b92..7c9ee952 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/BrownClusterBigramFeatureGeneratorFactory.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/BrownClusterBigramFeatureGeneratorFactory.java
@@ -20,8 +20,6 @@ package opennlp.tools.util.featuregen;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.w3c.dom.Element;
-
 import opennlp.tools.util.InvalidFormatException;
 import opennlp.tools.util.model.ArtifactSerializer;
 
@@ -29,39 +27,18 @@ import opennlp.tools.util.model.ArtifactSerializer;
  * Generates Brown clustering features for token bigrams.
  */
 public class BrownClusterBigramFeatureGeneratorFactory
-    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory
-    implements GeneratorFactory.XmlFeatureGeneratorFactory {
+    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory {
 
   public BrownClusterBigramFeatureGeneratorFactory() {
     super();
   }
 
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  public AdaptiveFeatureGenerator create(Element generatorElement,
-             FeatureGeneratorResourceProvider resourceManager) throws InvalidFormatException {
-
-    String dictResourceKey = generatorElement.getAttribute("dict");
-
-    Object dictResource = resourceManager.getResource(dictResourceKey);
-
-
-    if (!(dictResource instanceof BrownCluster)) {
-      throw new InvalidFormatException("Not a BrownLexicon resource for key: " + dictResourceKey);
-    }
-
-    return new BrownBigramFeatureGenerator((BrownCluster) dictResource);
-  }
-
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  static void register(Map<String, GeneratorFactory.XmlFeatureGeneratorFactory> factoryMap) {
-    factoryMap.put("brownclusterbigram", new BrownClusterBigramFeatureGeneratorFactory());
-  }
-
   @Override
   public AdaptiveFeatureGenerator create() throws InvalidFormatException {
     // if resourceManager is null, we don't instantiate
-    if (resourceManager == null)
+    if (resourceManager == null) {
       return null;
+    }
 
     String dictResourceKey = getStr("dict");
     Object dictResource = resourceManager.getResource(dictResourceKey);
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/BrownClusterTokenClassFeatureGeneratorFactory.java b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/BrownClusterTokenClassFeatureGeneratorFactory.java
index 905762b3..47bc8390 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/BrownClusterTokenClassFeatureGeneratorFactory.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/BrownClusterTokenClassFeatureGeneratorFactory.java
@@ -20,8 +20,6 @@ package opennlp.tools.util.featuregen;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.w3c.dom.Element;
-
 import opennlp.tools.util.InvalidFormatException;
 import opennlp.tools.util.model.ArtifactSerializer;
 
@@ -29,39 +27,18 @@ import opennlp.tools.util.model.ArtifactSerializer;
  * Generates Brown clustering features for token classes.
  */
 public class BrownClusterTokenClassFeatureGeneratorFactory
-    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory
-    implements GeneratorFactory.XmlFeatureGeneratorFactory {
+    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory {
 
   public BrownClusterTokenClassFeatureGeneratorFactory() {
     super();
   }
 
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  public AdaptiveFeatureGenerator create(Element generatorElement,
-             FeatureGeneratorResourceProvider resourceManager) throws InvalidFormatException {
-
-    String dictResourceKey = generatorElement.getAttribute("dict");
-
-    Object dictResource = resourceManager.getResource(dictResourceKey);
-
-
-    if (!(dictResource instanceof BrownCluster)) {
-      throw new InvalidFormatException("Not a BrownLexicon resource for key: " + dictResourceKey);
-    }
-
-    return new BrownTokenClassFeatureGenerator((BrownCluster) dictResource);
-  }
-
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  static void register(Map<String, GeneratorFactory.XmlFeatureGeneratorFactory> factoryMap) {
-    factoryMap.put("brownclustertokenclass", new BrownClusterTokenClassFeatureGeneratorFactory());
-  }
-
   @Override
   public AdaptiveFeatureGenerator create() throws InvalidFormatException {
     // if resourceManager is null, we don't instantiate
-    if (resourceManager == null)
+    if (resourceManager == null) {
       return null;
+    }
 
     String dictResourceKey = getStr("dict");
     Object dictResource = resourceManager.getResource(dictResourceKey);
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/BrownClusterTokenFeatureGeneratorFactory.java b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/BrownClusterTokenFeatureGeneratorFactory.java
index 3d866ac8..fa3f834f 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/BrownClusterTokenFeatureGeneratorFactory.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/BrownClusterTokenFeatureGeneratorFactory.java
@@ -20,8 +20,6 @@ package opennlp.tools.util.featuregen;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.w3c.dom.Element;
-
 import opennlp.tools.util.InvalidFormatException;
 import opennlp.tools.util.model.ArtifactSerializer;
 
@@ -29,39 +27,18 @@ import opennlp.tools.util.model.ArtifactSerializer;
  * Generates Brown clustering features for current token.
  */
 public class BrownClusterTokenFeatureGeneratorFactory
-    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory
-    implements GeneratorFactory.XmlFeatureGeneratorFactory {
+    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory {
 
   public BrownClusterTokenFeatureGeneratorFactory() {
     super();
   }
 
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  public AdaptiveFeatureGenerator create(Element generatorElement,
-             FeatureGeneratorResourceProvider resourceManager) throws InvalidFormatException {
-
-    String dictResourceKey = generatorElement.getAttribute("dict");
-
-    Object dictResource = resourceManager.getResource(dictResourceKey);
-
-
-    if (!(dictResource instanceof BrownCluster)) {
-      throw new InvalidFormatException("Not a BrownLexicon resource for key: " + dictResourceKey);
-    }
-
-    return new BrownTokenFeatureGenerator((BrownCluster) dictResource);
-  }
-
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  static void register(Map<String, GeneratorFactory.XmlFeatureGeneratorFactory> factoryMap) {
-    factoryMap.put("brownclustertoken", new BrownClusterTokenFeatureGeneratorFactory());
-  }
-
   @Override
   public AdaptiveFeatureGenerator create() throws InvalidFormatException {
     // if resourceManager is null, we don't instantiate
-    if (resourceManager == null)
+    if (resourceManager == null) {
       return null;
+    }
 
     String dictResourceKey = getStr("dict");
     Object dictResource = resourceManager.getResource(dictResourceKey);
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/CachedFeatureGeneratorFactory.java b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/CachedFeatureGeneratorFactory.java
index e59b4490..70c0610e 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/CachedFeatureGeneratorFactory.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/CachedFeatureGeneratorFactory.java
@@ -18,60 +18,21 @@
 package opennlp.tools.util.featuregen;
 
 
-import java.util.Map;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
 import opennlp.tools.util.InvalidFormatException;
 
 /**
  * @see CachedFeatureGenerator
  */
 public class CachedFeatureGeneratorFactory
-    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory
-    implements GeneratorFactory.XmlFeatureGeneratorFactory {
+    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory {
 
   public CachedFeatureGeneratorFactory() {
     super();
   }
 
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  public AdaptiveFeatureGenerator create(Element generatorElement,
-             FeatureGeneratorResourceProvider resourceManager) throws InvalidFormatException {
-
-    Element cachedGeneratorElement = null;
-
-    NodeList kids = generatorElement.getChildNodes();
-
-    for (int i = 0; i < kids.getLength(); i++) {
-      Node childNode = kids.item(i);
-
-      if (childNode instanceof Element) {
-        cachedGeneratorElement = (Element) childNode;
-        break;
-      }
-    }
-
-    if (cachedGeneratorElement == null) {
-      throw new InvalidFormatException("Could not find containing generator element!");
-    }
-
-    AdaptiveFeatureGenerator cachedGenerator =
-        GeneratorFactory.createGenerator(cachedGeneratorElement, resourceManager);
-
-    return new CachedFeatureGenerator(cachedGenerator);
-  }
-
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  static void register(Map<String, GeneratorFactory.XmlFeatureGeneratorFactory> factoryMap) {
-    factoryMap.put("cache", new CachedFeatureGeneratorFactory());
-  }
-
   @Override
   public AdaptiveFeatureGenerator create() throws InvalidFormatException {
-    AdaptiveFeatureGenerator generator = (AdaptiveFeatureGenerator)args.get("generator#0");
+    AdaptiveFeatureGenerator generator = (AdaptiveFeatureGenerator) args.get("generator#0");
     if (generator == null) {
       throw new InvalidFormatException("Could not find containing generator element!");
     }
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/CharacterNgramFeatureGeneratorFactory.java b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/CharacterNgramFeatureGeneratorFactory.java
index b3756262..f449f8db 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/CharacterNgramFeatureGeneratorFactory.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/CharacterNgramFeatureGeneratorFactory.java
@@ -17,55 +17,18 @@
 
 package opennlp.tools.util.featuregen;
 
-import java.util.Map;
-
-import org.w3c.dom.Element;
-
 import opennlp.tools.util.InvalidFormatException;
 
 /**
  * @see CharacterNgramFeatureGenerator
  */
 public class CharacterNgramFeatureGeneratorFactory
-    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory
-    implements GeneratorFactory.XmlFeatureGeneratorFactory {
+    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory {
 
   public CharacterNgramFeatureGeneratorFactory() {
     super();
   }
 
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  public AdaptiveFeatureGenerator create(Element generatorElement,
-             FeatureGeneratorResourceProvider resourceManager) throws InvalidFormatException {
-
-    String minString = generatorElement.getAttribute("min");
-
-    int min;
-
-    try {
-      min = Integer.parseInt(minString);
-    } catch (NumberFormatException e) {
-      throw new InvalidFormatException("min attribute '" + minString + "' is not a number!", e);
-    }
-
-    String maxString = generatorElement.getAttribute("max");
-
-    int max;
-
-    try {
-      max = Integer.parseInt(maxString);
-    } catch (NumberFormatException e) {
-      throw new InvalidFormatException("max attribute '" + maxString + "' is not a number!", e);
-    }
-
-    return new CharacterNgramFeatureGenerator(min, max);
-  }
-
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  static void register(Map<String, GeneratorFactory.XmlFeatureGeneratorFactory> factoryMap) {
-    factoryMap.put("charngram", new CharacterNgramFeatureGeneratorFactory());
-  }
-
   @Override
   public AdaptiveFeatureGenerator create() throws InvalidFormatException {
     return new CharacterNgramFeatureGenerator(getInt("min"), getInt("max"));
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/CustomFeatureGenerator.java b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/CustomFeatureGenerator.java
deleted file mode 100644
index d8f9c39d..00000000
--- a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/CustomFeatureGenerator.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.
- */
-
-package opennlp.tools.util.featuregen;
-
-import java.util.Map;
-
-import opennlp.tools.util.InvalidFormatException;
-
-@Deprecated   // TODO: (OPENNLP-1174) remove back-compat support when it is unnecessary
-public abstract class CustomFeatureGenerator implements AdaptiveFeatureGenerator {
-
-  /**
-   * Initializes {@link CustomFeatureGenerator} with defined properties and loaded resources.
-   *
-   * @param properties The {@link Map} properties to use.
-   * @param resourceProvider The {@link FeatureGeneratorResourceProvider} to use.
-   */
-  public abstract void init(Map<String, String> properties, FeatureGeneratorResourceProvider resourceProvider)
-        throws InvalidFormatException;
-}
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/DefinitionFeatureGeneratorFactory.java b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/DefinitionFeatureGeneratorFactory.java
index e33bacb7..cbe8ce4f 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/DefinitionFeatureGeneratorFactory.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/DefinitionFeatureGeneratorFactory.java
@@ -17,18 +17,13 @@
 
 package opennlp.tools.util.featuregen;
 
-import java.util.Map;
-
-import org.w3c.dom.Element;
-
 import opennlp.tools.util.InvalidFormatException;
 
 /**
  * @see DefinitionFeatureGeneratorFactory
  */
 public class DefinitionFeatureGeneratorFactory
-    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory
-    implements GeneratorFactory.XmlFeatureGeneratorFactory {
+    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory {
 
   private static final String ELEMENT_NAME = "definition";
 
@@ -36,17 +31,6 @@ public class DefinitionFeatureGeneratorFactory
     super();
   }
 
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  public AdaptiveFeatureGenerator create(Element generatorElement,
-             FeatureGeneratorResourceProvider resourceManager) throws InvalidFormatException {
-    return new OutcomePriorFeatureGenerator();
-  }
-
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  static void register(Map<String, GeneratorFactory.XmlFeatureGeneratorFactory> factoryMap) {
-    factoryMap.put(ELEMENT_NAME, new DefinitionFeatureGeneratorFactory());
-  }
-
   @Override
   public AdaptiveFeatureGenerator create() throws InvalidFormatException {
     return new OutcomePriorFeatureGenerator();
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/DictionaryFeatureGeneratorFactory.java b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/DictionaryFeatureGeneratorFactory.java
index 50b70e84..72b253b5 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/DictionaryFeatureGeneratorFactory.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/DictionaryFeatureGeneratorFactory.java
@@ -20,8 +20,6 @@ package opennlp.tools.util.featuregen;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.w3c.dom.Element;
-
 import opennlp.tools.dictionary.Dictionary;
 import opennlp.tools.util.InvalidFormatException;
 import opennlp.tools.util.model.ArtifactSerializer;
@@ -31,40 +29,18 @@ import opennlp.tools.util.model.DictionarySerializer;
  * @see DictionaryFeatureGenerator
  */
 public class DictionaryFeatureGeneratorFactory
-    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory
-    implements GeneratorFactory.XmlFeatureGeneratorFactory {
+    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory {
 
   public DictionaryFeatureGeneratorFactory() {
     super();
   }
 
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  public AdaptiveFeatureGenerator create(Element generatorElement,
-             FeatureGeneratorResourceProvider resourceManager) throws InvalidFormatException {
-
-    String dictResourceKey = generatorElement.getAttribute("dict");
-
-    Object dictResource = resourceManager.getResource(dictResourceKey);
-
-    if (!(dictResource instanceof Dictionary)) {
-      throw new InvalidFormatException("No dictionary resource for key: " + dictResourceKey);
-    }
-
-    String prefix = generatorElement.getAttribute("prefix");
-
-    return new DictionaryFeatureGenerator(prefix, (Dictionary) dictResource);
-  }
-
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  static void register(Map<String, GeneratorFactory.XmlFeatureGeneratorFactory> factoryMap) {
-    factoryMap.put("dictionary", new DictionaryFeatureGeneratorFactory());
-  }
-
   @Override
   public AdaptiveFeatureGenerator create() throws InvalidFormatException {
     // if resourceManager is null, we don't instantiate
-    if (resourceManager == null)
+    if (resourceManager == null) {
       return null;
+    }
 
     String dictResourceKey = getStr("dict");
     Object dictResource = resourceManager.getResource(dictResourceKey);
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/DocumentBeginFeatureGeneratorFactory.java b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/DocumentBeginFeatureGeneratorFactory.java
index 8256f8ee..419d4b25 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/DocumentBeginFeatureGeneratorFactory.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/DocumentBeginFeatureGeneratorFactory.java
@@ -17,31 +17,15 @@
 
 package opennlp.tools.util.featuregen;
 
-import java.util.Map;
-
-import org.w3c.dom.Element;
-
 import opennlp.tools.util.InvalidFormatException;
 
 public class DocumentBeginFeatureGeneratorFactory
-    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory
-    implements GeneratorFactory.XmlFeatureGeneratorFactory {
+    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory {
 
   public DocumentBeginFeatureGeneratorFactory() {
     super();
   }
 
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  public AdaptiveFeatureGenerator create(Element generatorElement,
-             FeatureGeneratorResourceProvider resourceManager) {
-    return new DocumentBeginFeatureGenerator();
-  }
-
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  static void register(Map<String, GeneratorFactory.XmlFeatureGeneratorFactory> factoryMap) {
-    factoryMap.put("docbegin", new DocumentBeginFeatureGeneratorFactory());
-  }
-
   @Override
   public AdaptiveFeatureGenerator create() throws InvalidFormatException {
     return new DocumentBeginFeatureGenerator();
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/GeneratorFactory.java b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/GeneratorFactory.java
index 9b957af3..ccd0c5c4 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/GeneratorFactory.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/GeneratorFactory.java
@@ -34,7 +34,6 @@ import javax.xml.xpath.XPathExpressionException;
 import javax.xml.xpath.XPathFactory;
 
 import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 import org.w3c.dom.Text;
@@ -42,10 +41,7 @@ import org.xml.sax.SAXException;
 
 import opennlp.tools.util.InvalidFormatException;
 import opennlp.tools.util.XmlUtil;
-import opennlp.tools.util.ext.ExtensionLoader;
 import opennlp.tools.util.model.ArtifactSerializer;
-import opennlp.tools.util.model.DictionarySerializer;
-import opennlp.tools.util.model.POSModelSerializer;
 
 /**
  * Creates a set of feature generators based on a provided XML descriptor.
@@ -74,15 +70,11 @@ import opennlp.tools.util.model.POSModelSerializer;
  *     &lt;/generator&gt;
  * &lt;/featureGenerators&gt;
  * </p>
- *
- * Each XML element is mapped to a {@link GeneratorFactory.XmlFeatureGeneratorFactory} which
+ * Each XML element is mapped to a {@link GeneratorFactory.AbstractXmlFeatureGeneratorFactory} which
  * is responsible to process the element and create the specified
  * {@link AdaptiveFeatureGenerator}. Elements can contain other
  * elements in this case it is the responsibility of the mapped factory to process
- * the child elements correctly. In some factories this leads to recursive
- * calls the
- * {@link GeneratorFactory.XmlFeatureGeneratorFactory#create(Element, FeatureGeneratorResourceProvider)}
- * method.
+ * the child elements correctly.
  * <p>
  * In the example above the generators element is mapped to the
  * {@link AggregatedFeatureGeneratorFactory} which then
@@ -95,25 +87,235 @@ import opennlp.tools.util.model.POSModelSerializer;
 public class GeneratorFactory {
 
   /**
-   * The {@link XmlFeatureGeneratorFactory} is responsible to construct
-   * an {@link AdaptiveFeatureGenerator} from an given XML {@link Element}
-   * which contains all necessary configuration if any.
+   * Creates an {@link AdaptiveFeatureGenerator} from an provided XML descriptor.
+   * <p>
+   * Usually this XML descriptor contains a set of nested feature generators
+   * which are then used to generate the features by one of the opennlp
+   * components.
+   *
+   * @param xmlDescriptorIn the {@link InputStream} from which the descriptor
+   *                        is read, the stream remains open and must be closed by the caller.
+   * @param resourceManager the resource manager which is used to resolve resources
+   *                        referenced by a key in the descriptor
+   * @return created feature generators
+   * @throws IOException if an error occurs during reading from the descriptor
+   *                     {@link InputStream}
    */
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  interface XmlFeatureGeneratorFactory {
+  public static AdaptiveFeatureGenerator create(InputStream xmlDescriptorIn,
+                                                FeatureGeneratorResourceProvider resourceManager)
+      throws IOException {
 
-    /**
-     * Creates an {@link AdaptiveFeatureGenerator} from a the describing
-     * XML element.
-     *
-     * @param generatorElement the element which contains the configuration
-     * @param resourceManager the resource manager which could be used
-     *     to access referenced resources
-     *
-     * @return the configured {@link AdaptiveFeatureGenerator}
-     */
-    AdaptiveFeatureGenerator create(Element generatorElement,
-        FeatureGeneratorResourceProvider resourceManager) throws InvalidFormatException;
+    final org.w3c.dom.Document xmlDescriptorDOM = createDOM(xmlDescriptorIn);
+    final Element generatorElement = xmlDescriptorDOM.getDocumentElement();
+
+    return createGenerator(generatorElement, resourceManager);
+  }
+
+  /**
+   * Creates a {@link AdaptiveFeatureGenerator} for the provided element.
+   * To accomplish this it looks up the corresponding factory by the
+   * element tag name. The factory is then responsible for the creation
+   * of the generator from the element.
+   *
+   * @param generatorElement must not be {@code null}
+   * @param resourceManager  may be {@code null}
+   * @return a {@link AdaptiveFeatureGenerator}
+   */
+  private static AdaptiveFeatureGenerator buildGenerator(Element generatorElement,
+                                                         FeatureGeneratorResourceProvider resourceManager)
+      throws InvalidFormatException {
+
+    if (generatorElement == null) {
+      throw new IllegalArgumentException("generatorElement must not be NULL");
+    }
+
+    final String className = generatorElement.getAttribute("class");
+    if (className.isBlank()) {
+      throw new InvalidFormatException("generator must have class attribute");
+    } else {
+      try {
+        final Class<?> factoryClass = Class.forName(className);
+        try {
+          final Constructor<?> constructor = factoryClass.getConstructor();
+          final AbstractXmlFeatureGeneratorFactory factory =
+              (AbstractXmlFeatureGeneratorFactory) constructor.newInstance();
+          factory.init(generatorElement, resourceManager);
+          return factory.create();
+        } catch (NoSuchMethodException | InvocationTargetException | InstantiationException
+                 | IllegalAccessException e) {
+          throw new RuntimeException(e);
+        }
+      } catch (ClassNotFoundException e) {
+        throw new RuntimeException(e);
+      }
+    }
+  }
+
+  /**
+   * Creates a {@link AdaptiveFeatureGenerator} for the provided element.
+   * To accomplish this it looks up the corresponding factory by the
+   * element tag name. The factory is then responsible for the creation
+   * of the generator from the element.
+   *
+   * @param generatorElement must not be {@code null}
+   * @param resourceManager  may be {@code null}
+   * @return a {@link AdaptiveFeatureGenerator}
+   */
+  private static AdaptiveFeatureGenerator createGenerator(Element generatorElement,
+                                                          FeatureGeneratorResourceProvider resourceManager)
+      throws InvalidFormatException {
+
+    if (generatorElement == null) {
+      throw new IllegalArgumentException("generatorElement must not be NULL");
+    }
+
+    final String elementName = generatorElement.getTagName();
+
+    // check it is new format?
+    if ("featureGenerators".equals(elementName)) {
+
+      final List<AdaptiveFeatureGenerator> generators = new ArrayList<>();
+      final NodeList childNodes = generatorElement.getChildNodes();
+      for (int i = 0; i < childNodes.getLength(); i++) {
+        final Node childNode = childNodes.item(i);
+        if (childNode instanceof Element elem) {
+          final String type = elem.getTagName();
+          if ("generator".equals(type)) {
+            generators.add(buildGenerator(elem, resourceManager));
+          } else {
+            throw new InvalidFormatException("Unexpected element: " + elementName);
+          }
+        }
+      }
+
+      AdaptiveFeatureGenerator featureGenerator;
+      if (generators.size() == 1) {
+        featureGenerator = generators.get(0);
+      } else if (generators.size() > 1) {
+        featureGenerator = new AggregatedFeatureGenerator(generators.toArray(
+            new AdaptiveFeatureGenerator[0]));
+      } else {
+        throw new InvalidFormatException("featureGenerators must have one or more generators");
+      }
+
+      // disallow manually specifying CachedFeatureGenerator
+      if (featureGenerator instanceof CachedFeatureGenerator) {
+        throw new InvalidFormatException("CachedFeatureGeneratorFactory cannot be specified manually." +
+            "Use cache=\"true\" attribute in featureGenerators element instead.");
+      }
+
+      // check cache usage
+      if (Boolean.parseBoolean(generatorElement.getAttribute("cache"))) {
+        return new CachedFeatureGenerator(featureGenerator);
+      } else {
+        return featureGenerator;
+      }
+    } else {
+      throw new IllegalArgumentException(
+          "[OPENNLP-1174] - Classic configuration format is no longer supported!");
+    }
+  }
+
+  private static org.w3c.dom.Document createDOM(InputStream xmlDescriptorIn)
+      throws IOException {
+
+    final DocumentBuilder documentBuilder = XmlUtil.createDocumentBuilder();
+
+    org.w3c.dom.Document xmlDescriptorDOM;
+
+    try {
+      xmlDescriptorDOM = documentBuilder.parse(xmlDescriptorIn);
+    } catch (SAXException e) {
+      throw new InvalidFormatException("Descriptor is not valid XML!", e);
+    }
+    return xmlDescriptorDOM;
+  }
+
+  public static Map<String, ArtifactSerializer<?>> extractArtifactSerializerMappings(
+      InputStream xmlDescriptorIn) throws IOException {
+
+    final org.w3c.dom.Document xmlDescriptorDOM = createDOM(xmlDescriptorIn);
+    final Element element = xmlDescriptorDOM.getDocumentElement();
+
+    final String elementName = element.getTagName();
+
+    // check it is new format?
+    if ("featureGenerators".equals(elementName)) {
+      return addMappingsFromXmlChildren(element.getChildNodes(), new HashMap<>());
+    } else {
+      throw new IllegalArgumentException(
+          "[OPENNLP-1174] - Classic configuration format is no longer supported!");
+    }
+  }
+
+  private static void extractArtifactSerializerMappings(
+      Map<String, ArtifactSerializer<?>> mapping, Element element) {
+    final String className = element.getAttribute("class");
+    if (!className.isBlank()) {
+      try {
+        final Class<?> factoryClass = Class.forName(className);
+        try {
+          final Constructor<?> constructor = factoryClass.getConstructor();
+          final AbstractXmlFeatureGeneratorFactory factory =
+              (AbstractXmlFeatureGeneratorFactory) constructor.newInstance();
+          factory.init(element, null);
+          final Map<String, ArtifactSerializer<?>> map = factory.getArtifactSerializerMapping();
+          if (map != null) {
+            mapping.putAll(map);
+          }
+        } catch (NoSuchMethodException | InvocationTargetException | InstantiationException
+                 | IllegalAccessException e) {
+          throw new RuntimeException(e);
+        } catch (InvalidFormatException ignored) {
+        }
+      } catch (ClassNotFoundException e) {
+        throw new RuntimeException(e);
+      }
+    }
+
+    addMappingsFromXmlChildren(element.getChildNodes(), mapping);
+  }
+
+  private static Map<String, ArtifactSerializer<?>> addMappingsFromXmlChildren(
+      final NodeList nodes, final Map<String, ArtifactSerializer<?>> mapping) {
+    for (int i = 0; i < nodes.getLength(); i++) {
+      if (nodes.item(i) instanceof Element childElem) {
+        if ("generator".equals(childElem.getTagName())) {
+          extractArtifactSerializerMappings(mapping, childElem);
+        }
+      }
+    }
+    return mapping;
+  }
+
+  /**
+   * Provides a list with all the elements in the xml feature descriptor.
+   *
+   * @param xmlDescriptorIn the xml feature descriptor
+   * @return a list containing all elements
+   * @throws IOException            if inputstream cannot be open
+   * @throws InvalidFormatException if xml is not well-formed
+   */
+  public static List<Element> getDescriptorElements(InputStream xmlDescriptorIn)
+      throws IOException {
+
+    final List<Element> elements = new ArrayList<>();
+    final org.w3c.dom.Document xmlDescriptorDOM = createDOM(xmlDescriptorIn);
+    final XPath xPath = XPathFactory.newInstance().newXPath();
+    NodeList allElements;
+    try {
+      final XPathExpression exp = xPath.compile("//*");
+      allElements = (NodeList) exp.evaluate(xmlDescriptorDOM.getDocumentElement(), XPathConstants.NODESET);
+    } catch (XPathExpressionException e) {
+      throw new IllegalStateException("The hard coded XPath expression should always be valid!");
+    }
+
+    for (int i = 0; i < allElements.getLength(); i++) {
+      if (allElements.item(i) instanceof Element customElement) {
+        elements.add(customElement);
+      }
+    }
+    return elements;
   }
 
   public static abstract class AbstractXmlFeatureGeneratorFactory {
@@ -128,8 +330,7 @@ public class GeneratorFactory {
       args = new LinkedHashMap<>();
     }
 
-    public Map<String, ArtifactSerializer<?>>
-        getArtifactSerializerMapping() throws InvalidFormatException {
+    public Map<String, ArtifactSerializer<?>> getArtifactSerializerMapping() throws InvalidFormatException {
       return null;
     }
 
@@ -141,44 +342,30 @@ public class GeneratorFactory {
       NodeList childNodes = generatorElement.getChildNodes();
       for (int i = 0; i < childNodes.getLength(); i++) {
         Node childNode = childNodes.item(i);
-        if (childNode instanceof Element) {
-          Element elem = (Element)childNode;
+        if (childNode instanceof Element elem) {
           String type = elem.getTagName();
           if (type.equals("generator")) {
             String key = "generator#" + generators.size();
             AdaptiveFeatureGenerator afg = buildGenerator(elem, resourceManager);
             generators.add(afg);
-            if (afg != null)
+            if (afg != null) {
               args.put(key, afg);
-          }
-          else {
+            }
+          } else {
             String name = elem.getAttribute("name");
             Node cn = elem.getFirstChild();
-            Text text = (Text)cn;
+            Text text = (Text) cn;
 
             switch (type) {
-              case "int" :
-                args.put(name, Integer.parseInt(text.getWholeText()));
-                break;
-              case "long" :
-                args.put(name, Long.parseLong(text.getWholeText()));
-                break;
-              case "float" :
-                args.put(name, Float.parseFloat(text.getWholeText()));
-                break;
-              case "double" :
-                args.put(name, Double.parseDouble(text.getWholeText()));
-                break;
-              case "str" :
-                args.put(name, text.getWholeText());
-                break;
-              case "bool" :
-                args.put(name, Boolean.parseBoolean(text.getWholeText()));
-                break;
-              default:
-                throw new InvalidFormatException(
-                    "child element must be one of generator, int, long, float, double," +
-                        " str or bool");
+              case "int" -> args.put(name, Integer.parseInt(text.getWholeText()));
+              case "long" -> args.put(name, Long.parseLong(text.getWholeText()));
+              case "float" -> args.put(name, Float.parseFloat(text.getWholeText()));
+              case "double" -> args.put(name, Double.parseDouble(text.getWholeText()));
+              case "str" -> args.put(name, text.getWholeText());
+              case "bool" -> args.put(name, Boolean.parseBoolean(text.getWholeText()));
+              default -> throw new InvalidFormatException(
+                  "child element must be one of generator, int, long, float, double," +
+                      " str or bool");
             }
           }
         }
@@ -187,137 +374,117 @@ public class GeneratorFactory {
       if (generators.size() > 1) {
         AdaptiveFeatureGenerator aggregatedFeatureGenerator =
             new AggregatedFeatureGenerator(generators.toArray(
-                    new AdaptiveFeatureGenerator[0]));
+                new AdaptiveFeatureGenerator[0]));
         args.put("generator#0", aggregatedFeatureGenerator);
       }
     }
 
     public int getInt(String name) throws InvalidFormatException {
-      Object value = args.get(name);
+      final Object value = args.get(name);
       if (value == null) {
         throw new InvalidFormatException("parameter " + name + " must be set!");
-      }
-      else if (value instanceof Integer) {
-        return (Integer)value;
-      }
-      else {
+      } else if (value instanceof Integer) {
+        return (Integer) value;
+      } else {
         throw new InvalidFormatException("parameter " + name + " must be integer!");
       }
     }
 
     public int getInt(String name, int defValue) throws InvalidFormatException {
-      Object value = args.get(name);
+      final Object value = args.get(name);
       if (value == null) {
         return defValue;
-      }
-      else if (value instanceof Integer) {
-        return (Integer)value;
-      }
-      else {
+      } else if (value instanceof Integer) {
+        return (Integer) value;
+      } else {
         throw new InvalidFormatException("parameter " + name + " must be integer!");
       }
     }
 
     public long getLong(String name) throws InvalidFormatException {
-      Object value = args.get(name);
+      final Object value = args.get(name);
       if (value == null) {
         throw new InvalidFormatException("parameter " + name + " must be set!");
-      }
-      else if (value instanceof Long) {
-        return (Long)value;
-      }
-      else {
+      } else if (value instanceof Long) {
+        return (Long) value;
+      } else {
         throw new InvalidFormatException("parameter " + name + " must be long!");
       }
     }
 
     public long getLong(String name, long defValue) throws InvalidFormatException {
-      Object value = args.get(name);
+      final Object value = args.get(name);
       if (value == null) {
         return defValue;
-      }
-      else if (value instanceof Long) {
-        return (Long)value;
-      }
-      else {
+      } else if (value instanceof Long) {
+        return (Long) value;
+      } else {
         throw new InvalidFormatException("parameter " + name + " must be long!");
       }
     }
 
     public float getFloat(String name) throws InvalidFormatException {
-      Object value = args.get(name);
+      final Object value = args.get(name);
       if (value == null) {
         throw new InvalidFormatException("parameter " + name + " must be set!");
-      }
-      else if (value instanceof Float) {
-        return (Float)value;
-      }
-      else {
+      } else if (value instanceof Float) {
+        return (Float) value;
+      } else {
         throw new InvalidFormatException("parameter " + name + " must be float!");
       }
     }
 
     public float getFloat(String name, float defValue) throws InvalidFormatException {
-      Object value = args.get(name);
+      final Object value = args.get(name);
       if (value == null) {
         return defValue;
-      }
-      else if (value instanceof Float) {
-        return (Float)value;
-      }
-      else {
+      } else if (value instanceof Float) {
+        return (Float) value;
+      } else {
         throw new InvalidFormatException("parameter " + name + " must be float!");
       }
     }
 
     public double getDouble(String name) throws InvalidFormatException {
-      Object value = args.get(name);
+      final Object value = args.get(name);
       if (value == null) {
         throw new InvalidFormatException("parameter " + name + " must be set!");
-      }
-      else if (value instanceof Double) {
-        return (Double)value;
-      }
-      else {
+      } else if (value instanceof Double) {
+        return (Double) value;
+      } else {
         throw new InvalidFormatException("parameter " + name + " must be double!");
       }
     }
 
     public double getDouble(String name, double defValue) throws InvalidFormatException {
-      Object value = args.get(name);
+      final Object value = args.get(name);
       if (value == null) {
         return defValue;
-      }
-      else if (value instanceof Double) {
-        return (Double)value;
-      }
-      else {
+      } else if (value instanceof Double) {
+        return (Double) value;
+      } else {
         throw new InvalidFormatException("parameter " + name + " must be double!");
       }
     }
 
     public String getStr(String name) throws InvalidFormatException {
-      Object value = args.get(name);
+      final Object value = args.get(name);
       if (value == null) {
         throw new InvalidFormatException("parameter " + name + " must be set!");
-      }
-      else if (value instanceof String) {
-        return (String)value;
-      }
-      else {
+      } else if (value instanceof String) {
+        return (String) value;
+      } else {
         throw new InvalidFormatException("parameter " + name + " must be double!");
       }
     }
 
     public String getStr(String name, String defValue) throws InvalidFormatException {
-      Object value = args.get(name);
+      final Object value = args.get(name);
       if (value == null) {
         return defValue;
-      }
-      else if (value instanceof String) {
-        return (String)value;
-      }
-      else {
+      } else if (value instanceof String) {
+        return (String) value;
+      } else {
         throw new InvalidFormatException("parameter " + name + " must be String!");
       }
     }
@@ -326,11 +493,9 @@ public class GeneratorFactory {
       Object value = args.get(name);
       if (value == null) {
         throw new InvalidFormatException("parameter " + name + " must be set!");
-      }
-      else if (value instanceof Boolean) {
-        return (Boolean)value;
-      }
-      else {
+      } else if (value instanceof Boolean) {
+        return (Boolean) value;
+      } else {
         throw new InvalidFormatException("parameter " + name + " must be boolean!");
       }
     }
@@ -339,425 +504,17 @@ public class GeneratorFactory {
       Object value = args.get(name);
       if (value == null) {
         return defValue;
-      }
-      else if (value instanceof Boolean) {
-        return (Boolean)value;
-      }
-      else {
+      } else if (value instanceof Boolean) {
+        return (Boolean) value;
+      } else {
         throw new InvalidFormatException("parameter " + name + " must be boolean!");
       }
     }
 
     /**
-     *
      * @return null if the subclass uses {@link #resourceManager} to instantiate
      * @throws InvalidFormatException
      */
     public abstract AdaptiveFeatureGenerator create() throws InvalidFormatException;
   }
-
-  // TODO: We have to support custom resources here. How does it work ?!
-  // Attributes get into a Map<String, String> properties
-
-  // How can serialization be supported ?!
-  // The model is loaded, and the manifest should contain all serializer classes registered for the
-  // resources by name.
-  // When training, the descriptor could be consulted first to register the serializers, and afterwards
-  // they are stored in the model.
-
-  // TODO: (OPENNLP-1174) just remove this class when back-compat is no longer needed
-  static class CustomFeatureGeneratorFactory implements XmlFeatureGeneratorFactory {
-
-    public AdaptiveFeatureGenerator create(Element generatorElement,
-        FeatureGeneratorResourceProvider resourceManager) throws InvalidFormatException {
-
-      String featureGeneratorClassName = generatorElement.getAttribute("class");
-
-      AdaptiveFeatureGenerator generator =
-          ExtensionLoader.instantiateExtension(AdaptiveFeatureGenerator.class, featureGeneratorClassName);
-
-      if (generator instanceof CustomFeatureGenerator) {
-
-        CustomFeatureGenerator customGenerator = (CustomFeatureGenerator) generator;
-
-        Map<String, String> properties = new HashMap<>();
-
-        NamedNodeMap attributes = generatorElement.getAttributes();
-
-        for (int i = 0; i < attributes.getLength(); i++) {
-          Node attribute = attributes.item(i);
-          if (!"class".equals(attribute.getNodeName())) {
-            properties.put(attribute.getNodeName(), attribute.getNodeValue());
-          }
-        }
-
-        if (resourceManager != null) {
-          customGenerator.init(properties, resourceManager);
-        }
-      }
-
-      return generator;
-    }
-
-    static void register(Map<String, XmlFeatureGeneratorFactory> factoryMap) {
-      factoryMap.put("custom", new CustomFeatureGeneratorFactory());
-    }
-  }
-
-  // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  private final static Map<String, XmlFeatureGeneratorFactory> factories = new HashMap<>();
-
-  // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  static {
-    AggregatedFeatureGeneratorFactory.register(factories);
-    CachedFeatureGeneratorFactory.register(factories);
-    CharacterNgramFeatureGeneratorFactory.register(factories);
-    DefinitionFeatureGeneratorFactory.register(factories);
-    DictionaryFeatureGeneratorFactory.register(factories);
-    DocumentBeginFeatureGeneratorFactory.register(factories);
-    PreviousMapFeatureGeneratorFactory.register(factories);
-    SentenceFeatureGeneratorFactory.register(factories);
-    TokenClassFeatureGeneratorFactory.register(factories);
-    TokenFeatureGeneratorFactory.register(factories);
-    BigramNameFeatureGeneratorFactory.register(factories);
-    TokenPatternFeatureGeneratorFactory.register(factories);
-    PosTaggerFeatureGeneratorFactory.register(factories);
-    PrefixFeatureGeneratorFactory.register(factories);
-    SuffixFeatureGeneratorFactory.register(factories);
-    WindowFeatureGeneratorFactory.register(factories);
-    WordClusterFeatureGeneratorFactory.register(factories);
-    BrownClusterTokenFeatureGeneratorFactory.register(factories);
-    BrownClusterTokenClassFeatureGeneratorFactory.register(factories);
-    BrownClusterBigramFeatureGeneratorFactory.register(factories);
-    CustomFeatureGeneratorFactory.register(factories);
-    POSTaggerNameFeatureGeneratorFactory.register(factories);
-  }
-
-  /**
-   * Creates a {@link AdaptiveFeatureGenerator} for the provided element.
-   * To accomplish this it looks up the corresponding factory by the
-   * element tag name. The factory is then responsible for the creation
-   * of the generator from the element.
-   *
-   * @param generatorElement
-   * @param resourceManager
-   *
-   * @return
-   */
-  @Deprecated   // TODO: (OPENNLP-1174) remove back-compat support when it is unnecessary
-  static AdaptiveFeatureGenerator createGenerator(Element generatorElement,
-      FeatureGeneratorResourceProvider resourceManager) throws InvalidFormatException {
-
-    String elementName = generatorElement.getTagName();
-
-    // check it is new format?
-    if (elementName.equals("featureGenerators")) {
-
-      List<AdaptiveFeatureGenerator> generators = new ArrayList<>();
-      NodeList childNodes = generatorElement.getChildNodes();
-      for (int i = 0; i < childNodes.getLength(); i++) {
-        Node childNode = childNodes.item(i);
-        if (childNode instanceof Element) {
-          Element elem = (Element)childNode;
-          String type = elem.getTagName();
-          if (type.equals("generator")) {
-            generators.add(buildGenerator(elem, resourceManager));
-          }
-          else
-            throw new InvalidFormatException("Unexpected element: " + elementName);
-        }
-      }
-
-      AdaptiveFeatureGenerator featureGenerator = null;
-      if (generators.size() == 1)
-        featureGenerator = generators.get(0);
-      else if (generators.size() > 1)
-        featureGenerator = new AggregatedFeatureGenerator(generators.toArray(
-                new AdaptiveFeatureGenerator[0]));
-      else
-        throw new InvalidFormatException("featureGenerators must have one or more generators");
-
-      // disallow manually specifying CachedFeatureGenerator
-      if (featureGenerator instanceof CachedFeatureGenerator)
-        throw new InvalidFormatException("CachedFeatureGeneratorFactory cannot be specified manually." +
-          "Use cache=\"true\" attribute in featureGenerators element instead.");
-
-      // check cache usage
-      if (Boolean.parseBoolean(generatorElement.getAttribute("cache")))
-        return new CachedFeatureGenerator(featureGenerator);
-      else
-        return featureGenerator;
-    }
-    else {
-      // support classic format
-      XmlFeatureGeneratorFactory generatorFactory = factories.get(elementName);
-      if (generatorFactory != null) {
-        return generatorFactory.create(generatorElement, resourceManager);
-      }
-      else
-        throw new InvalidFormatException("Unexpected element: " + elementName);
-    }
-  }
-
-  static Element getFirstChild(Element elem) {
-    NodeList nodes = elem.getChildNodes();
-    for (int i = 0; i < nodes.getLength(); i++) {
-      if (nodes.item(i) instanceof Element) {
-        return (Element)nodes.item(i);
-      }
-    }
-    return null;
-  }
-
-  /**
-   * Creates a {@link AdaptiveFeatureGenerator} for the provided element.
-   * To accomplish this it looks up the corresponding factory by the
-   * element tag name. The factory is then responsible for the creation
-   * of the generator from the element.
-   *
-   * @param generatorElement
-   * @param resourceManager
-   *
-   * @return
-   */
-  static AdaptiveFeatureGenerator buildGenerator(Element generatorElement,
-             FeatureGeneratorResourceProvider resourceManager) throws InvalidFormatException {
-    String className = generatorElement.getAttribute("class");
-    if (className == null) {
-      throw new InvalidFormatException("generator must have class attribute");
-    }
-    else {
-      try {
-        Class<?> factoryClass = Class.forName(className);
-        try {
-          Constructor<?> constructor = factoryClass.getConstructor();
-          AbstractXmlFeatureGeneratorFactory factory =
-              (AbstractXmlFeatureGeneratorFactory)constructor.newInstance();
-          factory.init(generatorElement, resourceManager);
-          return factory.create();
-        } catch (NoSuchMethodException | InvocationTargetException | InstantiationException
-            | IllegalAccessException e) {
-          throw new RuntimeException(e);
-        }
-      } catch (ClassNotFoundException e) {
-        throw new RuntimeException(e);
-      }
-    }
-  }
-
-  private static org.w3c.dom.Document createDOM(InputStream xmlDescriptorIn)
-      throws IOException {
-
-    DocumentBuilder documentBuilder = XmlUtil.createDocumentBuilder();
-
-    org.w3c.dom.Document xmlDescriptorDOM;
-
-    try {
-      xmlDescriptorDOM = documentBuilder.parse(xmlDescriptorIn);
-    } catch (SAXException e) {
-      throw new InvalidFormatException("Descriptor is not valid XML!", e);
-    }
-    return xmlDescriptorDOM;
-  }
-
-  /**
-   * Creates an {@link AdaptiveFeatureGenerator} from an provided XML descriptor.
-   * <p>
-   * Usually this XML descriptor contains a set of nested feature generators
-   * which are then used to generate the features by one of the opennlp
-   * components.
-   *
-   * @param xmlDescriptorIn the {@link InputStream} from which the descriptor
-   *     is read, the stream remains open and must be closed by the caller.
-   *
-   * @param resourceManager the resource manager which is used to resolve resources
-   *     referenced by a key in the descriptor
-   *
-   * @return created feature generators
-   *
-   * @throws IOException if an error occurs during reading from the descriptor
-   *     {@link InputStream}
-   */
-  public static AdaptiveFeatureGenerator create(InputStream xmlDescriptorIn,
-      FeatureGeneratorResourceProvider resourceManager) throws IOException {
-
-    org.w3c.dom.Document xmlDescriptorDOM = createDOM(xmlDescriptorIn);
-
-    Element generatorElement = xmlDescriptorDOM.getDocumentElement();
-
-    // TODO: (OPENNLP-1174) use #buildGenerator() after back-compat support is gone
-    return createGenerator(generatorElement, resourceManager);
-  }
-
-  public static Map<String, ArtifactSerializer<?>> extractArtifactSerializerMappings(
-      InputStream xmlDescriptorIn) throws IOException {
-
-    org.w3c.dom.Document xmlDescriptorDOM = createDOM(xmlDescriptorIn);
-    Element element = xmlDescriptorDOM.getDocumentElement();
-
-    String elementName = element.getTagName();
-
-    // check it is new format?
-    if (elementName.equals("featureGenerators")) {
-      Map<String, ArtifactSerializer<?>> mapping = new HashMap<>();
-      NodeList nodes = element.getChildNodes();
-      for (int i = 0; i < nodes.getLength(); i++) {
-        if (nodes.item(i) instanceof Element) {
-          Element childElem = (Element)nodes.item(i);
-          if (childElem.getTagName().equals("generator")) {
-            extractArtifactSerializerMappings(mapping, childElem);
-          }
-        }
-      }
-      return mapping;
-    }
-    else {
-      return extractArtifactSerializerMappingsClassicFormat(element);
-    }
-  }
-
-  static void extractArtifactSerializerMappings(Map<String, ArtifactSerializer<?>> mapping, Element element) {
-    String className = element.getAttribute("class");
-    if (className != null) {
-      try {
-        Class<?> factoryClass = Class.forName(className);
-        try {
-          Constructor<?> constructor = factoryClass.getConstructor();
-          AbstractXmlFeatureGeneratorFactory factory =
-              (AbstractXmlFeatureGeneratorFactory)constructor.newInstance();
-          factory.init(element, null);
-          Map<String, ArtifactSerializer<?>> map = factory.getArtifactSerializerMapping();
-          if (map != null)
-            mapping.putAll(map);
-        } catch (NoSuchMethodException | InvocationTargetException | InstantiationException
-            | IllegalAccessException e) {
-          throw new RuntimeException(e);
-        } catch (InvalidFormatException ignored) {
-        }
-      } catch (ClassNotFoundException e) {
-        throw new RuntimeException(e);
-      }
-    }
-
-    NodeList nodes = element.getChildNodes();
-    for (int i = 0; i < nodes.getLength(); i++) {
-      if (nodes.item(i) instanceof Element) {
-        Element childElem = (Element)nodes.item(i);
-        if (childElem.getTagName().equals("generator")) {
-          extractArtifactSerializerMappings(mapping, childElem);
-        }
-      }
-    }
-  }
-
-  @Deprecated   // TODO: (OPENNLP-1174) remove back-compat support when it is unnecessary
-  static Map<String, ArtifactSerializer<?>> extractArtifactSerializerMappingsClassicFormat(
-      Element elem) throws IOException {
-    Map<String, ArtifactSerializer<?>> mapping = new HashMap<>();
-
-    XPath xPath = XPathFactory.newInstance().newXPath();
-
-    NodeList customElements;
-    try {
-      XPathExpression exp = xPath.compile("//custom");
-      customElements = (NodeList) exp.evaluate(elem, XPathConstants.NODESET);
-    } catch (XPathExpressionException e) {
-      throw new IllegalStateException("The hard coded XPath expression should always be valid!");
-    }
-
-    for (int i = 0; i < customElements.getLength(); i++) {
-      if (customElements.item(i) instanceof Element) {
-        Element customElement = (Element) customElements.item(i);
-
-        // Note: The resource provider is not available at that point, to provide
-        // resources they need to be loaded first!
-        AdaptiveFeatureGenerator generator = createGenerator(customElement, null);
-
-        if (generator instanceof ArtifactToSerializerMapper) {
-          ArtifactToSerializerMapper mapper = (ArtifactToSerializerMapper) generator;
-          mapping.putAll(mapper.getArtifactSerializerMapping());
-        }
-      }
-    }
-
-    NodeList allElements;
-    try {
-      XPathExpression exp = xPath.compile("//*");
-      allElements = (NodeList) exp.evaluate(elem, XPathConstants.NODESET);
-    } catch (XPathExpressionException e) {
-      throw new IllegalStateException("The hard coded XPath expression should always be valid!");
-    }
-
-    for (int i = 0; i < allElements.getLength(); i++) {
-      if (allElements.item(i) instanceof Element) {
-        Element xmlElement = (Element) allElements.item(i);
-
-        String dictName = xmlElement.getAttribute("dict");
-        if (dictName != null) {
-
-          switch (xmlElement.getTagName()) {
-            case "wordcluster":
-              mapping.put(dictName, new WordClusterDictionary.WordClusterDictionarySerializer());
-              break;
-
-            case "brownclustertoken":
-              mapping.put(dictName, new BrownCluster.BrownClusterSerializer());
-              break;
-
-            case "brownclustertokenclass"://, ;
-              mapping.put(dictName, new BrownCluster.BrownClusterSerializer());
-              break;
-
-            case "brownclusterbigram": //, ;
-              mapping.put(dictName, new BrownCluster.BrownClusterSerializer());
-              break;
-
-            case "dictionary":
-              mapping.put(dictName, new DictionarySerializer());
-              break;
-          }
-        }
-
-        String modelName = xmlElement.getAttribute("model");
-        if (modelName != null) {
-
-          if ("tokenpos".equals(xmlElement.getTagName())) {
-            mapping.put(modelName, new POSModelSerializer());
-          }
-        }
-      }
-    }
-
-    return mapping;
-  }
-
-  /**
-   * Provides a list with all the elements in the xml feature descriptor.
-   * @param xmlDescriptorIn the xml feature descriptor
-   * @return a list containing all elements
-   * @throws IOException if inputstream cannot be open
-   * @throws InvalidFormatException if xml is not well-formed
-   */
-  public static List<Element> getDescriptorElements(InputStream xmlDescriptorIn)
-      throws IOException {
-
-    List<Element> elements = new ArrayList<>();
-    org.w3c.dom.Document xmlDescriptorDOM = createDOM(xmlDescriptorIn);
-    XPath xPath = XPathFactory.newInstance().newXPath();
-    NodeList allElements;
-    try {
-      XPathExpression exp = xPath.compile("//*");
-      allElements = (NodeList) exp.evaluate(xmlDescriptorDOM.getDocumentElement(), XPathConstants.NODESET);
-    } catch (XPathExpressionException e) {
-      throw new IllegalStateException("The hard coded XPath expression should always be valid!");
-    }
-
-    for (int i = 0; i < allElements.getLength(); i++) {
-      if (allElements.item(i) instanceof Element) {
-        Element customElement = (Element) allElements.item(i);
-        elements.add(customElement);
-      }
-    }
-    return elements;
-  }
 }
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/POSTaggerNameFeatureGeneratorFactory.java b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/POSTaggerNameFeatureGeneratorFactory.java
index 627f932c..3f44c8c6 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/POSTaggerNameFeatureGeneratorFactory.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/POSTaggerNameFeatureGeneratorFactory.java
@@ -20,8 +20,6 @@ package opennlp.tools.util.featuregen;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.w3c.dom.Element;
-
 import opennlp.tools.postag.POSModel;
 import opennlp.tools.util.InvalidFormatException;
 import opennlp.tools.util.model.ArtifactSerializer;
@@ -31,39 +29,21 @@ import opennlp.tools.util.model.POSModelSerializer;
  * @see POSTaggerNameFeatureGenerator
  */
 public class POSTaggerNameFeatureGeneratorFactory
-    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory
-    implements GeneratorFactory.XmlFeatureGeneratorFactory {
+    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory {
 
   public POSTaggerNameFeatureGeneratorFactory() {
     super();
   }
 
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  public AdaptiveFeatureGenerator create(Element generatorElement,
-             FeatureGeneratorResourceProvider resourceManager)
-      throws InvalidFormatException {
-
-    String modelResourceKey = generatorElement.getAttribute("model");
-
-    POSModel model = (POSModel)resourceManager.getResource(modelResourceKey);
-
-    return new POSTaggerNameFeatureGenerator(model);
-
-  }
-
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  static void register(Map<String, GeneratorFactory.XmlFeatureGeneratorFactory> factoryMap) {
-    factoryMap.put("tokenpos", new POSTaggerNameFeatureGeneratorFactory());
-  }
-
   @Override
   public AdaptiveFeatureGenerator create() throws InvalidFormatException {
     // if resourceManager is null, we don't instantiate
-    if (resourceManager == null)
+    if (resourceManager == null) {
       return null;
+    }
 
     String modelResourceKey = getStr("model");
-    POSModel model = (POSModel)resourceManager.getResource(modelResourceKey);
+    POSModel model = (POSModel) resourceManager.getResource(modelResourceKey);
     return new POSTaggerNameFeatureGenerator(model);
   }
 
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/PosTaggerFeatureGeneratorFactory.java b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/PosTaggerFeatureGeneratorFactory.java
index db4a09a8..88624db7 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/PosTaggerFeatureGeneratorFactory.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/PosTaggerFeatureGeneratorFactory.java
@@ -17,31 +17,15 @@
 
 package opennlp.tools.util.featuregen;
 
-import java.util.Map;
-
-import org.w3c.dom.Element;
-
 import opennlp.tools.util.InvalidFormatException;
 
 public class PosTaggerFeatureGeneratorFactory
-    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory
-    implements GeneratorFactory.XmlFeatureGeneratorFactory {
+    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory {
 
   public PosTaggerFeatureGeneratorFactory() {
     super();
   }
 
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  public AdaptiveFeatureGenerator create(Element generatorElement,
-             FeatureGeneratorResourceProvider resourceManager) {
-    return new PosTaggerFeatureGenerator();
-  }
-
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  static void register(Map<String, GeneratorFactory.XmlFeatureGeneratorFactory> factoryMap) {
-    factoryMap.put("postagger", new PosTaggerFeatureGeneratorFactory());
-  }
-
   @Override
   public AdaptiveFeatureGenerator create() throws InvalidFormatException {
     return new PosTaggerFeatureGenerator();
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/PrefixFeatureGeneratorFactory.java b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/PrefixFeatureGeneratorFactory.java
index 4bd73ddb..4f475ae9 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/PrefixFeatureGeneratorFactory.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/PrefixFeatureGeneratorFactory.java
@@ -17,44 +17,18 @@
 
 package opennlp.tools.util.featuregen;
 
-import java.util.Map;
-import java.util.Objects;
-
-import org.w3c.dom.Element;
-
 import opennlp.tools.util.InvalidFormatException;
 
 /**
  * @see PrefixFeatureGenerator
  */
 public class PrefixFeatureGeneratorFactory
-    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory
-    implements GeneratorFactory.XmlFeatureGeneratorFactory {
+    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory {
 
   public PrefixFeatureGeneratorFactory() {
     super();
   }
 
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  public AdaptiveFeatureGenerator create(Element generatorElement,
-                                         FeatureGeneratorResourceProvider resourceManager) {
-
-    String attribute = generatorElement.getAttribute("length");
-
-    int prefixLength = PrefixFeatureGenerator.DEFAULT_MAX_LENGTH;
-
-    if (!Objects.equals(attribute, "")) {
-      prefixLength = Integer.parseInt(attribute);
-    }
-
-    return new PrefixFeatureGenerator(prefixLength);
-  }
-
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  static void register(Map<String, GeneratorFactory.XmlFeatureGeneratorFactory> factoryMap) {
-    factoryMap.put("prefix", new PrefixFeatureGeneratorFactory());
-  }
-
   @Override
   public AdaptiveFeatureGenerator create() throws InvalidFormatException {
     return new PrefixFeatureGenerator(getInt("length",
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/PreviousMapFeatureGeneratorFactory.java b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/PreviousMapFeatureGeneratorFactory.java
index 855197da..6bfa846a 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/PreviousMapFeatureGeneratorFactory.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/PreviousMapFeatureGeneratorFactory.java
@@ -18,34 +18,18 @@
 package opennlp.tools.util.featuregen;
 
 
-import java.util.Map;
-
-import org.w3c.dom.Element;
-
 import opennlp.tools.util.InvalidFormatException;
 
 /**
  * @see PreviousMapFeatureGenerator
  */
 public class PreviousMapFeatureGeneratorFactory
-    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory
-    implements GeneratorFactory.XmlFeatureGeneratorFactory {
+    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory {
 
   public PreviousMapFeatureGeneratorFactory() {
     super();
   }
 
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  public AdaptiveFeatureGenerator create(Element generatorElement,
-             FeatureGeneratorResourceProvider resourceManager) {
-    return new PreviousMapFeatureGenerator();
-  }
-
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  static void register(Map<String, GeneratorFactory.XmlFeatureGeneratorFactory> factoryMap) {
-    factoryMap.put("prevmap", new PreviousMapFeatureGeneratorFactory());
-  }
-
   @Override
   public AdaptiveFeatureGenerator create() throws InvalidFormatException {
     return new PreviousMapFeatureGenerator();
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/SentenceFeatureGeneratorFactory.java b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/SentenceFeatureGeneratorFactory.java
index 9977852c..3ffefaa6 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/SentenceFeatureGeneratorFactory.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/SentenceFeatureGeneratorFactory.java
@@ -17,46 +17,18 @@
 
 package opennlp.tools.util.featuregen;
 
-import java.util.Map;
-
-import org.w3c.dom.Element;
-
 import opennlp.tools.util.InvalidFormatException;
 
 /**
  * @see SentenceFeatureGenerator
  */
 public class SentenceFeatureGeneratorFactory
-    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory
-    implements GeneratorFactory.XmlFeatureGeneratorFactory {
+    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory {
 
   public SentenceFeatureGeneratorFactory() {
     super();
   }
 
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  public AdaptiveFeatureGenerator create(Element generatorElement,
-             FeatureGeneratorResourceProvider resourceManager) {
-
-    String beginFeatureString = generatorElement.getAttribute("begin");
-
-    boolean beginFeature = true;
-    if (beginFeatureString.length() != 0)
-      beginFeature = Boolean.parseBoolean(beginFeatureString);
-
-    String endFeatureString = generatorElement.getAttribute("end");
-    boolean endFeature = true;
-    if (endFeatureString.length() != 0)
-      endFeature = Boolean.parseBoolean(endFeatureString);
-
-    return new SentenceFeatureGenerator(beginFeature, endFeature);
-  }
-
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  static void register(Map<String, GeneratorFactory.XmlFeatureGeneratorFactory> factoryMap) {
-    factoryMap.put("sentence", new SentenceFeatureGeneratorFactory());
-  }
-
   @Override
   public AdaptiveFeatureGenerator create() throws InvalidFormatException {
     String beginFeatureString = generatorElement.getAttribute("begin");
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/SuffixFeatureGeneratorFactory.java b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/SuffixFeatureGeneratorFactory.java
index 99c24548..ef730943 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/SuffixFeatureGeneratorFactory.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/SuffixFeatureGeneratorFactory.java
@@ -17,44 +17,18 @@
 
 package opennlp.tools.util.featuregen;
 
-import java.util.Map;
-import java.util.Objects;
-
-import org.w3c.dom.Element;
-
 import opennlp.tools.util.InvalidFormatException;
 
 /**
  * @see SuffixFeatureGenerator
  */
 public class SuffixFeatureGeneratorFactory
-    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory
-    implements GeneratorFactory.XmlFeatureGeneratorFactory {
+    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory {
 
   public SuffixFeatureGeneratorFactory() {
     super();
   }
 
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  public AdaptiveFeatureGenerator create(Element generatorElement,
-             FeatureGeneratorResourceProvider resourceManager) {
-
-    String attribute = generatorElement.getAttribute("length");
-
-    int suffixLength = SuffixFeatureGenerator.DEFAULT_MAX_LENGTH;
-
-    if (!Objects.equals(attribute, "")) {
-      suffixLength = Integer.parseInt(attribute);
-    }
-
-    return new SuffixFeatureGenerator(suffixLength);
-  }
-
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  static void register(Map<String, GeneratorFactory.XmlFeatureGeneratorFactory> factoryMap) {
-    factoryMap.put("suffix", new SuffixFeatureGeneratorFactory());
-  }
-
   @Override
   public AdaptiveFeatureGenerator create() throws InvalidFormatException {
     return new SuffixFeatureGenerator(getInt("length",
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/TokenClassFeatureGeneratorFactory.java b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/TokenClassFeatureGeneratorFactory.java
index bcedf7fa..54540823 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/TokenClassFeatureGeneratorFactory.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/TokenClassFeatureGeneratorFactory.java
@@ -17,48 +17,18 @@
 
 package opennlp.tools.util.featuregen;
 
-import java.util.Map;
-import java.util.Objects;
-
-import org.w3c.dom.Element;
-
 import opennlp.tools.util.InvalidFormatException;
 
 /**
  * @see TokenClassFeatureGenerator
  */
 public class TokenClassFeatureGeneratorFactory
-    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory
-    implements GeneratorFactory.XmlFeatureGeneratorFactory {
+    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory {
 
   public TokenClassFeatureGeneratorFactory() {
     super();
   }
 
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  public AdaptiveFeatureGenerator create(Element generatorElement,
-             FeatureGeneratorResourceProvider resourceManager) {
-
-    String attribute = generatorElement.getAttribute("wordAndClass");
-
-    // Default to true.
-    boolean generateWordAndClassFeature = true;
-
-    if (!Objects.equals(attribute, "")) {
-      // Anything other than "true" sets it to false.
-      if (!"true".equalsIgnoreCase(attribute)) {
-        generateWordAndClassFeature = false;
-      }
-    }
-
-    return new TokenClassFeatureGenerator(generateWordAndClassFeature);
-  }
-
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  static void register(Map<String, GeneratorFactory.XmlFeatureGeneratorFactory> factoryMap) {
-    factoryMap.put("tokenclass", new TokenClassFeatureGeneratorFactory());
-  }
-
   @Override
   public AdaptiveFeatureGenerator create() throws InvalidFormatException {
     return new TokenClassFeatureGenerator(getBool("wordAndClass", true));
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/TokenFeatureGeneratorFactory.java b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/TokenFeatureGeneratorFactory.java
index 66603051..51ca9ad8 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/TokenFeatureGeneratorFactory.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/TokenFeatureGeneratorFactory.java
@@ -17,31 +17,15 @@
 
 package opennlp.tools.util.featuregen;
 
-import java.util.Map;
-
-import org.w3c.dom.Element;
-
 import opennlp.tools.util.InvalidFormatException;
 
 public class TokenFeatureGeneratorFactory
-    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory
-    implements GeneratorFactory.XmlFeatureGeneratorFactory {
+    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory {
 
   public TokenFeatureGeneratorFactory() {
     super();
   }
 
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  public AdaptiveFeatureGenerator create(Element generatorElement,
-             FeatureGeneratorResourceProvider resourceManager) {
-    return new TokenFeatureGenerator();
-  }
-
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  static void register(Map<String, GeneratorFactory.XmlFeatureGeneratorFactory> factoryMap) {
-    factoryMap.put("token", new TokenFeatureGeneratorFactory());
-  }
-
   @Override
   public AdaptiveFeatureGenerator create() throws InvalidFormatException {
     return new TokenFeatureGenerator(getBool("lowercase", true));
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/TokenPatternFeatureGeneratorFactory.java b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/TokenPatternFeatureGeneratorFactory.java
index 92a1d5a9..05d64441 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/TokenPatternFeatureGeneratorFactory.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/TokenPatternFeatureGeneratorFactory.java
@@ -17,34 +17,18 @@
 
 package opennlp.tools.util.featuregen;
 
-import java.util.Map;
-
-import org.w3c.dom.Element;
-
 import opennlp.tools.util.InvalidFormatException;
 
 /**
  * @see TokenPatternFeatureGenerator
  */
 public class TokenPatternFeatureGeneratorFactory
-    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory
-    implements GeneratorFactory.XmlFeatureGeneratorFactory {
+    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory {
 
   public TokenPatternFeatureGeneratorFactory() {
     super();
   }
 
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  public AdaptiveFeatureGenerator create(Element generatorElement,
-             FeatureGeneratorResourceProvider resourceManager) {
-    return new TokenPatternFeatureGenerator();
-  }
-
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  static void register(Map<String, GeneratorFactory.XmlFeatureGeneratorFactory> factoryMap) {
-    factoryMap.put("tokenpattern", new TokenPatternFeatureGeneratorFactory());
-  }
-
   @Override
   public AdaptiveFeatureGenerator create() throws InvalidFormatException {
     return new TokenPatternFeatureGenerator();
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/TrigramNameFeatureGeneratorFactory.java b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/TrigramNameFeatureGeneratorFactory.java
index e9a4c348..80f1abee 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/TrigramNameFeatureGeneratorFactory.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/TrigramNameFeatureGeneratorFactory.java
@@ -17,32 +17,15 @@
 
 package opennlp.tools.util.featuregen;
 
-import java.util.Map;
-
-import org.w3c.dom.Element;
-
 import opennlp.tools.util.InvalidFormatException;
 
 public class TrigramNameFeatureGeneratorFactory
-    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory
-    implements GeneratorFactory.XmlFeatureGeneratorFactory {
+    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory {
 
   public TrigramNameFeatureGeneratorFactory() {
     super();
   }
 
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  public AdaptiveFeatureGenerator create(Element generatorElement,
-                                         FeatureGeneratorResourceProvider resourceManager) {
-
-    return new TrigramNameFeatureGenerator();
-  }
-
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  static void register(Map<String, GeneratorFactory.XmlFeatureGeneratorFactory> factoryMap) {
-    factoryMap.put("trigram", new TrigramNameFeatureGeneratorFactory());
-  }
-
   @Override
   public AdaptiveFeatureGenerator create() throws InvalidFormatException {
     return new TrigramNameFeatureGenerator();
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/WindowFeatureGeneratorFactory.java b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/WindowFeatureGeneratorFactory.java
index 21d76573..8f413b87 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/WindowFeatureGeneratorFactory.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/WindowFeatureGeneratorFactory.java
@@ -17,83 +17,21 @@
 
 package opennlp.tools.util.featuregen;
 
-import java.util.Map;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
 import opennlp.tools.util.InvalidFormatException;
 
 /**
  * @see WindowFeatureGenerator
  */
 public class WindowFeatureGeneratorFactory
-    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory
-    implements GeneratorFactory.XmlFeatureGeneratorFactory {
+    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory {
 
   public WindowFeatureGeneratorFactory() {
     super();
   }
 
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  public AdaptiveFeatureGenerator create(Element generatorElement,
-             FeatureGeneratorResourceProvider resourceManager)  throws InvalidFormatException {
-
-    Element nestedGeneratorElement = null;
-
-    NodeList kids = generatorElement.getChildNodes();
-
-    for (int i = 0; i < kids.getLength(); i++) {
-      Node childNode = kids.item(i);
-
-      if (childNode instanceof Element) {
-        nestedGeneratorElement = (Element) childNode;
-        break;
-      }
-    }
-
-    if (nestedGeneratorElement == null) {
-      throw new InvalidFormatException("window feature generator must contain" +
-          " an aggregator element");
-    }
-
-    AdaptiveFeatureGenerator nestedGenerator =
-        GeneratorFactory.createGenerator(nestedGeneratorElement, resourceManager);
-
-    String prevLengthString = generatorElement.getAttribute("prevLength");
-
-    int prevLength;
-
-    try {
-      prevLength = Integer.parseInt(prevLengthString);
-    } catch (NumberFormatException e) {
-      throw new InvalidFormatException("prevLength attribute '" + prevLengthString
-          + "' is not a number!", e);
-    }
-
-    String nextLengthString = generatorElement.getAttribute("nextLength");
-
-    int nextLength;
-
-    try {
-      nextLength = Integer.parseInt(nextLengthString);
-    } catch (NumberFormatException e) {
-      throw new InvalidFormatException("nextLength attribute '" + nextLengthString
-          + "' is not a number!", e);
-    }
-
-    return new WindowFeatureGenerator(nestedGenerator, prevLength, nextLength);
-  }
-
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  static void register(Map<String, GeneratorFactory.XmlFeatureGeneratorFactory> factoryMap) {
-    factoryMap.put("window", new WindowFeatureGeneratorFactory());
-  }
-
   @Override
   public AdaptiveFeatureGenerator create() throws InvalidFormatException {
-    AdaptiveFeatureGenerator generator = (AdaptiveFeatureGenerator)args.get("generator#0");
+    AdaptiveFeatureGenerator generator = (AdaptiveFeatureGenerator) args.get("generator#0");
     if (generator == null) {
       throw new InvalidFormatException("window feature generator must contain" +
           " an aggregator element");
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/WordClusterFeatureGeneratorFactory.java b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/WordClusterFeatureGeneratorFactory.java
index 5ad99de8..4381f129 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/WordClusterFeatureGeneratorFactory.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/featuregen/WordClusterFeatureGeneratorFactory.java
@@ -20,8 +20,6 @@ package opennlp.tools.util.featuregen;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.w3c.dom.Element;
-
 import opennlp.tools.util.InvalidFormatException;
 import opennlp.tools.util.model.ArtifactSerializer;
 
@@ -31,42 +29,18 @@ import opennlp.tools.util.model.ArtifactSerializer;
  * word2vec or clark pos induction systems.
  */
 public class WordClusterFeatureGeneratorFactory
-    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory
-    implements GeneratorFactory.XmlFeatureGeneratorFactory {
+    extends GeneratorFactory.AbstractXmlFeatureGeneratorFactory {
 
   public WordClusterFeatureGeneratorFactory() {
     super();
   }
 
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  public AdaptiveFeatureGenerator create(Element generatorElement,
-             FeatureGeneratorResourceProvider resourceManager) throws InvalidFormatException {
-
-    String dictResourceKey = generatorElement.getAttribute("dict");
-    boolean lowerCaseDictionary = "true".equals(generatorElement.getAttribute("lowerCase"));
-
-    Object dictResource = resourceManager.getResource(dictResourceKey);
-
-
-    if (!(dictResource instanceof WordClusterDictionary)) {
-      throw new InvalidFormatException("Not a WordClusterDictionary resource for key: "
-          + dictResourceKey);
-    }
-
-    return new WordClusterFeatureGenerator((WordClusterDictionary) dictResource,
-        dictResourceKey, lowerCaseDictionary);
-  }
-
-  @Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-  static void register(Map<String, GeneratorFactory.XmlFeatureGeneratorFactory> factoryMap) {
-    factoryMap.put("wordcluster", new WordClusterFeatureGeneratorFactory());
-  }
-
   @Override
   public AdaptiveFeatureGenerator create() throws InvalidFormatException {
     // if resourceManager is null, we don't instantiate
-    if (resourceManager == null)
+    if (resourceManager == null) {
       return null;
+    }
 
     String dictResourceKey = getStr("dict");
     boolean lowerCaseDictionary = getBool("lowerCase");
diff --git a/opennlp-tools/src/main/resources/opennlp/tools/namefind/ner-default-features_classic.xml b/opennlp-tools/src/main/resources/opennlp/tools/namefind/ner-default-features_classic.xml
deleted file mode 100644
index f5b91ee9..00000000
--- a/opennlp-tools/src/main/resources/opennlp/tools/namefind/ner-default-features_classic.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<!--
-	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>
\ No newline at end of file
diff --git a/opennlp-tools/src/main/resources/opennlp/tools/postag/pos-default-features_classic.xml b/opennlp-tools/src/main/resources/opennlp/tools/postag/pos-default-features_classic.xml
deleted file mode 100644
index 0be1fc83..00000000
--- a/opennlp-tools/src/main/resources/opennlp/tools/postag/pos-default-features_classic.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<!--
-   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 pos tagger feature generator configuration -->
-<generators>
-    <cache>
-        <generators>
-            <definition/>
-            <suffix/>
-            <prefix/>
-            <window prevLength = "2" nextLength = "2">
-                <token/>
-            </window>
-            <window prevLength = "2" nextLength = "2">
-                <sentence begin="true" end="false"/>
-            </window>
-            <tokenclass/>
-            <postagger/>
-        </generators>
-    </cache>
-</generators>
diff --git a/opennlp-tools/src/test/java/opennlp/tools/util/featuregen/FeatureGenWithSerializerMapping.java b/opennlp-tools/src/test/java/opennlp/tools/util/featuregen/FeatureGenWithSerializerMapping.java
deleted file mode 100644
index 6117fb95..00000000
--- a/opennlp-tools/src/test/java/opennlp/tools/util/featuregen/FeatureGenWithSerializerMapping.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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.
- */
-
-package opennlp.tools.util.featuregen;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import opennlp.tools.util.model.ArtifactSerializer;
-
-@Deprecated   // TODO: (OPENNLP-1174) remove back-compat support when it is unnecessary
-public class FeatureGenWithSerializerMapping extends CustomFeatureGenerator
-    implements ArtifactToSerializerMapper {
-
-  @Override
-  public void createFeatures(List<String> features, String[] tokens, int index,
-      String[] previousOutcomes) {
-  }
-
-  @Override
-  public void updateAdaptiveData(String[] tokens, String[] outcomes) {
-  }
-
-  @Override
-  public void clearAdaptiveData() {
-  }
-
-  @Override
-  public Map<String, ArtifactSerializer<?>> getArtifactSerializerMapping() {
-    Map<String, ArtifactSerializer<?>> mapping = new HashMap<>();
-    mapping.put("test.resource", new WordClusterDictionary.WordClusterDictionarySerializer());
-    return Collections.unmodifiableMap(mapping);
-  }
-
-  @Override
-  public void init(Map<String, String> properties,
-      FeatureGeneratorResourceProvider resourceProvider) {
-  }
-}
diff --git a/opennlp-tools/src/test/java/opennlp/tools/util/featuregen/GeneratorFactoryClassicFormatTest.java b/opennlp-tools/src/test/java/opennlp/tools/util/featuregen/GeneratorFactoryClassicFormatTest.java
deleted file mode 100644
index 9f367f1a..00000000
--- a/opennlp-tools/src/test/java/opennlp/tools/util/featuregen/GeneratorFactoryClassicFormatTest.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * 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.
- */
-
-package opennlp.tools.util.featuregen;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Map;
-
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
-import opennlp.tools.util.InvalidFormatException;
-import opennlp.tools.util.featuregen.WordClusterDictionary.WordClusterDictionarySerializer;
-import opennlp.tools.util.model.ArtifactSerializer;
-import opennlp.tools.util.model.DictionarySerializer;
-
-@Deprecated // TODO: (OPENNLP-1174) just remove when back-compat is no longer needed
-public class GeneratorFactoryClassicFormatTest {
-
-  @Test
-  void testCreationWithTokenClassFeatureGenerator() throws Exception {
-    InputStream generatorDescriptorIn = getClass().getResourceAsStream(
-        "/opennlp/tools/util/featuregen/TestTokenClassFeatureGeneratorConfig_classic.xml");
-
-    // If this fails the generator descriptor could not be found
-    // at the expected location
-    Assertions.assertNotNull(generatorDescriptorIn);
-
-    AggregatedFeatureGenerator aggregatedGenerator =
-        (AggregatedFeatureGenerator) GeneratorFactory.create(generatorDescriptorIn, null);
-
-    Assertions.assertEquals(1, aggregatedGenerator.getGenerators().size());
-    Assertions.assertEquals(TokenClassFeatureGenerator.class.getName(),
-        aggregatedGenerator.getGenerators().iterator().next().getClass().getName());
-
-  }
-
-  @Test
-  void testCreationWihtSimpleDescriptor() throws Exception {
-    InputStream generatorDescriptorIn = getClass().getResourceAsStream(
-        "/opennlp/tools/util/featuregen/TestFeatureGeneratorConfig_classic.xml");
-
-    // If this fails the generator descriptor could not be found
-    // at the expected location
-    Assertions.assertNotNull(generatorDescriptorIn);
-
-    Collection<String> expectedGenerators = new ArrayList<>();
-    expectedGenerators.add(OutcomePriorFeatureGenerator.class.getName());
-
-    AggregatedFeatureGenerator aggregatedGenerator =
-        (AggregatedFeatureGenerator) GeneratorFactory.create(generatorDescriptorIn, null);
-
-
-    for (AdaptiveFeatureGenerator generator : aggregatedGenerator.getGenerators()) {
-
-      expectedGenerators.remove(generator.getClass().getName());
-
-      // if of kind which requires parameters check that
-    }
-
-    // If this fails not all expected generators were found and
-    // removed from the expected generators collection
-    Assertions.assertEquals(0, expectedGenerators.size());
-  }
-
-  @Test
-  void testCreationWithCustomGenerator() throws Exception {
-    InputStream generatorDescriptorIn = getClass().getResourceAsStream(
-        "/opennlp/tools/util/featuregen/CustomClassLoading_classic.xml");
-
-    // If this fails the generator descriptor could not be found
-    // at the expected location
-    Assertions.assertNotNull(generatorDescriptorIn);
-
-    AggregatedFeatureGenerator aggregatedGenerator =
-        (AggregatedFeatureGenerator) GeneratorFactory.create(generatorDescriptorIn, null);
-
-    Collection<AdaptiveFeatureGenerator> embeddedGenerator = aggregatedGenerator.getGenerators();
-
-    Assertions.assertEquals(1, embeddedGenerator.size());
-
-    for (AdaptiveFeatureGenerator generator : embeddedGenerator) {
-      Assertions.assertEquals(TokenFeatureGenerator.class.getName(), generator.getClass().getName());
-    }
-  }
-
-  /**
-   * Tests the creation from a descriptor which contains an unkown element.
-   * The creation should fail with an {@link InvalidFormatException}
-   */
-  @Test
-  void testCreationWithUnkownElement() {
-
-    Assertions.assertThrows(IOException.class, () -> {
-
-      try (InputStream descIn = getClass().getResourceAsStream(
-          "/opennlp/tools/util/featuregen/FeatureGeneratorConfigWithUnkownElement_classic.xml")) {
-        GeneratorFactory.create(descIn, null);
-      }
-    });
-  }
-
-  @Test
-  void testArtifactToSerializerMappingExtraction() throws IOException {
-    // TODO: Define a new one here with custom elements ...
-    InputStream descIn = getClass().getResourceAsStream(
-        "/opennlp/tools/util/featuregen/CustomClassLoadingWithSerializers_classic.xml");
-
-    Map<String, ArtifactSerializer<?>> mapping =
-        GeneratorFactory.extractArtifactSerializerMappings(descIn);
-
-    Assertions.assertTrue(mapping.get("test.resource") instanceof WordClusterDictionarySerializer);
-  }
-
-  @Test
-  void testDictionaryArtifactToSerializerMappingExtraction() throws IOException {
-
-    InputStream descIn = getClass().getResourceAsStream(
-        "/opennlp/tools/util/featuregen/TestDictionarySerializerMappingExtraction_classic.xml");
-
-    Map<String, ArtifactSerializer<?>> mapping =
-        GeneratorFactory.extractArtifactSerializerMappings(descIn);
-
-    Assertions.assertTrue(mapping.get("test.dictionary") instanceof DictionarySerializer);
-    // TODO: if make the following effective, the test fails.
-    // this is strange because DictionaryFeatureGeneratorFactory cast dictResource to Dictionary...
-    //Assert.assertTrue(mapping.get("test.dictionary") instanceof
-    //    opennlp.tools.dictionary.Dictionary);
-  }
-}
diff --git a/opennlp-tools/src/test/resources/opennlp/tools/namefind/ner-pos-features_classic.xml b/opennlp-tools/src/test/resources/opennlp/tools/namefind/ner-pos-features_classic.xml
deleted file mode 100644
index 71c3bae9..00000000
--- a/opennlp-tools/src/test/resources/opennlp/tools/namefind/ner-pos-features_classic.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<!--
-  ~ 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.
-  -->
-
-<generators>
-  <cache>
-    <generators>
-      <window prevLength = "2" nextLength = "2">
-        <tokenclass/>
-      </window>
-      <window prevLength = "2" nextLength = "2">
-        <token/>
-      </window>
-      <window prevLength = "2" nextLength = "2">
-        <tokenpos model="pos-model.bin"/>
-      </window>
-      <definition/>
-      <prevmap/>
-      <bigram/>
-      <sentence begin="true" end="false"/>
-    </generators>
-  </cache>
-</generators>
diff --git a/opennlp-tools/src/test/resources/opennlp/tools/util/featuregen/CustomClassLoadingWithSerializers_classic.xml b/opennlp-tools/src/test/resources/opennlp/tools/util/featuregen/CustomClassLoadingWithSerializers_classic.xml
deleted file mode 100644
index 4a6f36e0..00000000
--- a/opennlp-tools/src/test/resources/opennlp/tools/util/featuregen/CustomClassLoadingWithSerializers_classic.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<!--
-	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.
--->
-
-<generators>
-  <custom class="opennlp.tools.util.featuregen.FeatureGenWithSerializerMapping"/>
-</generators>
\ No newline at end of file
diff --git a/opennlp-tools/src/test/resources/opennlp/tools/util/featuregen/CustomClassLoading_classic.xml b/opennlp-tools/src/test/resources/opennlp/tools/util/featuregen/CustomClassLoading_classic.xml
deleted file mode 100644
index d22556af..00000000
--- a/opennlp-tools/src/test/resources/opennlp/tools/util/featuregen/CustomClassLoading_classic.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<!--
-	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.
--->
-
-<generators>
-  <custom class="opennlp.tools.util.featuregen.TokenFeatureGenerator"/>
-</generators>
\ No newline at end of file
diff --git a/opennlp-tools/src/test/resources/opennlp/tools/util/featuregen/FeatureGeneratorConfigWithUnkownElement_classic.xml b/opennlp-tools/src/test/resources/opennlp/tools/util/featuregen/FeatureGeneratorConfigWithUnkownElement_classic.xml
deleted file mode 100644
index 7a67ea86..00000000
--- a/opennlp-tools/src/test/resources/opennlp/tools/util/featuregen/FeatureGeneratorConfigWithUnkownElement_classic.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?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.
--->
-
-<generators>
-	<definition/>
-	<unkown-element/>
-</generators>
-
diff --git a/opennlp-tools/src/test/resources/opennlp/tools/util/featuregen/TestDictionarySerializerMappingExtraction_classic.xml b/opennlp-tools/src/test/resources/opennlp/tools/util/featuregen/TestDictionarySerializerMappingExtraction_classic.xml
deleted file mode 100644
index 334fd3f3..00000000
--- a/opennlp-tools/src/test/resources/opennlp/tools/util/featuregen/TestDictionarySerializerMappingExtraction_classic.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<!--
-	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.
--->
-
-<generators>
-  <dictionary dict="test.dictionary"/>
-</generators>
\ No newline at end of file
diff --git a/opennlp-tools/src/test/resources/opennlp/tools/util/featuregen/TestFeatureGeneratorConfig_classic.xml b/opennlp-tools/src/test/resources/opennlp/tools/util/featuregen/TestFeatureGeneratorConfig_classic.xml
deleted file mode 100644
index 6518948a..00000000
--- a/opennlp-tools/src/test/resources/opennlp/tools/util/featuregen/TestFeatureGeneratorConfig_classic.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?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.
--->
-
-<generators>
-	<definition/>
-</generators>
-
diff --git a/opennlp-tools/src/test/resources/opennlp/tools/util/featuregen/TestTokenClassFeatureGeneratorConfig_classic.xml b/opennlp-tools/src/test/resources/opennlp/tools/util/featuregen/TestTokenClassFeatureGeneratorConfig_classic.xml
deleted file mode 100644
index c680248e..00000000
--- a/opennlp-tools/src/test/resources/opennlp/tools/util/featuregen/TestTokenClassFeatureGeneratorConfig_classic.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?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.
--->
-
-<generators>
-	<tokenclass wordAndClass="true"/>
-</generators>