本文整理汇总了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();
}