热门标签 | 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();

推荐阅读
  • ArcBlock 发布 ABT 节点 1.0.31 版本更新
    2020年11月9日,ArcBlock 区块链基础平台发布了 ABT 节点开发平台的1.0.31版本更新,此次更新带来了多项功能增强与性能优化。 ... [详细]
  • Python3爬虫入门:pyspider的基本使用[python爬虫入门]
    Python学习网有大量免费的Python入门教程,欢迎大家来学习。本文主要通过爬取去哪儿网的旅游攻略来给大家介绍pyspid ... [详细]
  • td{border:1pxsolid#808080;}参考:和FMX相关的类(表)TFmxObjectIFreeNotification ... [详细]
  • 本文是对《敏捷软件开发:原则、模式与实践》一书的深度解析,书中不仅探讨了敏捷方法的核心理念及其应用,还详细介绍了面向对象设计的原则、设计模式的应用技巧及UML的有效使用。 ... [详细]
  • 在尝试加载支持推送通知的iOS应用程序的Ad Hoc构建时,遇到了‘no valid aps-environment entitlement found for application’的错误提示。本文将探讨此错误的原因及多种可能的解决方案。 ... [详细]
  • 长期从事ABAP开发工作的专业人士,在面对行业新趋势时,往往需要重新审视自己的发展方向。本文探讨了几位资深专家对ABAP未来走向的看法,以及开发者应如何调整技能以适应新的技术环境。 ... [详细]
  • Spring Security基础配置详解
    本文详细介绍了Spring Security的基础配置方法,包括如何搭建Maven多模块工程以及具体的安全配置步骤,帮助开发者更好地理解和应用这一强大的安全框架。 ... [详细]
  • 1、编写一个Java程序在屏幕上输出“你好!”。programmenameHelloworld.javapublicclassHelloworld{publicst ... [详细]
  • 本文详细介绍了 JavaScript 中 Split 方法的使用方式和一些实用技巧。通过示例,我们将探讨如何利用 Split 方法有效地分割字符串,并获取所需的数据。 ... [详细]
  • Zabbix自定义监控与邮件告警配置实践
    本文详细介绍了如何在Zabbix中添加自定义监控项目,配置邮件告警功能,并解决测试告警时遇到的邮件不发送问题。 ... [详细]
  • 本文探讨了如何在PHP与MySQL环境中实现高效的分页查询,包括基本的分页实现、性能优化技巧以及高级的分页策略。 ... [详细]
  • 本文详细介绍了Oracle 11g中的创建表空间的方法,以及如何设置客户端和服务端的基本配置,包括用户管理、环境变量配置等。 ... [详细]
  • Maven + Spring + MyBatis + MySQL 环境搭建与实例解析
    本文详细介绍如何使用MySQL数据库进行环境搭建,包括创建数据库表并插入示例数据。随后,逐步指导如何配置Maven项目,整合Spring框架与MyBatis,实现高效的数据访问。 ... [详细]
  • 在1995年,Simon Plouffe 发现了一种特殊的求和方法来表示某些常数。两年后,Bailey 和 Borwein 在他们的论文中发表了这一发现,这种方法被命名为 Bailey-Borwein-Plouffe (BBP) 公式。该问题要求计算圆周率 π 的第 n 个十六进制数字。 ... [详细]
  • 本文探讨了如何将个人经历,特别是非传统的职业路径,转化为职业生涯中的优势。通过作者的亲身经历,展示了舞蹈生涯对商业思维的影响。 ... [详细]
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社区 版权所有