data_juicer.ops.mapper.remove_specific_chars_mapper module

class data_juicer.ops.mapper.remove_specific_chars_mapper.RemoveSpecificCharsMapper(chars_to_remove: str | List[str] = '◆●■►▼▲▴∆▻▷❖♡□', *args, **kwargs)[源代码]

基类:Mapper

Mapper to clean specific chars in text samples.

__init__(chars_to_remove: str | List[str] = '◆●■►▼▲▴∆▻▷❖♡□', *args, **kwargs)[源代码]

Initialization method.

参数:
  • chars_to_remove -- a list or a string including all characters that need to be removed from text.

  • args -- extra args

  • kwargs -- extra args

process_batched(samples)[源代码]