Package org.apache.uima.analysis_engine.annotator

Examples of org.apache.uima.analysis_engine.annotator.AnnotatorProcessException


      }

    } catch (Exception e)
    {

      throw new AnnotatorProcessException(e);
    }
      }
View Full Code Here


      // logger.logFinest("Number of annotations in CAS: " +
      // (tcas.getAnnotationIndex().size() - 1));
      // System.out.println("Number of annotations in CAS: " +
      // (tcas.getAnnotationIndex().size() - 1));
    } catch (Exception e) {
      throw new AnnotatorProcessException(e);
    }
    // System.err.println ("ConceptMapper.process() end");
  }
View Full Code Here

  public void process(JCas jcas, ResultSpecification aResultSpec) throws AnnotatorProcessException {

    try {
      doTokenization(jcas, jcas.getDocumentText(), getDelim());
    } catch (Exception e) {
      throw new AnnotatorProcessException(e);
    }
  }
View Full Code Here

            {
                pcsClassification = nVal;
                navName = nav.getAttributeName();
            } else
            {
                throw new AnnotatorProcessException(new Exception(
                        "Nominal value not part of " + Const.class + ": "
                                + nVal));
            }
            removalList.add(nav);
        }
View Full Code Here

      // final doc classification needs to be added to the original cas
      collectionProcessComplete(jcas);
    } catch (Exception aep) {
      try {
        throw new AnnotatorProcessException(aep);
      } catch (AnnotatorProcessException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
    }
View Full Code Here

        }

      }
    } catch (Exception e) {
      e.printStackTrace();
      throw new AnnotatorProcessException(e);
    }

  }
View Full Code Here

      }

    } catch (Exception e)
    {

      throw new AnnotatorProcessException(e);
    }
      }
View Full Code Here

                return null;
            }
        }
        catch (Exception e)
        {
            throw new AnnotatorProcessException(e);
        }
    }
View Full Code Here

      // get stem() method from stemmer
      Method stemmerStemMethod;
      try {
        stemmerStemMethod = stemmer.getClass().getMethod("stem", new Class[0]);
      } catch (Exception ex) {
        throw new AnnotatorProcessException(ex);
      }

      // iterate over all token annotations and add stem if available
      FSIterator tokenIterator = aJCas.getCas().getAnnotationIndex(this.tokenAnnotation).iterator();
      while (tokenIterator.hasNext()) {
        // get token content
        AnnotationFS annot = (AnnotationFS) tokenIterator.next();
        String span = annot.getCoveredText();

        // set annotation content and call stemmer
        try {
          stemmer.setCurrent(span);
          stemmerStemMethod.invoke(stemmer, emptyArgs);
        } catch (Exception ex) {
          throw new AnnotatorProcessException(ex);
        }

        // get stemmer result and set annotation feature
        annot.setStringValue(this.tokenAnnotationStemmFeature, stemmer.getCurrent());
      }
View Full Code Here

        engine.typeSystemInit(serializer);
      }
      engine.process(aResultSpec, cas, false);
    } catch (UimacppException e) {
      logJTafException(e);
      throw new AnnotatorProcessException(e);
    } catch (SAXException e) {
      throw new AnnotatorProcessException(e);
    } catch (IOException e) {
      throw new AnnotatorProcessException(e);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.uima.analysis_engine.annotator.AnnotatorProcessException

Copyright © 2018 www.massapicom. 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.