IConditionGenerator::RecognizeNamedEntities Method

Identifies named entities in an input string, and creates a collection containing them. The value of each named entity is expressed as a string, which is then used by IConditionGenerator::GenerateForLeaf. The string can contain any data and be in any format, because it is not examined by any other components.

Syntax

HRESULT RecognizeNamedEntities(      
    LPCWSTR pszInputString,
    LCID lcid,
    ITokenCollection *pTokenCollection,
    INamedEntityCollector *pNamedEntities
);

Parameters

  • pszInputString
    [in]  The input string to be parsed.
  • lcid
    [in]  The language code identifier (LCID) against which named entities should be recognized.
  • pTokenCollection
    [in] A pointer to an ITokenCollection object that indicates how the input string was tokenized.
  • pNamedEntities
    [in, out]  On input, contains an INamedEntityCollector or NULL. On return, contains an INamedEntityCollector collection of the named entities.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

Given an input string, a user locale (typically the user's default locale) and a tokenization of the input string, the IConditionGenerator::RecognizeNamedEntities method should be able to identify any named entities in that input string, and then add each entity to the named entity collection.

See Also

IConditionGenerator, IConditionFactory, CONDITION_TYPE, CONDITION_OPERATION, CONDITION_CREATION_OPTIONS, ICondition, ICondition2