Weave Code
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

Privacy Filter Classifier Laravel Package

directorytree/privacy-filter-classifier

View on GitHub
Deep Wiki
Context7

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

Frequently asked questions about Privacy Filter Classifier
How do I integrate this privacy classifier into a Laravel application?
Bind the classifier as a singleton in Laravel’s service container using the binary and model paths from your config. For example, register it in a service provider with configurable paths and timeout settings. Then inject it into controllers, middleware, or jobs for PII detection.
What Laravel versions does this package support?
The package is framework-agnostic and requires PHP 8.1+. Test compatibility with your Laravel version (e.g., 9.x, 10.x) by verifying the underlying PHP dependencies. No Laravel-specific version constraints are enforced, but ensure your PHP version aligns with the package’s requirements.
Can I use this for automated GDPR/CCPA compliance in logs or user-generated content?
Yes, this classifier detects PII like emails and phone numbers, making it ideal for GDPR/CCPA compliance. Use it in middleware to redact incoming data, or queue jobs to scan logs or support tickets. Configure the threshold to balance precision and recall for your use case.
How do I handle the privacy-filter.cpp binary dependency in production?
The binary must be pre-installed on your deployment environment (e.g., Linux servers or Docker containers). Use platform-specific scripts or Dockerfiles to ensure the binary is available. For Laravel Forge or shared hosting, manually install it or document the requirement for your team.
What’s the best way to update the privacy-filter model without downtime?
Store models in versioned paths (e.g., `storage/models/privacy-filter-v1.0.gguf`) and update your config to point to the new path. Implement a migration script to swap models atomically, or use a feature flag to test the new model before full deployment.
Will this work in a Dockerized Laravel app, or do I need special setup?
Yes, but you must include the binary in your Docker image or mount it as a volume. Add the binary to your `Dockerfile` (e.g., `COPY privacy-filter /usr/local/bin/`) or use a multi-stage build. Test the setup to ensure the binary executes correctly in containerized environments.
How do I configure the classification threshold for production?
Set the threshold in your config (e.g., `config/privacy-filter.php`) based on testing with real-world data. Start with the default (0.75) and adjust upward to reduce false positives or downward to catch more entities. Log classifications to monitor performance and recalibrate as needed.
Are there alternatives to this package for Laravel PII detection?
Yes, consider Laravel-native packages like `spatie/laravel-pii` or cloud APIs like AWS Comprehend. These may offer easier integration but could introduce vendor lock-in or cost. Evaluate trade-offs like maintenance, latency, and compliance requirements before choosing.
How do I cache classification results to improve performance?
Cache results using Laravel’s cache system (e.g., Redis) with a key like `privacy_classification:{md5($text)}`. Set a short TTL (e.g., 1 hour) to avoid stale data. For high-throughput apps, consider a dedicated cache layer for classification results.
Does this package support testing or mocking the privacy-filter binary?
The package is designed for real-world use, but you can mock the binary in tests by creating a wrapper class that intercepts calls. Use PHPUnit’s `Mockery` or Laravel’s `MockFacade` to simulate binary responses and validate your application’s handling of classifications.
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.
codraw/graphviz
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata