001package org.cleartk.clearnlp; 002 003import java.util.List; 004 005import org.apache.uima.jcas.JCas; 006import org.apache.uima.jcas.tcas.Annotation; 007 008import com.google.common.annotations.Beta; 009 010/** 011 * Defines common set of token data type operations used to convert to and query from 012 * the target type system 013 * 014 * @author Lee Becker 015 * 016 */ 017@Beta 018public interface TokenOps<TOKEN_TYPE> { 019 020 TOKEN_TYPE createToken(JCas jCas, int begin, int end); 021 022 List<TOKEN_TYPE> selectTokens(JCas jCas, Annotation coveringAnnotation); 023 024 String getPos(JCas jCas, TOKEN_TYPE token); 025 026 void setPos(JCas jCas, TOKEN_TYPE token, String posTag); 027 028 String getLemma(JCas jCas, TOKEN_TYPE token); 029 030 void setLemma(JCas jCas, TOKEN_TYPE token, String lemma); 031 032}