Package opennlp.tools.formats.brat
Class AnnotationConfiguration
java.lang.Object
opennlp.tools.formats.brat.AnnotationConfiguration
Encapsulates a type to class mapping for entities, relations, events, etc.
 
Details on how a annotation configuration file should be structured can be found in the brat annotation configuration section of the official BRAT documentation.
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionAnnotationConfiguration(Map<String, String> typeToClassMap) Initializes anAnnotationConfigurationwith the specifiedtypeToClassMap.
- 
Method SummaryModifier and TypeMethodDescriptiongetTypeClass(String type) static AnnotationConfigurationParses a givenannConfigFileinto aAnnotationConfiguration.static AnnotationConfigurationparse(InputStream in) Parses a givenannConfigFileinto aAnnotationConfiguration.
- 
Field Details- 
SPAN_TYPE- See Also:
 
- 
ENTITY_TYPE- See Also:
 
- 
RELATION_TYPE- See Also:
 
- 
ATTRIBUTE_TYPE- See Also:
 
- 
EVENT_TYPE- See Also:
 
 
- 
- 
Constructor Details- 
AnnotationConfigurationInitializes anAnnotationConfigurationwith the specifiedtypeToClassMap.- Parameters:
- typeToClassMap- A type to class mapping. Must not be- null.
 
 
- 
- 
Method Details- 
getTypeClass- Parameters:
- type- The type to get the type class for.
- Returns:
- Retrieves the class for the specified type,nullif not found.
 
- 
parseParses a givenannConfigFileinto aAnnotationConfiguration.- Parameters:
- in- A valid- annConfigFilefrom which the config should be read. Must not be- nulland must be in the correct format, see: Brat annotation configuration
- Returns:
- A valid AnnotationConfigurationinstance.
- Throws:
- IOException- Thrown if IO errors occurred during parsing.
 
- 
parseParses a givenannConfigFileinto aAnnotationConfiguration.- Parameters:
- annConfigFile- A valid- annConfigFilefrom which the config should be read. Must not be- nulland must be in the correct format, see: Brat annotation configuration
- Returns:
- A valid AnnotationConfigurationinstance.
- Throws:
- IOException- Thrown if IO errors occurred during parsing.
 
 
-