Language¶
- class chepy.modules.language.Language(*data)¶
- decode(encoding: str, errors: str = 'backslashreplace') LanguageT ¶
Decode the string using the given encoding.
- Parameters
encoding (str) – Encoding to use.
errors (str, optional) – How to handle errors when decoding. Defaults to ‘backslashreplace’.
- Returns
The Chepy object.
- Return type
- encode(encoding: str, errors: str = 'backslashreplace') LanguageT ¶
Encode the string using the given encoding.
- Parameters
encoding (str) – Encoding to use.
errors (str, optional) – How to handle errors when encoding. Defaults to ‘backslashreplace’.
- Returns
The Chepy object.
- Return type
- encode_us_ascii_7_bit() LanguageT ¶
Encode state using US ascii 7 bit
- Returns
The Chepy object.
- Return type
- find_emojis() LanguageT ¶
Find emojis, symbols, pictographs, map symbols and flags
- Returns
The Chepy object.
- Return type
- remove_diacritics() LanguageT ¶
Replaces accented characters latin character equivalent.
- Returns
The Chepy object.
- Return type
- search_perl_unicode_props(lang: str) LanguageT ¶
Search using perl unicode properties. https://perldoc.perl.org/perluniprops#(%5Cd+)-in-the-info-column-gives-the-number-of-Unicode-code-points-matched-by-this-property.
- Parameters
lang (str) – Required. A string value identifying the language.
- Returns
The Chepy object.
- Return type
- str_to_unicode(prefix: str = '\\u', all_chars: bool = False) LanguageT ¶
Convert unicode to str
- Parameters
prefix (str) – Prefix character.
all_chars (bool) – Force convert all chars to unicode.
- Returns
The Chepy object.
- Return type