You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
793 B
JavaScript
38 lines
793 B
JavaScript
function bayesTrain(id, train_up) {
|
|
try {
|
|
|
|
var query = "backend.php?op=pluginhandler&plugin=af_sort_bayes&method=trainArticle&article_id=" + param_escape(id) +
|
|
"&train_up=" + train_up;
|
|
|
|
new Ajax.Request("backend.php", {
|
|
parameters: query,
|
|
onComplete: function(transport) {
|
|
notify(transport.responseText);
|
|
} });
|
|
|
|
} catch (e) {
|
|
exception_error("showTrgmRelated", e);
|
|
}
|
|
}
|
|
|
|
function bayesClearDatabase() {
|
|
try {
|
|
|
|
if (confirm(__("Clear classifier database?"))) {
|
|
|
|
var query = "backend.php?op=pluginhandler&plugin=af_sort_bayes&method=clearDatabase";
|
|
|
|
new Ajax.Request("backend.php", {
|
|
parameters: query,
|
|
onComplete: function (transport) {
|
|
notify(transport.responseText);
|
|
}
|
|
});
|
|
}
|
|
|
|
} catch (e) {
|
|
exception_error("showTrgmRelated", e);
|
|
}
|
|
}
|
|
|