def __init__(self, form='NFKC', strip=True, collapse=True, hyphens=False, quotes=False, ellipsis=False,
slashes=False, tildes=False):
"""
:param string form: Normal form for unicode normalization.
:param bool strip: Whether to strip whitespace from start and end.
:param bool collapse: Whether to collapse all whitespace (tabs, newlines) down to single spaces.
:param bool hyphens: Whether to normalize all hyphens, minuses and dashes to the ASCII hyphen-minus character.
:param bool quotes: Whether to normalize all apostrophes, quotes and primes to the ASCII quote character.
:param bool ellipsis: Whether to normalize ellipses to three full stops.
:param bool slashes: Whether to normalize slash characters to the ASCII slash character.
:param bool tildes: Whether to normalize tilde characters to the ASCII tilde character.
"""
self.form = form
self.strip = strip
self.collapse = collapse
self.hyphens = hyphens
self.quotes = quotes
self.ellipsis = ellipsis
self.slashes = slashes
self.tildes = tildes
评论列表
文章目录