|
Public Types |
typedef std::map< icu::UnicodeString,
AnnotatorContext * > | TyMapDelegateAnCs |
typedef std::map< icu::UnicodeString,
SofaID * > | TyMapSofaMappings |
Public Member Functions |
| AnnotatorContext (void) |
| AnnotatorContext (AnalysisEngineDescription *taeSpec) |
| Note: This object will NOT assume memory ownership of taeSpec .
|
| ~AnnotatorContext (void) |
const SofaID & | mapToSofaID (const icu::UnicodeString &componentSofaName) |
| Use this method to obtain a SofaID which is a handle to a Sofa in the CAS.
|
TyMapSofaMappings | getSofaMappings () const |
| Returns the component sofaname to absolute sofa name mapping for this context.
|
TyErrorId | defineCASPool (size_t numInstances) |
| Defines the CAS pool that this AnnotatorContext must support.
|
CAS & | getEmptyCAS () |
| Returns an empty CAS from the CASPool.
|
void | releaseCAS (CAS &) |
| Return the CAS to the pool.
|
void | release (std::string &value) const |
| Release contents of string container filled by extractValue.
|
void | release (std::vector< std::string * > &returnValues) const |
| Release contents of vector container filled by extractValue.
|
bool | isParameterDefined (const icu::UnicodeString ¶mName) const |
| Returns true iff the parameter paramName is defined for this TAE specifier.
|
bool | isParameterDefined (const icu::UnicodeString &groupName, const icu::UnicodeString ¶mName) const |
| Returns true iff the parameter paramName is defined in the group groupName for this TAE specifier.
|
const AnalysisEngineDescription & | getTaeSpecifier () const |
| Returns this AnC's AnalysisEngineDescription.
|
AnnotatorContext * | getDelegate (const icu::UnicodeString &key) const |
| Returns NULL if no delegate for key can be found.
|
AnnotatorContext * | extractDelegate (const icu::UnicodeString &key) |
| Returns NULL if no delegate for key can be found.
|
const TyMapDelegateAnCs & | getDelegates () const |
| Returns the delegates of this AnnotatorContext.
|
LogFacility & | getLogger () const |
| returns the LogFacility to be used for logging
|
size_t | getTraceCompId () const |
const AnalysisEngineMetaData::TyVecpFSIndexDescriptions | getFSIndexDescriptions () const |
| returns the index descriptions of this AnnotatorContext and all of its delegates
|
const std::set< icu::UnicodeString > | getGroupNamesForParameter (const icu::UnicodeString ¶mName) const |
|
TyErrorId | extractValue (const icu::UnicodeString ¶mName, std::string &value) const |
| Return string config params as UTF-8--should be only if you know this is will work with you are dealing with single byte char set.
|
TyErrorId | extractValue (const icu::UnicodeString ¶mName, std::vector< std::string * > &returnValues) const |
| returns string parameter values as UTF-8 string Caller assumes ownership of objects in the vector
|
TyErrorId | extractValue (const icu::UnicodeString &groupName, const icu::UnicodeString ¶mName, std::string &value) const |
TyErrorId | extractValue (const icu::UnicodeString &groupName, const icu::UnicodeString ¶mName, std::vector< std::string * > &returnValues) const |
| returns string parameter values as UTF-8 string Caller assumes ownership of objects in the vector
|
|
These getters should be used as follows:
-
If there are no groups defined, use the methods with two arguments
-
If there is a default group defined, the methods with two arguments will lookup the value in the defailt group
-
The methods with three arguments will return a value found in the specified group or in one of the fallback groups, as defined in the TextAnalysisEngine specifier.
If parameter name (and group name) are valid, but no value can be found, the methods return UIMA_ERR_CONFIG_NAME_VALUE_PAIR_NOT_FOUND. In this case, the value parameter passed into the method is not changed. All methods check whether type and multiplicity of the value match the definition for paramName . If not, they return an error code. In this case, the value parameter passed into the method is not changed. If the AnnotatorContext belongs to a delegate TextAnalysisEngine, these methods will search in the parent TAE first, as the parent may override values of the delegates. |
TyErrorId | extractValue (const icu::UnicodeString ¶mName, bool &value) const |
| inline AnnotatorContext::AnnotatorContext(void) {}
|
TyErrorId | extractValue (const icu::UnicodeString ¶mName, std::vector< bool > &returnValues) const |
TyErrorId | extractValue (const icu::UnicodeString ¶mName, int &value) const |
TyErrorId | extractValue (const icu::UnicodeString ¶mName, size_t &value) const |
TyErrorId | extractValue (const icu::UnicodeString ¶mName, std::vector< int > &returnValues) const |
TyErrorId | extractValue (const icu::UnicodeString ¶mName, float &value) const |
TyErrorId | extractValue (const icu::UnicodeString ¶mName, std::vector< float > &returnValues) const |
TyErrorId | extractValue (const icu::UnicodeString ¶mName, icu::UnicodeString &value) const |
TyErrorId | extractValue (const icu::UnicodeString ¶mName, std::vector< icu::UnicodeString > &returnValues) const |
TyErrorId | extractValue (const icu::UnicodeString &groupName, const icu::UnicodeString ¶mName, bool &value) const |
TyErrorId | extractValue (const icu::UnicodeString &groupName, const icu::UnicodeString ¶mName, std::vector< bool > &returnValues) const |
TyErrorId | extractValue (const icu::UnicodeString &groupName, const icu::UnicodeString ¶mName, int &value) const |
TyErrorId | extractValue (const icu::UnicodeString &groupName, const icu::UnicodeString ¶mName, size_t &value) const |
TyErrorId | extractValue (const icu::UnicodeString &groupName, const icu::UnicodeString ¶mName, std::vector< int > &returnValues) const |
TyErrorId | extractValue (const icu::UnicodeString &groupName, const icu::UnicodeString ¶mName, float &value) const |
TyErrorId | extractValue (const icu::UnicodeString &groupName, const icu::UnicodeString ¶mName, std::vector< float > &returnValues) const |
TyErrorId | extractValue (const icu::UnicodeString &groupName, const icu::UnicodeString ¶mName, icu::UnicodeString &value) const |
TyErrorId | extractValue (const icu::UnicodeString &groupName, const icu::UnicodeString ¶mName, std::vector< icu::UnicodeString > &returnValues) const |
|
These setters should be used as follows:
-
If there are no groups defined, use the methods with two arguments.
-
If there is a default group defined, the methods without the group name will try to set the value on the default group
-
To set the values for a certain group, use the methods with group names. Note that there is no fallback strategy: if the group does not exist, the method will return an error
All methods check whether type and multiplicity of the value match the definition for paramName . If not, they return an error code. If the TyErrorId returned is not UIMA_ERR_NONE, the value of the configuration parameter will not have been changed. |
TyErrorId | assignValue (const icu::UnicodeString ¶mName, const bool &value) |
TyErrorId | assignValue (const icu::UnicodeString ¶mName, const std::vector< bool > &value) |
TyErrorId | assignValue (const icu::UnicodeString ¶mName, const size_t &value) |
TyErrorId | assignValue (const icu::UnicodeString ¶mName, const std::vector< size_t > &value) |
TyErrorId | assignValue (const icu::UnicodeString ¶mName, const int &value) |
TyErrorId | assignValue (const icu::UnicodeString ¶mName, const std::vector< int > &value) |
TyErrorId | assignValue (const icu::UnicodeString ¶mName, const float &value) |
TyErrorId | assignValue (const icu::UnicodeString ¶mName, const std::vector< float > &value) |
TyErrorId | assignValue (const icu::UnicodeString ¶mName, const double &value) |
TyErrorId | assignValue (const icu::UnicodeString ¶mName, const std::vector< double > &value) |
TyErrorId | assignValue (const icu::UnicodeString ¶mName, const icu::UnicodeString &value) |
TyErrorId | assignValue (const icu::UnicodeString ¶mName, const std::vector< icu::UnicodeString > &value) |
TyErrorId | assignValue (const icu::UnicodeString &groupName, const icu::UnicodeString ¶mName, const bool &value) |
TyErrorId | assignValue (const icu::UnicodeString &groupName, const icu::UnicodeString ¶mName, const std::vector< bool > &value) |
TyErrorId | assignValue (const icu::UnicodeString &groupName, const icu::UnicodeString ¶mName, const int &value) |
TyErrorId | assignValue (const icu::UnicodeString &groupName, const icu::UnicodeString ¶mName, const std::vector< int > &value) |
TyErrorId | assignValue (const icu::UnicodeString &groupName, const icu::UnicodeString ¶mName, const size_t &value) |
TyErrorId | assignValue (const icu::UnicodeString &groupName, const icu::UnicodeString ¶mName, const std::vector< size_t > &value) |
TyErrorId | assignValue (const icu::UnicodeString &groupName, const icu::UnicodeString ¶mName, const float &value) |
TyErrorId | assignValue (const icu::UnicodeString &groupName, const icu::UnicodeString ¶mName, const std::vector< float > &value) |
TyErrorId | assignValue (const icu::UnicodeString &groupName, const icu::UnicodeString ¶mName, const double &value) |
TyErrorId | assignValue (const icu::UnicodeString &groupName, const icu::UnicodeString ¶mName, const std::vector< double > &value) |
TyErrorId | assignValue (const icu::UnicodeString &groupName, const icu::UnicodeString ¶mName, const icu::UnicodeString &value) |
TyErrorId | assignValue (const icu::UnicodeString &groupName, const icu::UnicodeString ¶mName, const std::vector< icu::UnicodeString > &value) |