@Override public synchronized void interrupt() { super.interrupt(); }
/** Initialise this resource, and return it. */ @Override public Resource init() throws ResourceInstantiationException { Resource result = super.init(); return result; } // init()
@Override public void cleanup() { super.cleanup(); pronominalModule.cleanup(); }
params.put(Transducer.TRANSD_INPUT_AS_PARAMETER_NAME, annotationSetName); params.put(Transducer.TRANSD_OUTPUT_AS_PARAMETER_NAME, annotationSetName); transducer.setParameterValues(params); transducer.addProgressListener(pListener); transducer.addStatusListener(sListener); + "\" tokeniser has been abruptly interrupted!", e); } finally { transducer.removeProgressListener(pListener); transducer.removeStatusListener(sListener); transducer.setDocument(null);
try{ super.init(); transducer = (AbstractLanguageAnalyser)Factory.createResource("gate.creole.Transducer", params, features); transducer.setName("Transducer " + System.currentTimeMillis()); transducer.setParameterValues(params); transducer.reInit();
"gate.creole.Transducer", params, features); transducer.setName("Transducer " + System.currentTimeMillis()); transducer.setParameterValues(params); transducer.reInit();
/** Set the document to run on. */ @Override public void setDocument(Document newDocument) { super.setDocument(newDocument); }
@Override public void reInit() throws ResourceInstantiationException { super.reInit(); fireGazetteerEvent(new GazetteerEvent(this,GazetteerEvent.REINIT)); }//reInit()
params.put(Transducer.TRANSD_INPUT_AS_PARAMETER_NAME, inputASName); params.put(Transducer.TRANSD_OUTPUT_AS_PARAMETER_NAME, inputASName); transducer.setParameterValues(params); transducer.addProgressListener(pListener); transducer.addStatusListener(sListener); Benchmark.executeWithBenchmarking(transducer, Benchmark.createBenchmarkId("SentenceSplitterTransducer", throw new ExecutionException(e); } finally { transducer.setDocument(null); transducer.removeProgressListener(pListener); transducer.removeStatusListener(sListener);
/** Set the document to run on. */ @Override public void setDocument(Document newDocument) { // Assert.assertNotNull(newDocument); this.pronominalModule.setDocument(newDocument); super.setDocument(newDocument); }
/** * Notifies all the PRs in this controller that they should stop their * execution as soon as possible. */ @Override public synchronized void interrupt(){ interrupted = true; gazetteer.interrupt(); transducer.interrupt(); }
/** Initialise this resource, and return it. */ @Override public Resource init() throws ResourceInstantiationException { return super.init(); } // init()
/** Set the document to run on. */ @Override public void setDocument(Document newDocument) { //0. precondition // assert (null != newDocument); //1. set doc for aggregated components qtTransducer.setDocument(newDocument); pleonTransducer.setDocument(newDocument); //3. delegate super.setDocument(newDocument); }
@Override public void cleanup() { super.cleanup(); Factory.deleteResource(qtTransducer); Factory.deleteResource(pleonTransducer); }
/** * Notifies all the PRs in this controller that they should stop their * execution as soon as possible. */ @Override public synchronized void interrupt(){ interrupted = true; tokeniser.interrupt(); transducer.interrupt(); }
/** Initialise this resource, and return it. */ @Override public Resource init() throws ResourceInstantiationException { return super.init(); } // init()
@Override public synchronized void interrupt() { super.interrupt(); jape.interrupt(); }
@Override public Resource init() throws ResourceInstantiationException { super.init(); try { //sanity checks if(internalSplitListURL == null) throw new ResourceInstantiationException("No list of internal splits provided!"); if(externalSplitListURL == null) throw new ResourceInstantiationException("No list of external splits provided!"); if(nonSplitListURL == null) throw new ResourceInstantiationException("No list of non splits provided!"); if(encoding == null) throw new ResourceInstantiationException("No encoding provided!"); //load the known abbreviations list internalSplitsPattern = compilePattern(internalSplitListURL.toURL(), encoding); externalSplitsPattern = compilePattern(externalSplitListURL.toURL(), encoding); nonSplitsPattern = compilePattern(nonSplitListURL.toURL(), encoding); } catch(UnsupportedEncodingException e) { throw new ResourceInstantiationException(e); } catch(IOException e) { throw new ResourceInstantiationException(e); } return this; }