def _count_syllables(self, word, splitter=re.compile(r'(?<=\D)(?=\d)|(?<=\d)(?=\D)')):
        "Raises KeyError, Nope"
        if not word or len(word) == 0:
            return 0
        
        if 'http:' in word:
            raise Nope

        if '0' == word[0] and len(word) > 1:
            return 1 + self._count_syllables(word[1:])  # oh seven
        
        if '$' == word[0]:
            return 2 + self._count_syllables(word[1:]) # 13 dollars
        
        if '@' == word[0]:
            return 1 + self._count_syllables(word[1:]) # user name

        if '&' in word and len(word) > 1:
            return 1 + sum(self._count_syllables(w) for w in word.split('&'))
        
        if '-' in word:
            return sum(self._count_syllables(w) for w in word.split('-'))
        
        if '_' in word:
            return sum(self._count_syllables(w) for w in word.split('_'))
        
        if not has_digit.search(word):
            return syllables[word]
        if too_many_digits.search(word):
            raise Nope
        m = short_time.match(word)
        if m:
            return 2 + number_syllables[int(m.group(1))]
        m = time.match(word)
        if m:
            if m.group(2) == '00':
                minutes = 2
            else:
                minutes = number_syllables[int(m.group(2))]
            partial = number_syllables[int(m.group(1))] + minutes
            if m.group(3):
                return 2 + partial
            return partial
        m = ordinal.match(word)
        if m:
            return number_syllables[int(m.group(1))]
        count = 0
        start = 0
        for m in splitter.finditer(word):
            boundary = m.start()
            count += self._count_chunk_syllables(word[start:boundary])
            start = boundary
        count += self._count_chunk_syllables(word[start:])
        return count
dataset/ETHPy150Open jdf/haikufinder/haikufinder/__init__.py/LineSyllablizer._count_syllables/original