Examples of parseConceptFile()


Examples of org.apache.uima.annotator.regex.ConceptFileParser.parseConceptFile()

            this.logger.logrb(Level.CONFIG, "RegExAnnotator", "initialize",
                  MESSAGE_DIGEST, "regex_annotator_rule_set_file",
                  new Object[] { file.getFilePath() });

            // parse concept file to internal objects
            Concept[] currentConcepts = parser.parseConceptFile(file
                  .getFilePath(), file.getStream());
            // add all concepts to the concepts list
            for (int c = 0; c < currentConcepts.length; c++) {
               concepts.add(currentConcepts[c]);
            }
View Full Code Here

Examples of org.apache.uima.annotator.regex.ConceptFileParser.parseConceptFile()

      }

      for (ConceptFile file : cfList) {
        // parse concept file to internal objects
        Concept[] currentConcepts = parser.parseConceptFile(file.getFilePath(), file.getStream());
        try {
          file.getStream().close();
        } catch (IOException e) {
          this.logger.logrb(Level.WARNING, "RegExAnnotator", "initialize", MESSAGE_DIGEST,
              "regex_annotator_error_closing_input_stream", new Object[] { file.getFilePath(),
View Full Code Here

Examples of org.apache.uima.annotator.regex.impl.ConceptFileParser_impl.parseConceptFile()

  public void testSyntaxCheck() throws Exception {
    File conceptFile = JUnitExtension.getFile("conceptSyntax/syntaxCheck.xml");
    InputStream stream = new BufferedInputStream(new FileInputStream(conceptFile));
    //parse concept file
    ConceptFileParser parser = new ConceptFileParser_impl();
    Concept[] concepts = parser.parseConceptFile(conceptFile.getAbsolutePath(), stream);

    File outputFile = new File(conceptFile.getParent(), "syntaxCheck_current.txt");
    OutputStreamWriter fileWriter = new OutputStreamWriter(new FileOutputStream(outputFile, false),
            "UTF-8");
View Full Code Here

Examples of org.apache.uima.annotator.regex.impl.ConceptFileParser_impl.parseConceptFile()

    InputStream stream = new BufferedInputStream(new FileInputStream(conceptFile));
   
    try {
      //parse empty concept file
      ConceptFileParser parser = new ConceptFileParser_impl();
      parser.parseConceptFile(conceptFile.getAbsolutePath(), stream);
    } catch (ResourceInitializationException ex) {
      //we get an exception... what is correct!
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.