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