Package org.apache.uima.alchemy.digester.domain

Examples of org.apache.uima.alchemy.digester.domain.KeywordResults


  public void testParseAlchemyXML() {
    try {
      String xmlString = "<results><status>OK</status><language>english</language><keywords><keyword>pluto</keyword><keyword>pippo</keyword></keywords></results>";
      XMLTextKeywordExctractionDigester digester = new XMLTextKeywordExctractionDigester();
      KeywordResults results = (KeywordResults) digester.parseAlchemyXML(new ByteArrayInputStream(
              xmlString.getBytes()));
      assertTrue(results != null);
      assertTrue(results.getLanguage() != null);
      assertTrue(results.getStatus() != null);
      assertTrue(results.getKeywords().size() == 2);
    } catch (Exception e) {
      e.printStackTrace();
      fail();
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.uima.alchemy.digester.domain.KeywordResults

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.