<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
directorytree / privacy-filter-classifier example snippets
use DirectoryTree\PrivacyFilterClassifier\Classifier;
$classifier = new Classifier(
binaryPath: '/path/to/privacy-filter',
modelPath: '/path/to/privacy-filter-f16.gguf',
timeout: 60,
);
$entities = $classifier->entities('Contact John Doe at [email protected].');
$entities = $classifier->entities(
text: 'Contact John Doe at [email protected].',
threshold: 0.75,
);