You may install the precompiled binaries and GGUF model using the following instructions.
Both are required to use the
privacy-filter.cppcommand line tool. The binary is the executable that runs the classification, while the model contains the data and parameters needed for the classification process.
Download the archive for your platform from the latest release:
curl -L -o privacy-filter.tar.gz \
https://github.com/DirectoryTree/PrivacyFilterBinaries/releases/latest/download/privacy-filter-darwin-arm64.tar.gz
tar -xzf privacy-filter.tar.gzDownload the GGUF model:
mkdir -p models
curl -L -o models/privacy-filter-f16.gguf \
https://huggingface.co/LocalAI-io/privacy-filter-GGUF/resolve/main/privacy-filter-f16.ggufClassify text from stdin:
echo 'Contact John Doe at jdoe@example.com from 555-0100.' \
| ./privacy-filter-darwin-arm64/bin/privacy-filter --classify models/privacy-filter-f16.gguf 0.5The final argument is the classification threshold. It 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.