zorg_network_camera/ocr.py
def text_visible(self):
        """
        Returns true or false based on if the OCR process has read
        actual words. This is needed to prevent non-words from being
        added to the queue since the ocr process can sometimes return
        values that are not meaningfull.
        """

        # Split the input string at points with any amount of whitespace
        words = self.read().split()

        # Light weight check to see if a word exists
        for word in words:

            # If the word is a numeric value
            if word.lstrip('-').replace('.', '', 1).isdigit():
                return True

            # If the word contains only letters with a length from 2 to 20
            if word.isalpha() and (len(word) > 1 or len(word) <= 20):
                return True

        return False
def text_visible(self):
        """
        Returns true or false based on if the OCR process has read
        actual words. This is needed to prevent non-words from being
        added to the queue since the ocr process can sometimes return
        values that are not meaningfull.
        """

        # Split the input string at points with any amount of whitespace
        words = self.read().split()

        # Light weight check to see if a word exists
        for word in words:

            # If the word is a numeric value
            if word.lstrip('-').replace('.', '', 1).isdigit():
                return True

            # If the word contains only letters with a length from 2 to 20
            if word.isalpha() and (len(word) > 1 or len(word) <= 20):
                return True

        return False
Returns true or false based on if the OCR process has read
        actual words. This is needed to prevent non-words from being
        added to the queue since the ocr process can sometimes return
        values that are not meaningfull.