/** 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) { super.setDocument(newDocument); }
/** * Checks the parameters set to this gazetteer * @throws ResourceInstantiationException if something goes wrong */ private void checkParameters() throws ResourceInstantiationException { boolean set = null!=gazetteerName; set &= null!=listsURL; set&=null!=mappingURL; if (!set) { throw new ResourceInstantiationException("some parameters are not set (e.g.gazetteerName," +"listURL,mappingDefinition, document"); } } // checkParameters
@Override public Resource init()throws ResourceInstantiationException{ if(lexiconURL == null){ throw new ResourceInstantiationException( "NoURL provided for the lexicon!"); } if(rulesURL == null){ throw new ResourceInstantiationException( "No URL provided for the rules!"); } try{ tagger = new hepple.postag.POSTagger(lexiconURL.toURL(),rulesURL.toURL(), encoding, separator); }catch(IOException | InvalidRuleException e){ throw new ResourceInstantiationException(e); } return this; }
public void setBinaryGrammarURL(URL binaryGrammarURL) { try { this.setBinaryGrammarURL(new ResourceReference(binaryGrammarURL)); } catch(URISyntaxException e) { throw new RuntimeException("Error converting URL to ResourceReference",e); } }
@Deprecated public void setGrammarURL(URL grammar) { try { this.setGrammarURL(new ResourceReference(grammar)); } catch(URISyntaxException e) { throw new RuntimeException("Error converting URL to ResourceReference",e); } }
@HiddenCreoleParameter @Override public void setBinaryGrammarURL(ResourceReference grammar) { super.setBinaryGrammarURL(grammar); }
/** * The ontology parameter is not used for this PR and therefore hidden. * * @param ontology */ @HiddenCreoleParameter @Override public void setOntology(gate.creole.ontology.Ontology ontology) { super.setOntology(ontology); }
@Deprecated public void setBinaryGrammarURL(URL url) { try { this.setBinaryGrammarURL(new ResourceReference(url)); } catch(URISyntaxException e) { throw new RuntimeException("Error converting URL to ResourceReference",e); } }
@Deprecated public void setLexiconURL(URL newLexiconURL) { try { this.setLexiconURL(new ResourceReference(newLexiconURL)); } catch (URISyntaxException e) { throw new RuntimeException("Error converting URL to ResourceReference", e); } }
@Deprecated public void setRulesURL(java.net.URL newRulesURL) { try { this.setRulesURL(new ResourceReference(newRulesURL)); } catch (URISyntaxException e) { throw new RuntimeException("Error converting URL to ResourceReference", e); } }
@Override public synchronized void interrupt() { super.interrupt(); }
@HiddenCreoleParameter @Override public void setOperators(List<String> operators) { super.setOperators(operators); }
public SerializeTransducerAction() { super("Serialize Transducer"); putValue(SHORT_DESCRIPTION, "Serializes the Transducer as binary file"); }
public void close(){ annieController.cleanup(); }
/** Initialise this resource, and return it. */ @Override public Resource init() throws ResourceInstantiationException { Resource result = super.init(); return result; } // init()
/** Initialise this resource, and return it. */ @Override public Resource init() throws ResourceInstantiationException { return super.init(); } // init()