Package org.apache.uima

Examples of org.apache.uima.UIMAException


        builder.directory(startingDir);
      }

      uimacppProcess = builder.start();
      if (uimacppProcess == null) {
        throw new UIMAException(new Throwable("Could not fork process."));
      }

      stdoutHandler = new StdoutHandler(uimacppProcess, uimaLogger);
      Thread t3 = new Thread(stdoutHandler);
      t3.start();
View Full Code Here


    T annotation;
    try {
      annotation = cls.getConstructor(JCas.class, Integer.TYPE, Integer.TYPE).newInstance(jCas,
              begin, end);
    } catch (Exception e) {
      throw new UIMAException(e);
    }
    annotation.addToIndexes();
    return annotation;
  }
View Full Code Here

      // get AlchemyAPI keywords extracted using UIMA
      keywords.addAll(UIMAUtils.getAllFSofType(KeywordFS.type, jcas));

    } catch (Exception e) {
      throw new UIMAException(e);
    }

    return keywords;
  }
View Full Code Here

      // extract language Feature Structure using AlchemyAPI Annotator
      languageFS = UIMAUtils.getSingletonFeatureStructure(LanguageFS.type, jcas);

    } catch (Exception e) {
      throw new UIMAException(e);
    }

    return languageFS;
  }
View Full Code Here

      // extract entities using OpenCalaisAnnotator
      calaisAnnotations.addAll(UIMAUtils.getAllAnnotationsOfType(org.apache.uima.calais.BaseType.type, jcas));

    } catch (Exception e) {
      throw new UIMAException(e);
    }
    return calaisAnnotations;
  }
View Full Code Here

      // extract category Feature Structure using AlchemyAPI Annotator
      categoryFS = UIMAUtils.getSingletonFeatureStructure(Category.type, jcas);

    } catch (Exception e) {
      throw new UIMAException(e);
    }

    return categoryFS;
  }
View Full Code Here

      // get AlchemyAPI concepts extracted using UIMA
      concepts.addAll(UIMAUtils.getAllFSofType(ConceptFS.type, jcas));

    } catch (Exception e) {
      throw new UIMAException(e);
    }

    return concepts;
  }
View Full Code Here

     
      /* fork the C++ process */
      uimacppProcess = builder.start();
     
      if (uimacppProcess == null) {
        throw new UIMAException(new Throwable("Could not fork process."));
      }

      stdoutHandler = new StdoutHandler(uimacppProcess, uimaLogger);
      Thread t3 = new Thread(stdoutHandler);
      t3.start();
View Full Code Here

    Sentence sentence = AnnotationFactory.createAnnotation(jCas, 0, 10, Sentence.class);
    assertEquals(0, sentence.getBegin());
    assertEquals(10, sentence.getEnd());

    UIMAException ue = null;
    try {
      AnnotationFactory.createAnnotation(null, 0, 10, Sentence.class);
    } catch (UIMAException e) {
      ue = e;
    }
View Full Code Here

     
      /* fork the C++ process */
      uimacppProcess = builder.start();
     
      if (uimacppProcess == null) {
        throw new UIMAException(new Throwable("Could not fork process."));
      }

      stdoutHandler = new StdoutHandler(uimacppProcess, uimaLogger);
      Thread t3 = new Thread(stdoutHandler);
      t3.start();
View Full Code Here

TOP

Related Classes of org.apache.uima.UIMAException

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.