These tools and metrics are designed to help AI actors develop and use trustworthy AI systems and applications that respect human rights and are fair, transparent, explainable, robust, secure and safe.
pyPANTERA (Python Package for Natural Language Obfuscation Enforcing Privacy and Anonymisation)
pyPANTERA (Python Package for Natural Language Obfuscation Enforcing Privacy and Anonymisation) is an open-source Python package for obfuscating text using differential privacy. Text such as search queries, messages or reviews can reveal sensitive information about the people who write them. Obfuscation replaces the words in a text with substitutes, so that the original cannot be directly recovered, while keeping the text useful for tasks such as search or sentiment analysis. Differential privacy provides a mathematical guarantee for this protection. The package helps privacy practitioners and researchers implement, reproduce and compare state-of-the-art obfuscation methods in a single framework. It was developed at the University of Padua and won the Best Resource Paper Award at the 2024 ACM International Conference on Information and Knowledge Management (CIKM).
The package implements seven published mechanisms in two families. Word embedding perturbation mechanisms represent each word as a set of numbers, add calibrated random noise and replace the word with the closest match to the result. These include CMP, Mahalanobis and the Vickrey mechanisms. Word sampling mechanisms identify neighbouring words with similar meanings and randomly choose a substitute, weighted by similarity and the privacy setting. These include CusText, SanText and TEM.
Users provide a text file and word embeddings, choose a mechanism and set the privacy parameter, epsilon. Lower values give stronger privacy but less faithful text. The package then produces obfuscated versions and supports testing them on document retrieval and sentiment analysis tasks. It is released under the GPL-3.0 licence.
Auto-discovered on 2026-09-30 by OECD Catalogue Automation
About the tool
You can click on the links to see the associated tools
Objective(s):
Lifecycle stage(s):
Type of approach:
Maturity:
Usage rights:
License:
Target users:
Technology platforms:
Programming languages:
Github stars:
- 30
Use Cases
Would you like to submit a use case for this tool?
If you have used this tool, we would love to know more about your experience.
Add use case




























