Class Reference
%iKnow.Classification.Classifier
|
|
![]() |
|||
Private Storage |
The InterSystems IRIS NLP iKnow technology is now deprecated. Please see the product documentation for more detail.
This is the superclass for executable Text Categorization models. Upon compiling a subclass
of this class, the required internal code will be generated to support the class' main
methods
set tClassifier = ##class(User.MyClassifier).%New()
write tClassifier.%CategorizeText(.tCategories, "The helicopter was not flying at a sufficiently high altitude ...")
zwrite tCategories
To invoke it on a source in an iKnow domain:
set tClassifier = ##class(User.MyClassifier).%New("iKnow", [domain name])
write tClassifier.%Categorize(.tCategories, tSourceId)
zwrite tCategories
|
|
|
This method runs the Text Categorization model defined in
Classifier against the document identified by pSourceId. When this method returns, pCategories will contain all candidate categories for this document, sorted by decreasing score: pCategories(n) = $lb([category name], [score]) The entry with the highest score (pCategories(1)) is this model's best prediction.If this Classifier instance has not been initialized with a reference to an iKnow or other domain, supply pMode="iKnow" and the domain name as pDomainSpec to point this classifier to the right location.
Static method to categorize a text fragment, returning the most likely category the text belongs to. See also%CategorizeText
This method runs the Text Categorization model defined in
Classifier against the free text pText. When this method returns, pCategories will contain all candidate categories for this document, sorted by decreasing score: pCategories(n) = $lb([category name], [score]) The entry with the highest score (pCategories(1)) is this model's best prediction.Optionally a
%iKnow.Configuration 's name can be passed in through pConfig to override the default configuration to use when indexing the text, for example to use a language model other than the default English (or automatically detect the right language to use).
Returns an array containing the categories specified in this classifier: pTerms(n) = $lb(name, description, recordCount, spec)
Returns an array containing the terms specified in this classifier: pTerms(n) = $lb(stringRepresentation, type, negationPolicy, countPolicy, displayName)