strings.detecting_english_programmatically ========================================== .. py:module:: strings.detecting_english_programmatically Attributes ---------- .. autoapisummary:: strings.detecting_english_programmatically.ENGLISH_WORDS strings.detecting_english_programmatically.LETTERS_AND_SPACE Functions --------- .. autoapisummary:: strings.detecting_english_programmatically.get_english_count strings.detecting_english_programmatically.is_english strings.detecting_english_programmatically.load_dictionary strings.detecting_english_programmatically.remove_non_letters Module Contents --------------- .. py:function:: get_english_count(message: str) -> float .. py:function:: is_english(message: str, word_percentage: int = 20, letter_percentage: int = 85) -> bool >>> is_english('Hello World') True >>> is_english('llold HorWd') False .. py:function:: load_dictionary() -> dict[str, None] .. py:function:: remove_non_letters(message: str) -> str >>> remove_non_letters("Hi! how are you?") 'Hi how are you' >>> remove_non_letters("P^y%t)h@o*n") 'Python' >>> remove_non_letters("1+1=2") '' >>> remove_non_letters("www.google.com/") 'wwwgooglecom' >>> remove_non_letters("") '' .. py:data:: ENGLISH_WORDS .. py:data:: LETTERS_AND_SPACE :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ """ .. raw:: html