#include <url_classification_result.h>
Results of an URL classification.
- See also
- UrlDbClassifier, UrlClassification
UrlDbClassifierOptions creationOptions;
creationOptions.enable_Feedback = true;
creationOptions.enable_EmbeddedUrlDetection = true;
myUrlDbClassifier.
classify( myUrl, myUrlClassificationResults );
if( !myResult ) {
cout << "Received an error from URL Classification (Error code:" <<
return;
}
cout << "Received no results, URL is unknown." << endl;
return;
}
cout << "URL is known but has no assigned categories." << endl;
return;
}
PrintResults( myUrlClassificationResults );
Definition at line 31 of file url_classification_result.h.
◆ at()
Returns one result of the matched results (if any) with the given index.
- Parameters
-
[in] | index | The index of the UrlClassificationResult. Range is from 0 to size() - 1 |
- Returns
- The result item for the given index in the container.
- Exceptions
-
◆ operator[]()
Similar to at() but allows a more C++ style access.
- Parameters
-
[in] | index | The index of the UrlClassificationResult. Range is from 0 to size() - 1 |
- Returns
- The result item for the given index in the container.
- Exceptions
-
◆ size()
Returns the number of results in the container.
- Returns
- The size of the container or 0 if the container is empty.
◆ contains()
Fast method to see whether the results contain a given category or not.
- Parameters
-
[in] | catid | The category id to match |
- Returns
- true, if the given catid has been found in the container, false otherwise
The documentation for this class was generated from the following file:
UrlDbClassifier createDbClassifier(const DbConnection &aDbConnection, const UrlDbClassifierOptions &options=UrlDbClassifierOptions()) const
Create a URL database classifier. The classifier is created by using the provided database connection...