# punctuation_normalization_mapper Normalizes unicode punctuations to their English equivalents in text samples. This operator processes a batch of text samples and replaces any unicode punctuation with its corresponding English punctuation. The mapping includes common substitutions like "," to ",", "。" to ".", and "“" to ". It iterates over each character in the text, replacing it if it is found in the predefined punctuation map. The result is a set of text samples with consistent punctuation formatting. 将文本样本中的Unicode标点符号标准化为其英文等效符号。 该算子处理一批文本样本,并将任何Unicode标点符号替换为其对应的英文标点符号。映射包括常见的替换,如","替换为", ","。"替换为".",以及"“"替换为"。它遍历文本中的每个字符,如果在预定义的标点映射中找到,则进行替换。结果是一组具有统一标点格式的文本样本。 Type 算子类型: **mapper** Tags 标签: cpu, text ## 🔧 Parameter Configuration 参数配置 | name 参数名 | type 类型 | default 默认值 | desc 说明 | |--------|------|--------|------| | `args` | | `''` | extra args | | `kwargs` | | `''` | extra args | ## 📊 Effect demonstration 效果演示 ### test_case ```python PunctuationNormalizationMapper() ``` #### 📥 input data 输入数据
[',。、„”“«»1」「《》´∶:?!();–—.~’…━〈〉【】%►']
[',.,""""""""""\'::?!();- - . ~\'...-<>[]%-']