MCPcopy Index your code
hub / github.com/1Panel-dev/MaxKB / normalize_for_embedding

Function normalize_for_embedding

apps/knowledge/vector/base_vector.py:49–55  ·  view source on GitHub ↗
(text: str)

Source from the content-addressed store, hash-verified

47
48
49def normalize_for_embedding(text: str) -> str:
50 if not text:
51 return ""
52
53 text = RE_EMOJI.sub("", text)
54 text = RE_WHITESPACE.sub(" ", text)
55 return text.strip()
56
57
58class BaseVectorStore(ABC):

Callers 4

_saveMethod · 0.90
_batch_saveMethod · 0.90
hit_testMethod · 0.90
searchMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected