How to use the contractions.generate_contractions function in contractions

To help you get started, we’ve selected a few contractions examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github andre-martins / TurboParser / python / tokenizers / portuguese / word_tokenizer.py View on Github external
def __init__(self, replace_quotes=False, replace_parenthesis=False):
        # Tokenization style.
        self.tokenization_style = ''

        # If True, replace all quotes by a single quote.
        self.replace_quotes = replace_quotes

        # If True, replace all parenthesis by a single quote.
        self.replace_parenthesis = replace_parenthesis

        # Generate list of contractions.
        self.contractions = contr.generate_contractions()

        # Generate list of clitics.
        self.clitics, self.suffixes = clit.generate_clitics()

contractions

Fixes contractions such as `you're` to you `are`

MIT
Latest version published 2 years ago

Package Health Score

55 / 100
Full package analysis