Exemplo n.º 1
0
 def test_syllabicate_prefix(
         self):  # Check wrong syllabification (no prefix functionality)
     words = [
         u'subacuático', u'parapsicólogo', 'postimpresionismo',
         'subrepticio'
     ]
     words = [syllabicator.syllabicate(word, lang) for word in words]
     syllabification = [['su', 'ba', u'cuá', 'ti', 'co'],
                        ['pa', 'rap', 'si', u'có', 'lo', 'go'],
                        ['pos', 'tim', 'pre', 'sio', 'nis', 'mo'],
                        ['su', 'brep', 'ti', 'cio']]
     self.assertSequenceEqual(syllabification, words)
Exemplo n.º 2
0
def atonic(word, lang):
    """Return list of atonic syllable/s from a word."""
    syllables = syllabicator.syllabicate(word, lang)
    atonics = get_atonic(syllables, lang)
    return atonics
Exemplo n.º 3
0
def tonic(word, lang):
    """Return tonic syllable from a word."""
    syllables = syllabicator.syllabicate(word, lang)
    return get_tonic(syllables, lang)
Exemplo n.º 4
0
 def test_syllabicate_four_consonants_between_two_voweles(self):
     words = ['instra']
     words = [syllabicator.syllabicate(word, lang) for word in words]
     syllabification = [['ins', 'tra']]
     self.assertSequenceEqual(syllabification, words)
Exemplo n.º 5
0
 def test_syllabicate_three_consonants_with_inseparable_group_between_two_voweles(
         self):
     words = ['intra']
     words = [syllabicator.syllabicate(word, lang) for word in words]
     syllabification = [['in', 'tra']]
     self.assertSequenceEqual(syllabification, words)
Exemplo n.º 6
0
 def test_syllabicate_three_consonants_between_two_vowels(self):
     words = ['insta', 'ashlo']
     words = [syllabicator.syllabicate(word, lang) for word in words]
     syllabification = [['ins', 'ta'], ['ash', 'lo']]
     self.assertSequenceEqual(syllabification, words)
Exemplo n.º 7
0
 def test_syllabicate_hiato_con_tilde(self):
     words = [u'leía']
     words = [syllabicator.syllabicate(word, lang) for word in words]
     syllabification = [['le', u'í', 'a']]
     self.assertSequenceEqual(syllabification, words)
Exemplo n.º 8
0
 def test_syllabicate_triptongo(self):
     words = ['miauriui']
     words = [syllabicator.syllabicate(word, lang) for word in words]
     syllabification = [['miau', 'riui']]
     self.assertSequenceEqual(syllabification, words)
Exemplo n.º 9
0
 def test_syllabicate_hiato(self):
     words = ['peana', 'continuum']
     words = [syllabicator.syllabicate(word, lang) for word in words]
     syllabification = [['pe', 'a', 'na'], ['con', 'ti', 'nu', 'um']]
     self.assertSequenceEqual(syllabification, words)
Exemplo n.º 10
0
 def test_syllabicate_diptongo(self):
     words = ['luisnau', u'cigüeña']
     words = [syllabicator.syllabicate(word, lang) for word in words]
     syllabification = [['luis', 'nau'], ['ci', u'güe', u'ña']]
     self.assertSequenceEqual(syllabification, words)
Exemplo n.º 11
0
 def test_syllabicate_consonant_vowel(self):
     words = ['pepero']
     words = [syllabicator.syllabicate(word, lang) for word in words]
     syllabification = [['pe', 'pe', 'ro']]
     self.assertSequenceEqual(syllabification, words)
Exemplo n.º 12
0
 def test_syllabicate_xenism(self):
     words = ['whiskey', 'amatxu']
     words = [syllabicator.syllabicate(word, lang) for word in words]
     syllabification = [['whis', 'key'], ['a', 'ma', 'txu']]
     self.assertSequenceEqual(syllabification, words)
Exemplo n.º 13
0
 def test_syllabicate_semivowel(self):
     words = ['pytyngoyaxtllynstymal']
     words = [syllabicator.syllabicate(word, lang) for word in words]
     syllabification = [['py', 'tyn', 'go', 'yaxt', 'llyns', 'ty', 'mal']]
     self.assertSequenceEqual(syllabification, words)