LinkedIn
Copied!

Table of Contents

Adding and removing models from text analyzers

Version:

Only available versions of this content are shown in the dropdown

Use the pxAddModelInTextAnalyzer and pxRemoveModelFromTextAnalyzer APIs for adding and removing models from text analyzers.

pxAddModelInTextAnalyzer

Use the pxAddModelInTextAnalyzer API to add a model to a Text Analyzer rule.

This API has the following input properties:

pxAddModelInTextAnalyzer API input properties

Parameter Description
Purpose The purpose of the text analyzer.
AppliesTo The applicable class of the text analyzer.
ModelNames A comma-separated list of model names.

In the case of text categorization models, the pxAddModelInTextAnalyzer API replaces existing models with new ones. In the case of entity models, the API adds new models to the existing list of entity types to detect and marks all entity types as detectable. If an entity model with the same name is already present in the list, then the model is not replaced and an error message appears.

If there are no models of a specific analysis type (for example, topic detection) in the target text analyzer and you want to add a model of that type, then the API enables that analysis type and adds the models. If the text analyzer is in a blocked ruleset, then that text analyzer is saved in the next available ruleset.

The API uses the same set of validation messages as the Text Analyzer rule type when you click Save.

pxRemoveModelFromTextAnalyzer

Use the pxRemoveModelFromTextAnalyzer API to remove a model from a text analyzer.

This API has the following input properties:

pxRemoveModelFromTextAnalyzer API input properties

Parameter Description
Purpose The purpose of the text analyzer.
AppliesTo The applicable class of the text analyzer.
ModelNames A comma-separated list of model names.

The pxRemoveModelFromTextAnalyzer API removes the models that you specify from the text analyzer. The API identifies the model type automatically. If a model is removed, and no models are configured for the corresponding analysis type (for example, topic detection), then the API automatically disables that analysis type. If the text analyzer is in a blocked ruleset, then that text analyzer is saved in the next available ruleset.

Related Content

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.