congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
BaleenAnnotator.doInitialize
Code IndexAdd Tabnine to your IDE (free)

How to use
doInitialize
method
in
uk.gov.dstl.baleen.uima.BaleenAnnotator

Best Java code snippets using uk.gov.dstl.baleen.uima.BaleenAnnotator.doInitialize (Showing top 10 results out of 315)

origin: uk.gov.dstl.baleen/baleen-uima

@Override
public void doInitialize(final UimaContext aContext) throws ResourceInitializationException {
 super.doInitialize(aContext);
 if (typeNames == null || typeNames.length == 0) {
  structuralClasses = Sets.newHashSet(DEFAULT_STRUCTURAL_CLASSES);
 } else {
  structuralClasses = StructureUtil.getStructureClasses(typeNames);
 }
}
origin: dstl/baleen

@Override
public void doInitialize(final UimaContext aContext) throws ResourceInitializationException {
 super.doInitialize(aContext);
 if (typeNames == null || typeNames.length == 0) {
  structuralClasses = Sets.newHashSet(DEFAULT_STRUCTURAL_CLASSES);
 } else {
  structuralClasses = StructureUtil.getStructureClasses(typeNames);
 }
}
origin: uk.gov.dstl.baleen/baleen-mallet

@Override
public void doInitialize(UimaContext aContext) throws ResourceInitializationException {
 super.doInitialize(aContext);
 try {
  classifierModel = new FileObject<cc.mallet.classify.Classifier>(modelPath).object();
 } catch (Exception e) {
  throw new ResourceInitializationException();
 }
}
origin: dstl/baleen

@Override
public void doInitialize(UimaContext aContext) throws ResourceInitializationException {
 super.doInitialize(aContext);
 try {
  classifierModel = new FileObject<cc.mallet.classify.Classifier>(modelPath).object();
 } catch (Exception e) {
  throw new ResourceInitializationException();
 }
}
origin: uk.gov.dstl.baleen/baleen-mallet

@Override
public void doInitialize(UimaContext aContext) throws ResourceInitializationException {
 super.doInitialize(aContext);
 try {
  model = ParallelTopicModel.read(new File(modelPath));
  pipe = new TopicModelPipe(stopwordResource.getStopwords(stoplist), model.getAlphabet());
  topicWords = new TopicWords(model);
 } catch (Exception e) {
  throw new ResourceInitializationException();
 }
}
origin: dstl/baleen

@Override
public void doInitialize(UimaContext aContext) throws ResourceInitializationException {
 super.doInitialize(aContext);
 try {
  model = ParallelTopicModel.read(new File(modelPath));
  pipe = new TopicModelPipe(stopwordResource.getStopwords(stoplist), model.getAlphabet());
  topicWords = new TopicWords(model);
 } catch (Exception e) {
  throw new ResourceInitializationException();
 }
}
origin: uk.gov.dstl.baleen/baleen-entity-linking

@Override
@SuppressWarnings("unchecked")
public void doInitialize(UimaContext aContext) throws ResourceInitializationException {
 super.doInitialize(aContext);
 Collection<String> stopwords = stopwordResource.getStopwords(stoplist);
 try {
  entityClass =
    BuilderUtils.getClassFromString(
      entityTypeClassName, SEMANTIC_ENTITY_PACKAGE, COMMON_ENTITY_PACKAGE);
  informationCollector =
    (InformationCollector)
      BuilderUtils.getClassFromString(informationCollectorClassName, COLLECTOR_PACKAGE)
        .newInstance();
  candidateSupplier =
    (CandidateSupplier<T>)
      BuilderUtils.getClassFromString(candidateSupplierClassName, SUPPLIER_PACKAGE)
        .newInstance();
  candidateSupplier.configure(candidateSupplierOptions);
  candidateRanker =
    (CandidateRanker<T>)
      BuilderUtils.getClassFromString(candidateRankerClassName, RANKER_PACKAGE)
        .newInstance();
  candidateRanker.initialize(stopwords);
 } catch (Exception e) {
  throw new ResourceInitializationException(e);
 }
}
origin: dstl/baleen

@Override
@SuppressWarnings("unchecked")
public void doInitialize(UimaContext aContext) throws ResourceInitializationException {
 super.doInitialize(aContext);
 Collection<String> stopwords = stopwordResource.getStopwords(stoplist);
 try {
  entityClass =
    BuilderUtils.getClassFromString(
      entityTypeClassName, SEMANTIC_ENTITY_PACKAGE, COMMON_ENTITY_PACKAGE);
  informationCollector =
    (InformationCollector)
      BuilderUtils.getClassFromString(informationCollectorClassName, COLLECTOR_PACKAGE)
        .newInstance();
  candidateSupplier =
    (CandidateSupplier<T>)
      BuilderUtils.getClassFromString(candidateSupplierClassName, SUPPLIER_PACKAGE)
        .newInstance();
  candidateSupplier.configure(candidateSupplierOptions);
  candidateRanker =
    (CandidateRanker<T>)
      BuilderUtils.getClassFromString(candidateRankerClassName, RANKER_PACKAGE)
        .newInstance();
  candidateRanker.initialize(stopwords);
 } catch (Exception e) {
  throw new ResourceInitializationException(e);
 }
}
origin: uk.gov.dstl.baleen/baleen-uima

@Override
public void initialize(UimaContext context) throws ResourceInitializationException {
 // This will do initialization of resources,
 // but won't be included in the metrics
 super.initialize(context);
 String pipelineName = UimaUtils.getPipelineName(context);
 monitor = createMonitor(pipelineName);
 support = createSupport(pipelineName, context);
 monitor.startFunction("initialize");
 doInitialize(context);
 monitor.finishFunction("initialize");
 String uuid = (String) getContext().getConfigParameterValue(PipelineBuilder.ANNOTATOR_UUID);
 AnalysisEngineActionStore.getInstance().add(uuid, getAction());
}
origin: dstl/baleen

@Override
public void initialize(UimaContext context) throws ResourceInitializationException {
 // This will do initialization of resources,
 // but won't be included in the metrics
 super.initialize(context);
 String pipelineName = UimaUtils.getPipelineName(context);
 monitor = createMonitor(pipelineName);
 support = createSupport(pipelineName, context);
 monitor.startFunction("initialize");
 doInitialize(context);
 monitor.finishFunction("initialize");
 String uuid = (String) getContext().getConfigParameterValue(PipelineBuilder.ANNOTATOR_UUID);
 AnalysisEngineActionStore.getInstance().add(uuid, getAction());
}
uk.gov.dstl.baleen.uimaBaleenAnnotatordoInitialize

Javadoc

Called when the analysis engine is being initialized. Any required resources, for example, should be opened at this point.

Popular methods of BaleenAnnotator

  • doDestroy
    Called when the analysis engine has finished and is closing down. Any open resources, for example, s
  • createMonitor
  • createSupport
  • doProcess
    Called when UIMA wants the annotator to process a document. The passed JCas object contains informat
  • getAction
    Return an AnalysisEngineAction that programmatically describes what the analysis engine is doing, su
  • getContext
  • getSupport
    Get the UIMA support for this annotator.
  • initialize

Popular in Java

  • Reactive rest calls using spring rest template
  • getResourceAsStream (ClassLoader)
  • setContentView (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • JPanel (javax.swing)
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now