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

推荐阅读
  • 本文整理了Java中org.apache.solr.common.SolrDocument.setField()方法的一些代码示例,展示了SolrDocum ... [详细]
  • 自动轮播,反转播放的ViewPagerAdapter的使用方法和效果展示
    本文介绍了如何使用自动轮播、反转播放的ViewPagerAdapter,并展示了其效果。该ViewPagerAdapter支持无限循环、触摸暂停、切换缩放等功能。同时提供了使用GIF.gif的示例和github地址。通过LoopFragmentPagerAdapter类的getActualCount、getActualItem和getActualPagerTitle方法可以实现自定义的循环效果和标题展示。 ... [详细]
  • 如何自行分析定位SAP BSP错误
    The“BSPtag”Imentionedintheblogtitlemeansforexamplethetagchtmlb:configCelleratorbelowwhichi ... [详细]
  • 在Android开发中,使用Picasso库可以实现对网络图片的等比例缩放。本文介绍了使用Picasso库进行图片缩放的方法,并提供了具体的代码实现。通过获取图片的宽高,计算目标宽度和高度,并创建新图实现等比例缩放。 ... [详细]
  • Spring特性实现接口多类的动态调用详解
    本文详细介绍了如何使用Spring特性实现接口多类的动态调用。通过对Spring IoC容器的基础类BeanFactory和ApplicationContext的介绍,以及getBeansOfType方法的应用,解决了在实际工作中遇到的接口及多个实现类的问题。同时,文章还提到了SPI使用的不便之处,并介绍了借助ApplicationContext实现需求的方法。阅读本文,你将了解到Spring特性的实现原理和实际应用方式。 ... [详细]
  • http:my.oschina.netleejun2005blog136820刚看到群里又有同学在说HTTP协议下的Get请求参数长度是有大小限制的,最大不能超过XX ... [详细]
  • 标题: ... [详细]
  • 本文介绍了如何使用C#制作Java+Mysql+Tomcat环境安装程序,实现一键式安装。通过将JDK、Mysql、Tomcat三者制作成一个安装包,解决了客户在安装软件时的复杂配置和繁琐问题,便于管理软件版本和系统集成。具体步骤包括配置JDK环境变量和安装Mysql服务,其中使用了MySQL Server 5.5社区版和my.ini文件。安装方法为通过命令行将目录转到mysql的bin目录下,执行mysqld --install MySQL5命令。 ... [详细]
  • 先看官方文档TheJavaTutorialshavebeenwrittenforJDK8.Examplesandpracticesdescribedinthispagedontta ... [详细]
  • 重入锁(ReentrantLock)学习及实现原理
    本文介绍了重入锁(ReentrantLock)的学习及实现原理。在学习synchronized的基础上,重入锁提供了更多的灵活性和功能。文章详细介绍了重入锁的特性、使用方法和实现原理,并提供了类图和测试代码供读者参考。重入锁支持重入和公平与非公平两种实现方式,通过对比和分析,读者可以更好地理解和应用重入锁。 ... [详细]
  • 本文整理了Java中com.evernote.android.job.JobRequest.getTransientExtras()方法的一些代码示例,展示了 ... [详细]
  • 本文介绍了闭包的定义和运转机制,重点解释了闭包如何能够接触外部函数的作用域中的变量。通过词法作用域的查找规则,闭包可以访问外部函数的作用域。同时还提到了闭包的作用和影响。 ... [详细]
  • VScode格式化文档换行或不换行的设置方法
    本文介绍了在VScode中设置格式化文档换行或不换行的方法,包括使用插件和修改settings.json文件的内容。详细步骤为:找到settings.json文件,将其中的代码替换为指定的代码。 ... [详细]
  • 本文讨论了在Spring 3.1中,数据源未能自动连接到@Configuration类的错误原因,并提供了解决方法。作者发现了错误的原因,并在代码中手动定义了PersistenceAnnotationBeanPostProcessor。作者删除了该定义后,问题得到解决。此外,作者还指出了默认的PersistenceAnnotationBeanPostProcessor的注册方式,并提供了自定义该bean定义的方法。 ... [详细]
  • imx6ull开发板驱动MT7601U无线网卡的方法和步骤详解
    本文详细介绍了在imx6ull开发板上驱动MT7601U无线网卡的方法和步骤。首先介绍了开发环境和硬件平台,然后说明了MT7601U驱动已经集成在linux内核的linux-4.x.x/drivers/net/wireless/mediatek/mt7601u文件中。接着介绍了移植mt7601u驱动的过程,包括编译内核和配置设备驱动。最后,列举了关键词和相关信息供读者参考。 ... [详细]
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社区 版权所有