/** * If lazy initialization is desired, set the property * {@link AnnotatorConfigurator#IS_LAZILY_INITIALIZED} in the ResourceManager argument * * @param viewName The name of the View this annotator will populate. This will be used to * access the created view from the TextAnnotation holding it. * @param requiredViews The views that must be populated for this new view to be created. * @param rm configuration parameters. lazy initialization is set to 'false' by default. */ public Annotator(String viewName, String[] requiredViews, ResourceManager rm) { this(viewName, requiredViews, rm.getBoolean( AnnotatorConfigurator.IS_LAZILY_INITIALIZED.key, Configurator.FALSE), new AnnotatorConfigurator().getConfig(rm)); }
/** * get a ResourceManager object with the default key/value pairs for this configurator * * @return a non-null ResourceManager with appropriate values set. */ @Override public ResourceManager getDefaultConfig() { Property[] props = new Property[] {IS_LAZILY_INITIALIZED, IS_SENTENCE_LEVEL}; return new ResourceManager(generateProperties(props)); } }
/** * Get a {@link ResourceManager} with non-default properties. Overloaded to merge the properties * of {@link AnnotatorServiceConfigurator}. * * @param nonDefaultRm The non-default properties * @return a non-null ResourceManager with appropriate values set. */ @Override public ResourceManager getConfig(ResourceManager nonDefaultRm) { ResourceManager pipelineRm = super.getConfig(nonDefaultRm); return new AnnotatorServiceConfigurator().getConfig(pipelineRm); } }
/** * Get a {@link ResourceManager} with non-default properties. Overloaded to merge the properties * of {@link AnnotatorServiceConfigurator}. * * @param nonDefaultRm The non-default properties * @return a non-null ResourceManager with appropriate values set. */ @Override public ResourceManager getConfig(ResourceManager nonDefaultRm) { ResourceManager pipelineRm = super.getConfig(nonDefaultRm); return new AnnotatorServiceConfigurator().getConfig(pipelineRm); } }
/** * Get a {@link ResourceManager} with non-default properties. Overloaded to merge the properties * of {@link AnnotatorServiceConfigurator}. * * @param nonDefaultRm The non-default properties * @return a non-null ResourceManager with appropriate values set. */ @Override public ResourceManager getConfig(ResourceManager nonDefaultRm) { ResourceManager pipelineRm = super.getConfig(nonDefaultRm); return new AnnotatorServiceConfigurator().getConfig(pipelineRm); } }
/** * If lazy initialization is desired, set the property * {@link AnnotatorConfigurator#IS_LAZILY_INITIALIZED} in the ResourceManager argument * * @param viewName The name of the View this annotator will populate. This will be used to * access the created view from the TextAnnotation holding it. * @param requiredViews The views that must be populated for this new view to be created. * @param rm configuration parameters. lazy initialization is set to 'false' by default. */ public Annotator(String viewName, String[] requiredViews, ResourceManager rm) { this(viewName, requiredViews, rm.getBoolean( AnnotatorConfigurator.IS_LAZILY_INITIALIZED.key, Configurator.FALSE), new AnnotatorConfigurator().getConfig(rm)); }
/** * get a ResourceManager object with the default key/value pairs for this configurator * * @return a non-null ResourceManager with appropriate values set. */ @Override public ResourceManager getDefaultConfig() { Property[] props = new Property[] {IS_LAZILY_INITIALIZED, IS_SENTENCE_LEVEL}; return new ResourceManager(generateProperties(props)); } }
/** * Get a {@link ResourceManager} with non-default properties. Overloaded to merge the properties * of {@link AnnotatorServiceConfigurator}. * * @param nonDefaultRm The non-default properties * @return a non-null ResourceManager with appropriate values set. */ @Override public ResourceManager getConfig(ResourceManager nonDefaultRm) { ResourceManager pipelineRm = super.getConfig(nonDefaultRm); return new AnnotatorServiceConfigurator().getConfig(pipelineRm); } }