Package org.apache.uima.analysis_engine

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


    Iterator aeInstanceIterator = aeInstanceMap.keySet().iterator();
    int i=0;
    while ( aeInstanceIterator.hasNext() )
    {
      AnalysisEngine ae = (AnalysisEngine) aeInstanceMap.get((String)aeInstanceIterator.next());
      ae.destroy();
      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, getClass().getName(), "abort", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_destroying_ae__INFO", new Object[] { ae.getAnalysisEngineMetaData().getName(), i });
      i++;
    }
    aeInstanceMap.clear();
  }
View Full Code Here


        dictionaryResourceName);

    FileOutputStream output = new FileOutputStream(args[1]);
    dict.serializeEntries(output);
    output.close();
    ae.destroy();
    // for some reason JVM won't exit normally,
    // probably because CPM threads are alive?
    System.exit(0);
  }
 
View Full Code Here

      // print results
      Type annotationType = cas.getTypeSystem().getType(CAS.TYPE_NAME_ANNOTATION);
      PrintAnnotations.printAnnotations(cas, annotationType, System.out);

      // destroy AE
      ae.destroy();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

      }
      anIter.moveToNext();
    }

    // Clean up
    seAnnotator.destroy();
  }
}
View Full Code Here

            if (!files[i].isDirectory()) {
              processFile(files[i], ae, cas);
            }
          }
        }
        ae.destroy();
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

      cas = ae.newCAS();
      cas.setDocumentText(FileUtils.file2String(textFile, "UTF-8"));
    }
    ae.process(cas);

    ae.destroy();
    return cas;
  }

  public static Type getTestType(CAS cas, int i) {
    if (cas == null)
View Full Code Here

   
    assertEquals("start of bodynormal BOLDend of body" , text);
   
   
    cas.release();
    ae.destroy();
  }

 
}
View Full Code Here

      cas = ae.newCAS();
      cas.setDocumentText(FileUtils.file2String(textFile, "UTF-8"));
    }
    ae.process(cas);

    ae.destroy();
    return cas;
  }

  public static Type getTestType(CAS cas, int i) {
    if (cas == null)
View Full Code Here

      processFile(file, ae, cas);
    }

    ae.collectionProcessComplete(new ProcessTrace_impl());
    cas.release();
    ae.destroy();
  }

  private static void processFile(File file, AnalysisEngine ae, CAS cas) throws IOException,
          AnalysisEngineProcessException, SAXException {
    if (view != null) {
View Full Code Here

          r.getProject().getFolder(path2Result)
                  .refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
          runCas.release();
          testCas.release();
          resultCas.release();
          ae.destroy();
          if (monitor.isCanceled())
            return Status.CANCEL_STATUS;
        }
      } catch (Exception e) {
        RutaIdePlugin.error(e);
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.