Python text.cmudict.valid_symbols() Examples
The following are 3
code examples of text.cmudict.valid_symbols().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
text.cmudict
, or try the search function
.
Example #1
Source File: cmudict_test.py From vae_tacotron with MIT License | 6 votes |
def test_cmudict(): c = cmudict.CMUDict(io.StringIO(test_data)) assert len(c) == 6 assert len(cmudict.valid_symbols) == 84 assert c.lookup('ADVERSITY') == ['AE0 D V ER1 S IH0 T IY2'] assert c.lookup('BarberShop') == ['B AA1 R B ER0 SH AA2 P'] assert c.lookup("You'll") == ['Y UW1 L'] assert c.lookup("'tis") == ['T IH Z'] assert c.lookup('adverse') == [ 'AE0 D V ER1 S', 'AE1 D V ER2 S', 'AE2 D V ER1 S', ] assert c.lookup('') == None assert c.lookup('foo') == None assert c.lookup(')paren') == None
Example #2
Source File: cmudict_test.py From libfaceid with MIT License | 6 votes |
def test_cmudict(): c = cmudict.CMUDict(io.StringIO(test_data)) assert len(c) == 6 assert len(cmudict.valid_symbols) == 84 assert c.lookup('ADVERSITY') == ['AE0 D V ER1 S IH0 T IY2'] assert c.lookup('BarberShop') == ['B AA1 R B ER0 SH AA2 P'] assert c.lookup("You'll") == ['Y UW1 L'] assert c.lookup("'tis") == ['T IH Z'] assert c.lookup('adverse') == [ 'AE0 D V ER1 S', 'AE1 D V ER2 S', 'AE2 D V ER1 S', ] assert c.lookup('') == None assert c.lookup('foo') == None assert c.lookup(')paren') == None
Example #3
Source File: cmudict_test.py From tacotron with MIT License | 6 votes |
def test_cmudict(): c = cmudict.CMUDict(io.StringIO(test_data)) assert len(c) == 6 assert len(cmudict.valid_symbols) == 84 assert c.lookup('ADVERSITY') == ['AE0 D V ER1 S IH0 T IY2'] assert c.lookup('BarberShop') == ['B AA1 R B ER0 SH AA2 P'] assert c.lookup("You'll") == ['Y UW1 L'] assert c.lookup("'tis") == ['T IH Z'] assert c.lookup('adverse') == [ 'AE0 D V ER1 S', 'AE1 D V ER2 S', 'AE2 D V ER1 S', ] assert c.lookup('') == None assert c.lookup('foo') == None assert c.lookup(')paren') == None