SpecialCharacters#

class SpecialCharacters[source]#

Find samples that contain special characters.

Parameters
special_characters_whitelist: Union[str, Sequence[str]] , default ‘ ‘ + string.punctuation

set of special characters to ignore. Punctuation (string.punctuation) is whitelisted by default.

n_most_commonint , default: 10

Number of most common special-only samples to show in results

n_samples: int, default: 10_000_000

number of samples to use for this check.

random_stateint, default: 42

random seed for all check internals.

max_text_length_for_displayint, default 30

truncate text samples to given length before display.

__init__(special_characters_whitelist: Optional[Union[str, Sequence[str]]] = None, n_most_common: int = 10, n_samples: int = 10000000, random_state: int = 42, max_text_length_for_display: int = 30, **kwargs)[source]#
__new__(*args, **kwargs)#

Attributes

Methods

SpecialCharacters.add_condition(name, ...)

Add new condition function to the check.

SpecialCharacters.add_condition_ratio_of_samples_with_special_characters_less_or_equal([...])

Add condition - ratio of samples with special character is less or equal to the threshold.

SpecialCharacters.add_condition_ratio_of_special_characters_less_or_equal([...])

Add condition - each special character ratio is less or equal to the threshold.

SpecialCharacters.clean_conditions()

Remove all conditions from this check instance.

SpecialCharacters.conditions_decision(result)

Run conditions on given result.

SpecialCharacters.config([include_version, ...])

Return check configuration (conditions' configuration not yet supported).

SpecialCharacters.from_config(conf[, ...])

Return check object from a CheckConfig object.

SpecialCharacters.from_json(conf[, ...])

Deserialize check instance from JSON string.

SpecialCharacters.metadata([with_doc_link])

Return check metadata.

SpecialCharacters.name()

Name of class in split camel case.

SpecialCharacters.params([show_defaults])

Return parameters to show when printing the check.

SpecialCharacters.remove_condition(index)

Remove given condition by index.

SpecialCharacters.run(dataset[, model, ...])

Run check.

SpecialCharacters.run_logic(context, ...)

Run check.

SpecialCharacters.to_json([indent, ...])

Serialize check instance to JSON string.