public SimpleRunCPE(CpeDescription cpeDesc) throws ResourceInitializationException { LOGGER.info("Instantiating CPE"); collectionProcessingEngine = UIMAFramework.produceCollectionProcessingEngine(cpeDesc); collectionProcessingEngine.addStatusCallbackListener(new StatusCallbackListener() {
collectionProcessingEngine = UIMAFramework.produceCollectionProcessingEngine( cpeDescription ); } catch ( ResourceInitializationException riE ) { System.err.println( "Couldn't initialize processing engine." );
mCPE = UIMAFramework.produceCollectionProcessingEngine(cpeDesc);
collectionProcessingEngine = UIMAFramework.produceCollectionProcessingEngine( cpeDescription ); } catch ( ResourceInitializationException riE ) { System.err.println( "Couldn't initialize processing engine." );
mCPE = UIMAFramework.produceCollectionProcessingEngine(cpeDesc);
mCPE = UIMAFramework.produceCollectionProcessingEngine(cpeDesc);
mCPE = UIMAFramework.produceCollectionProcessingEngine(cpeDesc);
public void run() { try { mCPE = null; mCPE = UIMAFramework.produceCollectionProcessingEngine(currentCpeDesc); SimpleStatusCallbackListenerImpl statCbL = new SimpleStatusCallbackListenerImpl(logger); mCPE.addStatusCallbackListener(statCbL); statCbL.setCollectionProcessingEngine(mCPE); // start processing mCPE.process(); } catch (UIMAException e) { e.printStackTrace(); } }
public static void main(String[] args) throws IOException, UIMAException, CpeDescriptorException { if (args.length != 1) { System.err.println("Usage: <cpeDescriptorPath>"); return; } String cpeDescPath = args[0]; XMLInputSource cpeDescSource = new XMLInputSource(cpeDescPath); CpeDescription cpeDesc = UIMAFramework.getXMLParser().parseCpeDescription(cpeDescSource); // produce CollectionProcessingEngine cpe = UIMAFramework .produceCollectionProcessingEngine(cpeDesc); cpe.addStatusCallbackListener(new ReportingStatusCallbackListener(cpe)); // run cpe.process(); } }
@Override protected Object call() throws Exception { try { mCPE = null; mCPE = UIMAFramework.produceCollectionProcessingEngine(currentCpeDesc); TaskStatusCallbackListenerImpl statCbL = new TaskStatusCallbackListenerImpl(this, logger); mCPE.addStatusCallbackListener(statCbL); statCbL.setCollectionProcessingEngine(mCPE); // start processing mCPE.process(); } catch (UIMAException e) { e.printStackTrace(); } return null; }
public CollectionProcessingEngine createCpe() throws ResourceInitializationException, CpeDescriptorException { ResourceManager resMgr = UIMAFramework.newDefaultResourceManager(); if (maxProcessingUnitThreatCount == 0) { cpeDesc.getCpeCasProcessors().setPoolSize(3); } else { cpeDesc.getCpeCasProcessors().setPoolSize(maxProcessingUnitThreatCount + 2); cpeDesc.setProcessingUnitThreadCount(maxProcessingUnitThreatCount); } CollectionProcessingEngine cpe = UIMAFramework.produceCollectionProcessingEngine(cpeDesc, resMgr, null); return cpe; }
private void startProcessing() { // Check that Collection Reader is selected if (collectionReaderDesc == null) { JOptionPane.showMessageDialog(MyCpmPanel.this, "No Collection Reader has been selected", "Error", JOptionPane.ERROR_MESSAGE); transportControlPanel.reset(); resetScreen(); return; } try { // update the parameter overrides according to GUI settings updateCpeDescriptionParameterOverrides(); // intantiate CPE mCPE = null; // to allow GC of previous ae's that may // hold onto lots of memory e.g. OpenNLP mCPE = UIMAFramework.produceCollectionProcessingEngine(currentCpeDesc); // attach callback listener StatusCallbackListenerImpl statCbL = new StatusCallbackListenerImpl(); mCPE.addStatusCallbackListener(statCbL); // start processing mCPE.process(); } catch (Exception ex) { resetScreen(); displayError(ex); } }
/** * Start processing. */ private void startProcessing() { // Check that Collection Reader is selected if (collectionReaderDesc == null) { JOptionPane.showMessageDialog(CpmPanel.this, "No Collection Reader has been selected", "Error", JOptionPane.ERROR_MESSAGE); transportControlPanel.reset(); resetScreen(); return; } try { // update the parameter overrides according to GUI settings updateCpeDescriptionParameterOverrides(); // intantiate CPE mCPE = null; // to allow GC of previous ae's that may // hold onto lots of memory e.g. OpenNLP mCPE = UIMAFramework.produceCollectionProcessingEngine(currentCpeDesc); // attach callback listener StatusCallbackListenerImpl statCbL = new StatusCallbackListenerImpl(); mCPE.addStatusCallbackListener(statCbL); // start processing mCPE.process(); } catch (Exception ex) { resetScreen(); displayError(ex); } }
throws IOException, InvalidXMLException, ResourceInitializationException { CollectionProcessingEngine cpe = UIMAFramework.produceCollectionProcessingEngine( (CpeDescription) specifier, resource_manager, null);
.produceCollectionProcessingEngine(cpeDesc); cpe.addStatusCallbackListener(new ReportingStatusCallbackListener(cpe));
mCPE = UIMAFramework.produceCollectionProcessingEngine(cpeDesc);