How to use the autocorrect.utils.concat function in autocorrect

To help you get started, we’ve selected a few autocorrect 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 phatpiglet / autocorrect / autocorrect / word.py View on Github external
def _replaces(self):
        """tge"""
        return {concat(a, c, b[1:])
                for a, b in self.slices[:-1]
                for c in ALPHABET}
github phatpiglet / autocorrect / autocorrect / word.py View on Github external
def _deletes(self):
        """th"""
        return {concat(a, b[1:])
                for a, b in self.slices[:-1]}
github phatpiglet / autocorrect / autocorrect / word.py View on Github external
def _inserts(self):
        """thwe"""
        return {concat(a, c, b)
                for a, b in self.slices
                for c in ALPHABET}
github phatpiglet / autocorrect / autocorrect / word.py View on Github external
def _transposes(self):
        """teh"""
        return {concat(a, reversed(b[:2]), b[2:])
                for a, b in self.slices[:-2]}