Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Privacy Filter Classifier Laravel Package

directorytree/privacy-filter-classifier

View on GitHub
Deep Wiki
Context7

Installation

You may install the package via Composer:

composer require directorytree/privacy-filter-classifier

Usage

Create a classifier using the local binary and model paths:

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].');

You may provide a classification threshold at runtime. Only entities with a confidence score equal to or greater than the threshold will be returned:

$entities = $classifier->entities(
    text: 'Contact John Doe at [email protected].',
    threshold: 0.75,
);

Entities

The entities method returns an array of DirectoryTree\PrivacyFilterClassifier\Entity instances:

/** @var \DirectoryTree\PrivacyFilterClassifier\Entity $entity */
foreach ($entities as $entity) {
    $entity->type;  // private_email
    $entity->text;  // [email protected]
    $entity->start; // 20
    $entity->end;   // 36
    $entity->score; // 0.98
}
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel