org.apache.uima.cas.CAS.getCurrentView()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(150)

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

CAS.getCurrentView介绍

[英]Get the Cas view that the current component should use. This should only be used by single-view components.
[中]获取当前组件应使用的Cas视图。这只能由单视图组件使用。

代码示例

代码示例来源:origin: org.apache.ctakes/ctakes-dependency-parser

/**
* Create an xml file from the data in the cas.
*/
public void processCas( CAS cas ) throws ResourceProcessException {
 iv_logger.info( "Started" );
 try {
   JCas currentView = cas.getCurrentView().getJCas();
   processView( currentView );
 } catch ( Exception e ) {
   throw new ResourceProcessException( e );
 }
}

代码示例来源:origin: apache/ctakes

/**
* Create an xml file from the data in the cas.
*/
public void processCas( CAS cas ) throws ResourceProcessException {
 iv_logger.info( "Started" );
 try {
   JCas currentView = cas.getCurrentView().getJCas();
   processView( currentView );
 } catch ( Exception e ) {
   throw new ResourceProcessException( e );
 }
}

代码示例来源:origin: apache/ctakes

/**
* Create an xml file from the data in the cas.
*/
@Override
public void processCas( CAS cas ) throws ResourceProcessException {
 iv_logger.info( "Started" );
 try {
   JCas currentView = cas.getCurrentView().getJCas();
   processView( currentView );
 } catch ( Exception e ) {
   throw new ResourceProcessException( e );
 }
}

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

/**
* Create an xml file from the data in the cas.
*/
@Override
public void processCas( CAS cas ) throws ResourceProcessException {
 iv_logger.info( "Started" );
 try {
   JCas currentView = cas.getCurrentView().getJCas();
   processView( currentView );
 } catch ( Exception e ) {
   throw new ResourceProcessException( e );
 }
}

代码示例来源:origin: org.apache.ctakes/ctakes-constituency-parser

@Override
public void processCas(CAS aCAS) throws ResourceProcessException {
  // TODO Auto-generated method stub
  JCas jcas;
  try {
    jcas = aCAS.getCurrentView().getJCas();
  } catch (CASException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    return;
  }
  FSIterator<Annotation> iterator = jcas.getAnnotationIndex(TopTreebankNode.type).iterator();
  
  while(iterator.hasNext()){
    TopTreebankNode node = (TopTreebankNode) iterator.next();
    out.println(node.getTreebankParse());
  }
  out.flush();
}

代码示例来源:origin: apache/ctakes

@Override
public void processCas(CAS aCAS) throws ResourceProcessException {
  // TODO Auto-generated method stub
  JCas jcas;
  try {
    jcas = aCAS.getCurrentView().getJCas();
  } catch (CASException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    return;
  }
  FSIterator<Annotation> iterator = jcas.getAnnotationIndex(TopTreebankNode.type).iterator();
  
  while(iterator.hasNext()){
    TopTreebankNode node = (TopTreebankNode) iterator.next();
    out.println(node.getTreebankParse());
  }
  out.flush();
}

代码示例来源:origin: apache/ctakes

try {
  JCas jcas = cas.getCurrentView().getJCas();

代码示例来源:origin: org.apache.ctakes/ctakes-drug-ner

try {
  JCas jcas = cas.getCurrentView().getJCas();

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

cas = aCas.getCurrentView();

相关文章