@Override public void addAlignments(JCas input) throws EDAException { // Here, just one aligner... (same lemma linker) try { aligner.annotate(input); } catch (PairAnnotatorComponentException pe) { throw new EDAException("Underlying aligner raised an exception", pe); } }
e.printStackTrace(); } catch (ComponentException e) { System.err.println("Problem running a component of the EDA");
@Override public void addAlignments(JCas input) throws EDAException { try { identicalLemmaLinker.annotate(input); } catch (PairAnnotatorComponentException pe) { throw new EDAException("Underlying aligner raised an exception", pe); } }
protected DecisionLabelWithConfidence classifyEntailment(Vector<FeatureValue> fValues) throws EDAException { DecisionLabelWithConfidence dl = null; try { dl = classifier.classifyInstance(fValues); } catch (ClassifierException ce) { throw new EDAException("underlying classifier throw exception", ce); } return dl; }
public void initialize(File classifierModelFile) throws EDAException { try { classifier.loadClassifierModel(classifierModelFile); } catch (ClassifierException ce) { throw new EDAException("Loading classifier model and/or parameter failed: ", ce); } }
protected DecisionLabelWithConfidence classifyEntailment(Vector<FeatureValue> fValues) throws EDAException { DecisionLabelWithConfidence dl = null; try { dl = classifier.classifyInstance(fValues); } catch (ClassifierException ce) { throw new EDAException("underlying classifier throw exception", ce); } return dl; }
@Override public void addAlignments(JCas input) throws EDAException { try { identicalLemmaLinker.annotate(input); // meteorParaphraseLinker.annotate(input); // derivBaseLinker.annotate(input); // distSimLinker.annotate(input); // germaNetLinker.annotate(input); } catch (PairAnnotatorComponentException pe) { throw new EDAException("Underlying aligner raised an exception", pe); } }
/** * Optional methods (steps) that can be overridden. --- but these * methods provide default functionalities. You can extend if you want. * But default implementations would also work as well. */ protected EDAClassifierAbstraction prepareClassifier() throws EDAException { try { return new EDABinaryClassifierFromWeka(); } catch (ClassifierException ce) { throw new EDAException("Preparing an instance of Classifier for EDA failed: underlying Classifier raised an exception: ", ce); } }
/** * Optional methods (steps) that can be overridden. --- but these * methods provide default functionalities. You can extend if you want. * But default implementations would also work as well. */ protected EDAClassifierAbstraction prepareClassifier() throws EDAException { try { return new EDABinaryClassifierFromWeka(); } catch (ClassifierException ce) { throw new EDAException("Preparing an instance of Classifier for EDA failed: underlying Classifier raised an exception: ", ce); } }
public void initialize(File modelToLoadBaseName) throws EDAException { File classifierModelFile = new File(modelToLoadBaseName.getAbsolutePath() + CLASSIFIER_MODEL_POSTFIX); File paramSerFile = new File(modelToLoadBaseName.getAbsolutePath() + PARAMETER_SER_POSTFIX); try { classifier.loadClassifierModel(classifierModelFile); loadEDAStates(paramSerFile); } catch (ClassifierException ce) { throw new EDAException("Loading classifier model and/or parameter failed: ", ce); } }
/** * This method will be used to check input CAS for P1EDA flow. * As is, it will do the basic check of CAS as EOP CAS input, via PlatformCASProber.probeCAS(). * * If you want to do additional checks, such as existence of specific LAP annotations, * You can extend this class to do the checks. * * EXTENSION of this method is optional, and not mandatory. * * @param input JCas that is given to your EDA * @throws EDAException If the given JCas was not well-formed for your EDA, you should throw this exception */ protected void checkInputJCas(JCas input) throws EDAException { try { probeCas(input, null); } catch (LAPException e) { throw new EDAException("Input CAS is not well-formed CAS as EOP EDA input.", e); } }
throw new EDAException("File not found: "+ paramSerFile.getAbsolutePath()); throw new EDAException("Reading and deserilaizing the file failed: "+ paramSerFile.getAbsolutePath(), i); throw new EDAException("Integrity failure --- serialization file is of an unknown class type that is not parameters "+ paramSerFile.getAbsolutePath(), c);
/** * This method will be used to check input CAS for P1EDA flow. * As is, it will do the basic check of CAS as EOP CAS input, via PlatformCASProber.probeCAS(). * * If you want to do additional checks, such as existence of specific LAP annotations, * You can extend this class to do the checks. * * EXTENSION of this method is optional, and not mandatory. * * @param input JCas that is given to your EDA * @throws EDAException If the given JCas was not well-formed for your EDA, you should throw this exception */ protected void checkInputJCas(JCas input) throws EDAException { try { probeCas(input, null); } catch (LAPException e) { throw new EDAException("Input CAS is not well-formed CAS as EOP EDA input.", e); } }
throw new EDAException("IO operation to store / serialize parameters failed", io);
@Override public void addAlignments(JCas input) throws EDAException { try { identicalLemmaLinker.annotate(input); paraphraseLinker.annotate(input); } catch (PairAnnotatorComponentException pe) { throw new EDAException("Underlying aligner raised an exception", pe); } }
@Override public void addAlignments(JCas input) throws EDAException { try { identicalLemmaLinker.annotate(input); meteorParaphraseLinker.annotate(input); // derivBaseLinker.annotate(input); // distSimLinker.annotate(input); } catch (PairAnnotatorComponentException pe) { throw new EDAException("Underlying aligner raised an exception", pe); } }
@Override public void addAlignments(JCas input) throws EDAException { try { identicalLemmaLinker.annotate(input); // meteorParaphraseLinker.annotate(input); derivBaseLinker.annotate(input); // distSimLinker.annotate(input); // germaNetLinker.annotate(input); } catch (PairAnnotatorComponentException pe) { throw new EDAException("Underlying aligner raised an exception", pe); } }
@Override public void addAlignments(JCas input) throws EDAException { try { identicalLemmaLinker.annotate(input); // meteorParaphraseLinker.annotate(input); // derivBaseLinker.annotate(input); // distSimLinker.annotate(input); germaNetLinker.annotate(input); } catch (PairAnnotatorComponentException pe) { throw new EDAException("Underlying aligner raised an exception", pe); } }
@Override public void addAlignments(JCas input) throws EDAException { // Here, just one aligner... (same lemma linker) try { aligner1.annotate(input); aligner2.annotate(input); // aligner3.annotate(input); // WordNet. Really slow in its current form. (several hours) // aligner4.annotate(input); // not to be used by TL. (due to need of external path) } catch (PairAnnotatorComponentException pe) { throw new EDAException("Underlying aligner raised an exception", pe); } }
@Override public void addAlignments(JCas input) throws EDAException { // Here, just one aligner... (same lemma linker) try { aligner1.annotate(input); aligner2.annotate(input); // aligner3.annotate(input); // WordNet. Really slow in its current form. (several hours) // aligner4.annotate(input); } catch (PairAnnotatorComponentException pe) { throw new EDAException("Underlying aligner raised an exception", pe); } }