Expand description
Tag normalization with fuzzy matching.
When a user adds a tag, this module checks if a similar tag already exists in the task list and normalizes it automatically.
§Rules
- Exact match — tag already exists as-is → use it unchanged
- Case-insensitive match —
Rustmatchesrust→ normalize to existing - Fuzzy match — edit distance ≤ threshold → normalize to closest match
- No match — tag is new → accept as-is
§Threshold
- Tags ≤ 4 chars: distance ≤ 1
- Tags ≥ 5 chars: distance ≤ 2
This avoids false positives like rust → just (distance 2 on a 4-char tag).
Enums§
- Normalize
Result - Result of normalizing a single tag.
Functions§
- collect_
existing_ tags - Collect all unique tags from a task list.
- normalize_
tag - Normalize a single tag against the list of existing tags.
- normalize_
tags - Normalize a list of tags against existing tags.