public static void resetAE(AnalysisEngine ae) {
        if (ae != null) {
            ae.destroy();
            ae = null;
        }
    }
Resets the AE (AnalysisEngine), releasing all resources held by the
current AE.

@param ae UIMA Analysis Engine
tika-parsers/tika-parsers-ml/tika-parser-nlp-module/src/main/java/org/apache/tika/parser/ctakes/CTAKESUtils.java