Java 类org.apache.lucene.analysis.uima.ae.AEProviderFactory 实例源码

项目:search    文件:UIMAUpdateRequestProcessorFactory.java   
@Override
public UpdateRequestProcessor getInstance(SolrQueryRequest req,
    SolrQueryResponse rsp, UpdateRequestProcessor next) {
  SolrUIMAConfiguration configuration = new SolrUIMAConfigurationReader(args)
      .readSolrUIMAConfiguration();
  synchronized (this) {
    if (ae == null && pool == null) {
      AEProvider aeProvider = AEProviderFactory.getInstance().getAEProvider(
          req.getCore().getName(), configuration.getAePath(),
          configuration.getRuntimeParameters());
      try {
        ae = aeProvider.getAE();
        pool = new JCasPool(10, ae);
      } catch (ResourceInitializationException e) {
        throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e);
      }
    }
  }

  return new UIMAUpdateRequestProcessor(next, req.getCore().getName(),
      configuration, ae, pool);
}
项目:read-open-source-code    文件:UIMAUpdateRequestProcessorFactory.java   
@Override
public UpdateRequestProcessor getInstance(SolrQueryRequest req,
    SolrQueryResponse rsp, UpdateRequestProcessor next) {
  SolrUIMAConfiguration configuration = new SolrUIMAConfigurationReader(args)
      .readSolrUIMAConfiguration();
  synchronized (this) {
    if (ae == null && pool == null) {
      AEProvider aeProvider = AEProviderFactory.getInstance().getAEProvider(
          req.getCore().getName(), configuration.getAePath(),
          configuration.getRuntimeParameters());
      try {
        ae = aeProvider.getAE();
        pool = new JCasPool(10, ae);
      } catch (ResourceInitializationException e) {
        throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e);
      }
    }
  }

  return new UIMAUpdateRequestProcessor(next, req.getCore().getName(),
      configuration, ae, pool);
}
项目:search    文件:BaseUIMATokenizer.java   
/**
 * analyzes the tokenizer input using the given analysis engine
 * <p/>
 * {@link #cas} will be filled with  extracted metadata (UIMA annotations, feature structures)
 *
 * @throws IOException If there is a low-level I/O error.
 */
protected void analyzeInput() throws ResourceInitializationException, AnalysisEngineProcessException, IOException {
  if (ae == null) {
    ae = AEProviderFactory.getInstance().getAEProvider(null, descriptorPath, configurationParameters).getAE();
  }
  if (cas == null) {
    cas = ae.newCAS();
  } else {
    cas.reset();
  }
  cas.setDocumentText(toString(input));
  ae.process(cas);
}
项目:NYBC    文件:BaseUIMATokenizer.java   
/**
 * analyzes the tokenizer input using the given analysis engine
 * <p/>
 * {@link #cas} will be filled with  extracted metadata (UIMA annotations, feature structures)
 *
 * @throws IOException If there is a low-level I/O error.
 */
protected void analyzeInput() throws ResourceInitializationException, AnalysisEngineProcessException, IOException {
  if (ae == null) {
    ae = AEProviderFactory.getInstance().getAEProvider(null, descriptorPath, configurationParameters).getAE();
  }
  if (cas == null) {
    cas = ae.newCAS();
  } else {
    cas.reset();
  }
  cas.setDocumentText(toString(input));
  ae.process(cas);
}
项目:read-open-source-code    文件:BaseUIMATokenizer.java   
/**
 * analyzes the tokenizer input using the given analysis engine
 * <p/>
 * {@link #cas} will be filled with  extracted metadata (UIMA annotations, feature structures)
 *
 * @throws IOException If there is a low-level I/O error.
 */
protected void analyzeInput() throws ResourceInitializationException, AnalysisEngineProcessException, IOException {
  if (ae == null) {
    ae = AEProviderFactory.getInstance().getAEProvider(null, descriptorPath, configurationParameters).getAE();
  }
  if (cas == null) {
    cas = ae.newCAS();
  } else {
    cas.reset();
  }
  cas.setDocumentText(toString(input));
  ae.process(cas);
}
项目:read-open-source-code    文件:BaseUIMATokenizer.java   
/**
 * analyzes the tokenizer input using the given analysis engine
 * <p/>
 * {@link #cas} will be filled with  extracted metadata (UIMA annotations, feature structures)
 *
 * @throws IOException If there is a low-level I/O error.
 */
protected void analyzeInput() throws ResourceInitializationException, AnalysisEngineProcessException, IOException {
  if (ae == null) {
    ae = AEProviderFactory.getInstance().getAEProvider(null, descriptorPath, configurationParameters).getAE();
  }
  if (cas == null) {
    cas = ae.newCAS();
  } else {
    cas.reset();
  }
  cas.setDocumentText(toString(input));
  ae.process(cas);
}
项目:Maskana-Gestor-de-Conocimiento    文件:BaseUIMATokenizer.java   
/**
 * analyzes the tokenizer input using the given analysis engine
 * <p/>
 * {@link #cas} will be filled with  extracted metadata (UIMA annotations, feature structures)
 *
 * @throws IOException If there is a low-level I/O error.
 */
protected void analyzeInput() throws ResourceInitializationException, AnalysisEngineProcessException, IOException {
  if (ae == null) {
    ae = AEProviderFactory.getInstance().getAEProvider(null, descriptorPath, configurationParameters).getAE();
  }
  if (cas == null) {
    cas = ae.newCAS();
  } else {
    cas.reset();
  }
  cas.setDocumentText(toString(input));
  ae.process(cas);
}
项目:NYBC    文件:UIMAUpdateRequestProcessor.java   
private void initialize(SolrCore solrCore, SolrUIMAConfiguration config) {
  this.solrCore = solrCore;
  solrUIMAConfiguration = config;
  aeProvider = AEProviderFactory.getInstance().getAEProvider(solrCore.getName(),
          solrUIMAConfiguration.getAePath(), solrUIMAConfiguration.getRuntimeParameters());
}