热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.apache.uima.analysis_engine.AnalysisEngineDescription.isPrimitive()方法的使用及代码示例

本文整理了Java中org.apache.uima.analysis_engine.AnalysisEngineDescription.isPrimitive()方法的

本文整理了Java中org.apache.uima.analysis_engine.AnalysisEngineDescription.isPrimitive()方法的一些代码示例,展示了AnalysisEngineDescription.isPrimitive()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AnalysisEngineDescription.isPrimitive()方法的具体详情如下:
包路径:org.apache.uima.analysis_engine.AnalysisEngineDescription
类名称:AnalysisEngineDescription
方法名:isPrimitive

AnalysisEngineDescription.isPrimitive介绍

[英]Retrieves whether the AnalysisEngine is primitive (consisting of one annotator), as opposed to aggregate (containing multiple delegate AnalysisEngines).

Some of the methods on this class apply only to one type of AnalysisEngine:
#getAnnotatorImplementationName() - primitive AnalysisEngine only
#getDelegateAnalysisEngineSpecifiers() - aggregate AnalysisEngine only
#getFlowControllerDeclaration() - aggregate AnalysisEngine only
[中]检索AnalysisEngine是否为基元(由一个注释器组成),而不是聚合(包含多个委托AnalysisEngine)。
此类中的某些方法仅适用于一种类型的AnalysisEngine:
#getAnnotatorImplementationName()-仅原语分析引擎
#getDelegateAnalysisEngineSpecifiers()-仅聚合AnalysisEngine
#GetFlowControllerDeparation()-仅聚合分析引擎

代码示例

代码示例来源:origin: org.apache.uima/uimaj-ep-configurator

/**
* Checks if is primitive.
*
* @return true, if is primitive
*/
protected boolean isPrimitive() {
return editor.getAeDescription().isPrimitive();
}

代码示例来源:origin: org.apache.uima/uimaj-ep-configurator

/**
* Checks if is aggregate.
*
* @return true, if is aggregate
*/
public boolean isAggregate() {
return isAeDescriptor() && (!aeDescription.isPrimitive());
}

代码示例来源:origin: org.apache.uima/uimaj-ep-configurator

/**
* Checks if is primitive.
*
* @return true, if is primitive
*/
public boolean isPrimitive() {
return isLocalProcessingDescriptor() && aeDescription.isPrimitive();
}

代码示例来源:origin: org.dkpro.tc/dkpro-tc-ml

&& !((AnalysisEngineDescription) aDesc).isPrimitive()) {
throw new IllegalArgumentException(
"Only primitive meta collectors currently supported.");

代码示例来源:origin: dkpro/dkpro-tc

&& !((AnalysisEngineDescription) aDesc).isPrimitive()) {
throw new IllegalArgumentException(
"Only primitive meta collectors currently supported.");

代码示例来源:origin: dkpro/dkpro-tc

if (!((AnalysisEngineDescription) aDesc).isPrimitive()) {
throw new IllegalArgumentException(
"Only primitive meta collectors currently supported.");

代码示例来源:origin: org.dkpro.tc/dkpro-tc-core

if (!((AnalysisEngineDescription) aDesc).isPrimitive()) {
throw new IllegalArgumentException(
"Only primitive meta collectors currently supported.");

代码示例来源:origin: org.apache.uima/uimafit-core

/**
* This method simply calls {@link #add(String, AnalysisEngineDescription, String...)} using the
* result of {@link AnalysisEngineDescription#getAnnotatorImplementationName()} for the component
* name
*
* @param aed
* an analysis engine description to add to the aggregate analysis engine
* @param viewNames
* pairs of view names corresponding to a componentSofaName followed by the
* aggregateSofaName that it is mapped to. An even number of names must be passed in or
* else an IllegalArgumentException will be thrown. See
* {@link SofaMappingFactory#createSofaMapping(String, String, String)}
*
* @return the name of the component generated for the {@link AnalysisEngineDescription}
*/
public String add(AnalysisEngineDescription aed, String... viewNames) {
String compOnentName= aed.getAnalysisEngineMetaData().getName();
if (compOnentName== null || componentName.equals("")) {
if (aed.isPrimitive()) {
compOnentName= aed.getAnnotatorImplementationName();
} else {
compOnentName= "aggregate";
}
}
if (componentNames.contains(componentName)) {
compOnentName= componentName + "." + (componentNames.size() + 1);
}
add(componentName, aed, viewNames);
return componentName;
}

代码示例来源:origin: CLLKazan/UIMA-Ext

Map delegateParameterNames) {
AnalysisEngineMetaData aggrMeta = aggrDesc.getAnalysisEngineMetaData();
if (aggrDesc.isPrimitive()) {
throw new IllegalArgumentException(String.format(
"The provided AE descriptor (name=%s) is primitive",

代码示例来源:origin: org.apache.uima/uimafit-core

/**
* Scan the given resource specifier for external resource dependencies and whenever a dependency
* a compatible type is found, the given resource is bound to it.
*
* @param aDesc
* a description.
* @param aResDesc
* the resource description.
*/
private static void bind(AnalysisEngineDescription aDesc, ExternalResourceDescription aResDesc)
throws InvalidXMLException, ClassNotFoundException {
// Recursively address delegates
if (!aDesc.isPrimitive()) {
for (Object delegate : aDesc.getDelegateAnalysisEngineSpecifiers().values()) {
bindResource((ResourceSpecifier) delegate, aResDesc);
}
}
// Bind if necessary
Class resClass = Class.forName(getImplementationName(aResDesc));
for (ExternalResourceDependency dep : aDesc.getExternalResourceDependencies()) {
Class apiClass = Class.forName(dep.getInterfaceName());
// Never bind fields of type Object. See also ExternalResourceInitializer#getApi()
if (apiClass.equals(Object.class)) {
continue;
}
if (apiClass.isAssignableFrom(resClass)) {
bindExternalResource(aDesc, dep.getKey(), aResDesc);
}
}
}

代码示例来源:origin: org.apache.uima/uimaj-ep-configurator

/**
* Adds the delegate to GUI.
*
* @param keys the keys
* @param newKey the new key
* @param o the o
*/
private void addDelegateToGUI(String keys, String newKey, ResourceSpecifier o) {
if (o instanceof AnalysisEngineDescription) {
AnalysisEngineDescription aeDescription = (AnalysisEngineDescription) o;
if (aeDescription.isPrimitive())
addPrimitiveToGUI(keys + newKey + "/", aeDescription);
else {
for (Iterator it = editor.getDelegateAEdescriptions(aeDescription).entrySet().iterator(); it
.hasNext();) {
Map.Entry item = (Map.Entry) it.next();
addDelegateToGUI(keys + newKey + "/", (String) item.getKey(), (ResourceSpecifier) item
.getValue());
}
FlowControllerDeclaration fcd = getFlowControllerDeclaration();
if (null != fcd) {
addPrimitiveToGUI(keys + fcd.getKey() + "/", ((ResourceCreationSpecifier) editor
.getResolvedFlowControllerDeclaration().getSpecifier()));
}
}
}
}

代码示例来源:origin: org.apache.uima/uimafit-core

/**
* Scan the given resource specifier for external resource dependencies and whenever a dependency
* with the given key is encountered, the given resource is bound to it.
*
* @param aDesc
* a description.
* @param aKey
* the key to bind to.
* @param aResDesc
* the resource description.
*/
private static void bind(AnalysisEngineDescription aDesc, String aKey,
ExternalResourceDescription aResDesc) throws InvalidXMLException {
// Recursively address delegates
if (!aDesc.isPrimitive()) {
for (Object delegate : aDesc.getDelegateAnalysisEngineSpecifiers().values()) {
bindResource((ResourceSpecifier) delegate, aKey, aResDesc);
}
}
// Bind if necessary
for (ExternalResourceDependency dep : aDesc.getExternalResourceDependencies()) {
if (aKey.equals(dep.getKey())) {
bindExternalResource(aDesc, aKey, aResDesc);
}
}
}

代码示例来源:origin: apache/uima-uimaj

} else if (frameworkImpl.startsWith(Constants.JAVA_FRAMEWORK_NAME)) {
if (spec instanceof AnalysisEngineDescription
&& !((AnalysisEngineDescription) spec).isPrimitive()) {
resource = new AggregateAnalysisEngine_impl();
} else {

代码示例来源:origin: org.apache.uima/uimaj-as-core

/**
* Forces initialization of a Cas Pool if this is a Cas Multiplier delegate collocated with an
* aggregate. The parent aggregate calls this method when all type systems have been merged.
*/
public synchronized void onInitialize() {
// Component's Cas Pool is registered lazily, when the process() is called for
// the first time. For monitoring purposes, we need the comoponent's Cas Pool
// MBeans to register during initialization of the service. For a Cas Multiplier
// force creation of the Cas Pool and registration of a Cas Pool with the JMX Server.
// Just get the CAS and release it back to the component's Cas Pool.
if (isCasMultiplier() && !isTopLevelComponent() ) {
boolean isUimaAggregate = false;
if ( !(resourceSpecifier instanceof CollectionReaderDescription) ) {
// determine if this AE is a UIMA aggregate
isUimaAggregate = ((AnalysisEngineDescription) resourceSpecifier).isPrimitive() == false ? true : false;
}
if ( !isUimaAggregate ) { // !uima core aggregate CM
CAS cas = (CAS) getUimaContext().getEmptyCas(CAS.class);
cas.release();
}
}
}

代码示例来源:origin: apache/uima-uimaj

(! ((AnalysisEngineDescription)mDescription).isPrimitive())) {
((AnalysisEngineDescription)mDescription).isPrimitive()) {
try {
md.resolveImports();

代码示例来源:origin: org.apache.uima/uimafit-core

private static void consolidateAggregate(AnalysisEngineDescription aDesc, ResourceManager aResMgr)
throws ResourceInitializationException, InvalidXMLException {
if (aDesc.isPrimitive() || aDesc.getDelegateAnalysisEngineSpecifiers().isEmpty()) {
return;

代码示例来源:origin: org.apache.uima/uimaj-ep-configurator

resolvedFlowCOntrollerDeclaration= aeDescription.getFlowControllerDeclaration();
setTypeSystemDescription(aeDescription.isPrimitive() ? md.getTypeSystem() : null);

代码示例来源:origin: apache/uima-uimaj

&& !((AnalysisEngineDescription) aSpecifier).isPrimitive()) {
return false;

代码示例来源:origin: org.apache.uima/uimaj-ep-configurator

/**
* Validate.
*
* @throws ResourceInitializationException the resource initialization exception
*/
public void validate() throws ResourceInitializationException {
AnalysisEngineDescription ae = (AnalysisEngineDescription) modelRoot.getAeDescription().clone();
// speedup = replace typeSystem with resolved imports version
if (ae.isPrimitive()) {
TypeSystemDescription tsd = modelRoot.getMergedTypeSystemDescription();
if (null != tsd)
tsd = (TypeSystemDescription) tsd.clone();
ae.getAnalysisEngineMetaData().setTypeSystem(tsd);
}
ae.getAnalysisEngineMetaData().setFsIndexCollection(modelRoot.getMergedFsIndexCollection());
ae.getAnalysisEngineMetaData().setTypePriorities(modelRoot.getMergedTypePriorities());
try {
// long time = System.currentTimeMillis();
// System.out.println("Creating TCas model");
cachedResult = modelRoot.createCas(ae, casCreateProperties, modelRoot.createResourceManager());
// System.out.println("Finished Creating TCas model; time= " +
// (System.currentTimeMillis() - time));
if (null == cachedResult)
throw new InternalErrorCDE("null result from createTCas");
} catch (CASAdminException e) {
throw new ResourceInitializationException(e);
}
dirty = false;
modelRoot.allTypes.dirty = true;
}

代码示例来源:origin: org.dkpro.lab/dkpro-lab-uima-engine-simple

if (analysisDesc.isPrimitive()) {
engine = new PrimitiveAnalysisEngine_impl();

推荐阅读
  • 在Android开发中,使用Picasso库可以实现对网络图片的等比例缩放。本文介绍了使用Picasso库进行图片缩放的方法,并提供了具体的代码实现。通过获取图片的宽高,计算目标宽度和高度,并创建新图实现等比例缩放。 ... [详细]
  • 解决VS写C#项目导入MySQL数据源报错“You have a usable connection already”问题的正确方法
    本文介绍了在VS写C#项目导入MySQL数据源时出现报错“You have a usable connection already”的问题,并给出了正确的解决方法。详细描述了问题的出现情况和报错信息,并提供了解决该问题的步骤和注意事项。 ... [详细]
  • 本文讨论了clone的fork与pthread_create创建线程的不同之处。进程是一个指令执行流及其执行环境,其执行环境是一个系统资源的集合。在调用系统调用fork创建一个进程时,子进程只是完全复制父进程的资源,这样得到的子进程独立于父进程,具有良好的并发性。但是二者之间的通讯需要通过专门的通讯机制,另外通过fork创建子进程系统开销很大。因此,在某些情况下,使用clone或pthread_create创建线程可能更加高效。 ... [详细]
  • 解决github访问慢的问题的方法集锦
    本文总结了国内用户在访问github网站时可能遇到的加载慢的问题,并提供了解决方法,其中包括修改hosts文件来加速访问。 ... [详细]
  • IhaveconfiguredanactionforaremotenotificationwhenitarrivestomyiOsapp.Iwanttwodiff ... [详细]
  • android listview OnItemClickListener失效原因
    最近在做listview时发现OnItemClickListener失效的问题,经过查找发现是因为button的原因。不仅listitem中存在button会影响OnItemClickListener事件的失效,还会导致单击后listview每个item的背景改变,使得item中的所有有关焦点的事件都失效。本文给出了一个范例来说明这种情况,并提供了解决方法。 ... [详细]
  • Google Play推出全新的应用内评价API,帮助开发者获取更多优质用户反馈。用户每天在Google Play上发表数百万条评论,这有助于开发者了解用户喜好和改进需求。开发者可以选择在适当的时间请求用户撰写评论,以获得全面而有用的反馈。全新应用内评价功能让用户无需返回应用详情页面即可发表评论,提升用户体验。 ... [详细]
  • 【MicroServices】【Arduino】装修甲醛检测,ArduinoDart甲醛、PM2.5、温湿度、光照传感器等,数据记录于SD卡,Python数据显示,UI5前台,微服务后台……
    这篇文章介绍了一个基于Arduino的装修甲醛检测项目,使用了ArduinoDart甲醛、PM2.5、温湿度、光照传感器等硬件,并将数据记录于SD卡,使用Python进行数据显示,使用UI5进行前台设计,使用微服务进行后台开发。该项目还在不断更新中,有兴趣的可以关注作者的博客和GitHub。 ... [详细]
  • 自动轮播,反转播放的ViewPagerAdapter的使用方法和效果展示
    本文介绍了如何使用自动轮播、反转播放的ViewPagerAdapter,并展示了其效果。该ViewPagerAdapter支持无限循环、触摸暂停、切换缩放等功能。同时提供了使用GIF.gif的示例和github地址。通过LoopFragmentPagerAdapter类的getActualCount、getActualItem和getActualPagerTitle方法可以实现自定义的循环效果和标题展示。 ... [详细]
  • CF:3D City Model(小思维)问题解析和代码实现
    本文通过解析CF:3D City Model问题,介绍了问题的背景和要求,并给出了相应的代码实现。该问题涉及到在一个矩形的网格上建造城市的情景,每个网格单元可以作为建筑的基础,建筑由多个立方体叠加而成。文章详细讲解了问题的解决思路,并给出了相应的代码实现供读者参考。 ... [详细]
  • Go GUIlxn/walk 学习3.菜单栏和工具栏的具体实现
    本文介绍了使用Go语言的GUI库lxn/walk实现菜单栏和工具栏的具体方法,包括消息窗口的产生、文件放置动作响应和提示框的应用。部分代码来自上一篇博客和lxn/walk官方示例。文章提供了学习GUI开发的实际案例和代码示例。 ... [详细]
  • Oracle seg,V$TEMPSEG_USAGE与Oracle排序的关系及使用方法
    本文介绍了Oracle seg,V$TEMPSEG_USAGE与Oracle排序之间的关系,V$TEMPSEG_USAGE是V_$SORT_USAGE的同义词,通过查询dba_objects和dba_synonyms视图可以了解到它们的详细信息。同时,还探讨了V$TEMPSEG_USAGE的使用方法。 ... [详细]
  • 深入理解Kafka服务端请求队列中请求的处理
    本文深入分析了Kafka服务端请求队列中请求的处理过程,详细介绍了请求的封装和放入请求队列的过程,以及处理请求的线程池的创建和容量设置。通过场景分析、图示说明和源码分析,帮助读者更好地理解Kafka服务端的工作原理。 ... [详细]
  • 【shell】网络处理:判断IP是否在网段、两个ip是否同网段、IP地址范围、网段包含关系
    本文介绍了使用shell脚本判断IP是否在同一网段、判断IP地址是否在某个范围内、计算IP地址范围、判断网段之间的包含关系的方法和原理。通过对IP和掩码进行与计算,可以判断两个IP是否在同一网段。同时,还提供了一段用于验证IP地址的正则表达式和判断特殊IP地址的方法。 ... [详细]
  • 使用圣杯布局模式实现网站首页的内容布局
    本文介绍了使用圣杯布局模式实现网站首页的内容布局的方法,包括HTML部分代码和实例。同时还提供了公司新闻、最新产品、关于我们、联系我们等页面的布局示例。商品展示区包括了车里子和农家生态土鸡蛋等产品的价格信息。 ... [详细]
author-avatar
112473228
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有