H-Ismael/ollamonym
Psuedo annonymizer balancing deterministic and llm based techniques.
What's novel
Psuedo annonymizer balancing deterministic and llm based techniques.
Code Analysis
13 files read · 4 roundsA FastAPI service that detects PII entities in text using a hybrid pipeline (regex rules + local Ollama LLM), replaces them with deterministic session-stable tokens or realistic fakes, and supports reversible deanonymization via returned mappings.
Strengths
The hybrid detection pipeline with session-level alias propagation (AliasPostPass) and group-consistent fake generation (RealisticRenderer._project_group_fake) are genuinely thoughtful solutions to real problems — catching LLM-missed mentions and keeping related aliases visually consistent. The code is well-organized with clear separation of concerns across 10+ focused pipeline modules, and the deterministic HMAC-based token generation is cryptographically sound.
Weaknesses
The LLM integration is tightly coupled to Ollama's specific API, making provider swapping harder than the README's 'provider flexibility' claim suggests. The chunking strategy is basic (paragraph-based only), and the alias post-pass's n-gram overlap heuristic could produce false positives on common word combinations in longer texts.
Score Breakdown
Signal breakdown
Innovation
Craft
Traction
Scope
Evidence
Commits
49
Contributors
1
Files
49
Active weeks
4
Repository
Language
Python
Stars
1
Forks
0
License
Apache-2.0