Package org.apache.uima.alchemy.digester.keyword

Examples of org.apache.uima.alchemy.digester.keyword.XMLTextKeywordExctractionDigester


public class KeywordXMLDigesterTest extends TestCase {

  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);
View Full Code Here

TOP

Related Classes of org.apache.uima.alchemy.digester.keyword.XMLTextKeywordExctractionDigester

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.