PHPackages                             directorytree/privacy-filter-classifier - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. directorytree/privacy-filter-classifier

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

directorytree/privacy-filter-classifier
=======================================

Framework agnostic PHP classifier for privacy-filter.cpp binaries.

v1.0.0(yesterday)020↑2900%1MITPHPPHP ^8.2CI passing

Since Jun 18Pushed todayCompare

[ Source](https://github.com/DirectoryTree/PrivacyFilterClassifier)[ Packagist](https://packagist.org/packages/directorytree/privacy-filter-classifier)[ RSS](/packages/directorytree-privacy-filter-classifier/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (3)Versions (2)Used By (1)

Privacy Filter Classifier
=========================

[](#privacy-filter-classifier)

[![Tests status](https://github.com/DirectoryTree/PrivacyFilterClassifier/actions/workflows/run-tests.yml/badge.svg?branch=master)](https://github.com/DirectoryTree/PrivacyFilterClassifier/actions/workflows/run-tests.yml)

Framework agnostic PHP classifier for [`privacy-filter.cpp`](https://github.com/DirectoryTree/PrivacyFilterBinaries) binaries.

Installation
------------

[](#installation)

You may install the package via Composer:

```
composer require directorytree/privacy-filter-classifier
```

Usage
-----

[](#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 jdoe@example.com.');
```

You may provide a classification threshold at runtime. The threshold is the minimum confidence score an entity must meet before it is returned. Increasing the threshold returns fewer, higher-confidence entities, while decreasing it may return more entities with lower confidence:

```
$entities = $classifier->entities(
    text: 'Contact John Doe at jdoe@example.com.',
    threshold: 0.75,
);
```

Entities
--------

[](#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;  // jdoe@example.com
    $entity->start; // 20
    $entity->end;   // 36
    $entity->score; // 0.98
}
```

###  Health Score

42

—

FairBetter than 89% of packages

Maintenance100

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c6dd082636ff8a08df8dfdcd622ea242374d1d76dd33bceec5a6cd3ae26dc24f?d=identicon)[stevebauman](/maintainers/stevebauman)

---

Top Contributors

[![stevebauman](https://avatars.githubusercontent.com/u/6421846?v=4)](https://github.com/stevebauman "stevebauman (11 commits)")

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/directorytree-privacy-filter-classifier/health.svg)

```
[![Health](https://phpackages.com/badges/directorytree-privacy-filter-classifier/health.svg)](https://phpackages.com/packages/directorytree-privacy-filter-classifier)
```

###  Alternatives

[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k245.4M23.8k](/packages/friendsofphp-php-cs-fixer)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

749284.3k35](/packages/civicrm-civicrm-core)[spatie/laravel-export

Create a static site bundle from a Laravel app

672139.5k6](/packages/spatie-laravel-export)[illuminate/process

The Illuminate Process package.

44813.9k96](/packages/illuminate-process)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
