Package org.apache.uima.analysis_engine

Examples of org.apache.uima.analysis_engine.AnalysisEngine.reconfigure()


        try {
          AnalysisEngine ae = produceAE(descName);
          CAS cas = ae.newCAS();
          cas.setDocumentText("this is a dummy document text for initialization and reconfiguration");
          ae.process(cas);
          ae.reconfigure();
        } catch (Exception e) {
          fail(e.getLocalizedMessage() + " for desc " + descName);
        }
      }
    }
View Full Code Here


      CAS cas = AnnotatorTester.getCASfromXCAS(JUnitExtension.getFile("typesystem.xml"),
              JUnitExtension.getFile("englishXCAS.xml"));

      ae.process(cas);

      ae.reconfigure();
    } catch (Exception e) {
      fail();
    }
  }
}
View Full Code Here

    if (resourceFile != null) {
      ae.setConfigParameterValue(RutaEngine.RESOURCE_PATHS,
              new String[] { resourceFile.getPath() });
    }

    ae.reconfigure();
    if (cas == null) {
      cas = ae.newCAS();
      cas.setDocumentText(FileUtils.file2String(textFile, "UTF-8"));
    }
    ae.process(cas);
View Full Code Here

    aed.getAnalysisEngineMetaData().setTypeSystem(mergeTypeSystems);
    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(aed);
    ae.setConfigParameterValue(RutaModifier.OUTPUT_LOCATION, "");
    String viewName = "modified_for_testing";
    ae.setConfigParameterValue(RutaModifier.OUTPUT_VIEW, viewName);
    ae.reconfigure();
   
    String scriptName = this.getClass().getSimpleName();
    CAS cas = null;
    try {
      cas = RutaTestUtils.process(namespace + "/" + scriptName + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/test.html", 50);
View Full Code Here

    if (resourceFile != null) {
      ae.setConfigParameterValue(RutaEngine.RESOURCE_PATHS,
              new String[] { resourceFile.getPath() });
    }

    ae.reconfigure();
    if (cas == null) {
      cas = ae.newCAS();
      cas.setDocumentText(FileUtils.file2String(textFile, "UTF-8"));
    }
    ae.process(cas);
View Full Code Here

        ae.setConfigParameterValue(RutaEngine.CREATE_DEBUG_INFO, true);
        ae.setConfigParameterValue(RutaEngine.CREATE_MATCH_DEBUG_INFO, true);
        ae.setConfigParameterValue(RutaEngine.CREATE_PROFILING_INFO, true);
        ae.setConfigParameterValue(RutaEngine.CREATE_STATISTIC_INFO, true);
        ae.setConfigParameterValue(RutaEngine.CREATE_CREATED_BY_INFO, true);
        ae.reconfigure();
      }
    } catch (Exception e) {
      clearConsoleLink(handler);
      String message = e.getMessage();
      DLTKCore.error(message, e);
View Full Code Here

    }
    ae.setConfigParameterValue(RutaEngine.MAIN_SCRIPT, name);
    ae.setConfigParameterValue(RutaEngine.SEEDERS, new String[0]);
    ae.setConfigParameterValue(RutaEngine.DEFAULT_FILTERED_TYPES, new String[0]);

    ae.reconfigure();
    CAS cas = ae.newCAS();
    cas.setDocumentText(FileUtils.file2String(textFile, "UTF-8"));
   
    Type typeCW = cas.getTypeSystem().getType("org.apache.uima.ruta.type.CW");
    Type typeSW = cas.getTypeSystem().getType("org.apache.uima.ruta.type.SW");
View Full Code Here

        }
      }
    }

    try {
      targetEngine.reconfigure();
    } catch (ResourceConfigurationException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

        ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);
        ResourceManager resMgr = UIMAFramework.newDefaultResourceManager();
        resMgr.setDataPath(rootPath.toPortableString());
        ae = UIMAFramework.produceAnalysisEngine(specifier, resMgr, null);
        initAE(ae);
        ae.reconfigure();
      } catch (Exception e) {
        DLTKCore.error(e.getMessage(), e);
        return Status.CANCEL_STATUS;
      }
      monitor.beginTask("Processing... ", paths.size());
View Full Code Here

        ae.setConfigParameterValue(RutaEngine.CREATE_DEBUG_INFO, true);
        ae.setConfigParameterValue(RutaEngine.CREATE_MATCH_DEBUG_INFO, true);
        ae.setConfigParameterValue(RutaEngine.CREATE_PROFILING_INFO, false);
        ae.setConfigParameterValue(RutaEngine.CREATE_STATISTIC_INFO, false);
        ae.reconfigure();
        CAS cas = ae.newCAS();

        monitor.worked(1);

        if (monitor.isCanceled()) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.