Created
March 4, 2014 08:26
-
-
Save renaud/9342376 to your computer and use it in GitHub Desktop.
Hello Ruta from whithin UIMAfit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.apache.uima.ruta.engine; | |
import static org.junit.Assert.assertEquals; | |
import java.util.Collection; | |
import org.apache.uima.fit.factory.JCasFactory; | |
import org.apache.uima.fit.util.JCasUtil; | |
import org.apache.uima.jcas.JCas; | |
import org.junit.Test; | |
public class Ruta101 { | |
@Test | |
public void testRuta() throws Exception { | |
JCas jCas = JCasFactory.createJCas(myTypeSystem); | |
jCas.setDocumentText("hello world"); | |
Ruta.apply(jCas.getCas(), "\"hello\"-> Token;"); | |
Collection<Token> tokens = JCasUtil.select(jCas, Token.class); | |
assertEquals(1, tokens.size()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment