#include <url_classification.h>
Main class for the URL classification.
- See also
- UrlDbClassifier
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 109 of file url_classification.h.
◆ create()
Creates the URL classification module by using the given DcaInstance and License.
This is the package creation function.
Before using any other functions of the URL classification package, a UrlClassification instance must be created by sumitting a valid DcaInstance and License.
- Parameters
-
[in] | aDcaInstance | A previously initialized DcaInstance object |
[in] | aLicense | An initialized License object |
- Returns
- An initialized UrlClassification instance.
- Exceptions
-
◆ createDbClassifier()
Create a URL database classifier. The classifier is created by using the provided database connection. The DbClassifier is automatically connected to the database via the DbConnection after successful initialization.
- Parameters
-
[in] | aDbConnection | The database connection to be used for classification |
[in] | options | The Options that define several aspects on how embedded URLs should be handled, and whether or not WebLearn should be enabled. This paramter is optional. |
- Returns
- A UrlDbClassifier that is associated with the specified db connection, using the specified options (if any).
- Exceptions
-
◆ setLogLevel()
Sets the logging level for the given class instance. The old value will be returned.
Usually the logging level is set to LOG_Notice.
- Parameters
-
[in] | newLevel | The new LogLevel the class instance should use for logging |
- Returns
- The old used logging level.
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...