MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / normalizeFiller

Function normalizeFiller

packages/node-runtime/src/semantic-index/chunker.ts:149–154  ·  view source on GitHub ↗

归一化用于填充语匹配:去首尾空白、去末尾标点、英文小写

(content: string)

Source from the content-addressed store, hash-verified

147
148/** 归一化用于填充语匹配:去首尾空白、去末尾标点、英文小写 */
149function normalizeFiller(content: string): string {
150 return content
151 .trim()
152 .toLowerCase()
153 .replace(/[。.!!??、,,~~\s]+$/u, '')
154}
155
156export function isSemanticVoid(message: ChunkMessageInput): boolean {
157 if (message.type !== undefined && VOID_MESSAGE_TYPES.has(message.type)) return true

Callers 1

isSemanticVoidFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected