本文整理匯總了Java中org.apache.uima.cas.Type.getShortName方法的典型用法代碼示例。如果您正苦於以下問題:Java Type.getShortName方法的具體用法?Java Type.getShortName怎麽用?Java Type.getShortName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.uima.cas.Type
的用法示例。
在下文中一共展示了Type.getShortName方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getValueOfFS
import org.apache.uima.cas.Type; //導入方法依賴的package包/類
@Override
public UimaPrimitive getValueOfFS(TypeSystem typeSystem, FeatureStructure targetFS) throws NlpTabException {
Collection<Object> values = new LinkedList<>();
FeatureStructure pointer = targetFS;
while (pointer.getType().getName().equals(nonEmptyName)) {
Object value;
try {
value = headMethod.invoke(pointer, headFeature);
} catch (IllegalAccessException | InvocationTargetException e) {
throw new NlpTabException(e);
}
values.add(value);
pointer = pointer.getFeatureValue(tailFeature);
}
Type type = targetFS.getType();
String typeShortName = type.getShortName();
return new UimaPrimitive(values, typeShortName);
}
示例2: getValueOfFeature
import org.apache.uima.cas.Type; //導入方法依賴的package包/類
@Override
public UimaPrimitive getValueOfFeature(TypeSystem typeSystem, Feature feature, FeatureStructure featureStructure) throws NlpTabException {
FeatureStructure targetFS = featureStructure.getFeatureValue(feature);
UimaPrimitive uimaPrimitive;
if (targetFS != null) {
uimaPrimitive = getValueOfFS(typeSystem, targetFS);
} else {
Type range = feature.getRange();
String rangeShortName = range.getShortName();
uimaPrimitive = new UimaPrimitive(null, rangeShortName);
}
return uimaPrimitive;
}
示例3: createTargetMatcher
import org.apache.uima.cas.Type; //導入方法依賴的package包/類
public CompositeMatcher<AnnotationFS> createTargetMatcher(Type targetType) {
String matcherId = targetType.getShortName();
CompositeMatcher.AnnotationMatcherBuilder builder = (CompositeMatcher.AnnotationMatcherBuilder) getBuilder(
matcherId,
targetType);
return builder.build();
}
示例4: getTypeLabel
import org.apache.uima.cas.Type; //導入方法依賴的package包/類
protected String getTypeLabel(Type t) {
return t.getShortName();
}
示例5: TypeMatcher
import org.apache.uima.cas.Type; //導入方法依賴的package包/類
public TypeMatcher(TypeSystem typeSystem, Type type) {
this.typeSystem = typeSystem;
this.type = type;
this.label = type.getShortName();
}