MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / normalize_text

Function normalize_text

worked/example/raw/processor.py:12–17  ·  view source on GitHub ↗

Lowercase, strip extra whitespace, remove control characters.

(text: str)

Source from the content-addressed store, hash-verified

10
11
12def normalize_text(text: str) -> str:
13 """Lowercase, strip extra whitespace, remove control characters."""
14 text = text.lower().strip()
15 text = re.sub(r"\s+", " ", text)
16 text = re.sub(r"[^\x20-\x7e]", "", text)
17 return text
18
19
20def extract_keywords(text: str) -> list:

Callers 2

normalize_fieldsFunction · 0.90
extract_keywordsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected