org.apache.uima.resource.ResourceManager.getDataPath()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(105)

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

ResourceManager.getDataPath介绍

[英]Gets the data path used to resolve relative paths. More than one directory may be specified by separating them with the System path.separator character (; on windows, : on UNIX).
[中]获取用于解析相对路径的数据路径。可以通过使用系统path.separator字符(;在windows上,:在UNIX上)分隔多个目录来指定它们。

代码示例

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

MetaDataCacheKey(ResourceSpecifier resourceSpecifier, ResourceManager resourceManager) {
 this.resourceSpecifier = resourceSpecifier;
 this.rmClassLoader = (null == resourceManager) ? null : resourceManager.getExtensionClassLoader(); // can be null
 this.rmDataPath = (null == resourceManager) ? null : resourceManager.getDataPath();
}

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

/**
 * @see org.apache.uima.analysis_engine.annotator.AnnotatorContext#getDataPath()
 */
public String getDataPath() {
 return getResourceManager().getDataPath();
}

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

if (additionalSearchPaths != null) {
  List<String> dpElements = Lists.newLinkedList();
  dpElements.add(rm.getDataPath());
  dpElements.addAll(Arrays.asList(additionalSearchPaths));
  rm.setDataPath(dataPathJoiner.join(dpElements));

代码示例来源:origin: Ailab403/ailab-mltk4j

public void collectionProcessComplete(ProcessTrace trace) 
  throws ResourceProcessException, IOException {
 
 GIS.PRINT_MESSAGES = false;
 DoccatModel categoryModel = DocumentCategorizerME.train(language, ObjectStreamUtils.createObjectStream(documentSamples));
 
 File modelFile = new File(getUimaContextAdmin().getResourceManager()
   .getDataPath() + File.separatorChar + mModelName);
 OpennlpUtil.serialize(categoryModel, modelFile);
}

代码示例来源:origin: Ailab403/ailab-mltk4j

/**
 * Called if the processing is finished, this method
 * does the training.
 */
public void collectionProcessComplete(ProcessTrace trace) 
  throws ResourceProcessException, IOException {
 GIS.PRINT_MESSAGES = false;
 
 ChunkerModel chunkerModel = ChunkerME.train(language, ObjectStreamUtils.createObjectStream(mChunkSamples), 100, 5);
 
 // dereference to allow garbage collection
 mChunkSamples  = null;
 
 File modelFile = new File(getUimaContextAdmin().getResourceManager()
   .getDataPath() + File.separatorChar + mModelName);
 OpennlpUtil.serialize(chunkerModel, modelFile);
}

代码示例来源:origin: Ailab403/ailab-mltk4j

/**
 * Called if the processing is finished, this method
 * does the training.
 */
public void collectionProcessComplete(ProcessTrace trace) 
  throws ResourceProcessException, IOException {
 
 GIS.PRINT_MESSAGES = false;
 POSModel posTaggerModel = POSTaggerME.train(language, 
   ObjectStreamUtils.createObjectStream(mPOSSamples),
   ModelType.MAXENT, tagDictionary, null, 100, 5);
 
 // dereference to allow garbage collection
 mPOSSamples = null;
 
 File modelFile = new File(getUimaContextAdmin().getResourceManager()
   .getDataPath() + File.separatorChar + mModelName);
 OpennlpUtil.serialize(posTaggerModel, modelFile);
}

代码示例来源:origin: Ailab403/ailab-mltk4j

.getDataPath() + File.separatorChar + mModelName);

代码示例来源:origin: Ailab403/ailab-mltk4j

.getDataPath() + File.separatorChar + mModelName);

代码示例来源:origin: Ailab403/ailab-mltk4j

.getDataPath() + File.separatorChar + modelPath);

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

if (engine == null) {
 UimacppEngine.configureResourceManager(System.getProperty("java.io.tmpdir"), ae
     .getResourceManager().getDataPath());

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

.getResourceManager().getDataPath());

代码示例来源:origin: Ailab403/ailab-mltk4j

.getDataPath() + File.separatorChar + sampleTraceFileName);
sampleTraceFileEncoding = CasConsumerUtil.getRequiredStringParameter(
  getUimaContext(), "opennlp.uima.SampleTraceFileEncoding");

代码示例来源:origin: Ailab403/ailab-mltk4j

.getDataPath() + File.separatorChar + sampleTraceFileName);
sampleTraceFileEncoding = CasConsumerUtil.getRequiredStringParameter(
  getUimaContext(), "opennlp.uima.SampleTraceFileEncoding");

代码示例来源:origin: Ailab403/ailab-mltk4j

.getDataPath() + File.separatorChar + sampleTraceFileName);
sampleTraceFileEncoding = CasConsumerUtil.getRequiredStringParameter(
  getUimaContext(), "opennlp.uima.SampleTraceFileEncoding");

相关文章