congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
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

  • Making http requests using okhttp
  • setContentView (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Notification (javax.management)
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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