updated docs strings and added README.md
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
"""
|
||||
# Summary
|
||||
|
||||
Subject line normalization utilities for Mail Intake.
|
||||
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
This module provides helper functions for normalizing email subject lines
|
||||
to enable reliable thread-level comparison and grouping.
|
||||
|
||||
@@ -36,14 +34,15 @@ def normalize_subject(subject: str) -> str:
|
||||
Notes:
|
||||
**Responsibilities:**
|
||||
|
||||
- Strips common prefixes such as ``Re:``, ``Fwd:``, and ``FW:``
|
||||
- Repeats prefix stripping to handle stacked prefixes
|
||||
- Collapses excessive whitespace
|
||||
- Preserves original casing (no lowercasing)
|
||||
- Strips common prefixes such as `Re:`, `Fwd:`, and `FW:`.
|
||||
- Repeats prefix stripping to handle stacked prefixes.
|
||||
- Collapses excessive whitespace.
|
||||
- Preserves original casing (no lowercasing).
|
||||
|
||||
**Guarantees:**
|
||||
|
||||
- This function is intentionally conservative and avoids aggressive transformations that could alter the semantic meaning of the subject
|
||||
- This function is intentionally conservative and avoids aggressive
|
||||
transformations that could alter the semantic meaning of the subject.
|
||||
"""
|
||||
if not subject:
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user