Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Adding and removing models from text analyzers

Updated on May 17, 2024

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

ParameterDescription
PurposeThe purpose of the text analyzer.
AppliesToThe applicable class of the text analyzer.
ModelNamesA 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

ParameterDescription
PurposeThe purpose of the text analyzer.
AppliesToThe applicable class of the text analyzer.
ModelNamesA 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.

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us