stefantaubert / cmudict-parser Goto Github PK
View Code? Open in Web Editor NEWPython parser for CMUDict files. It returns ARBAbet and IPA transciption of dictionary words.
License: MIT License
Python parser for CMUDict files. It returns ARBAbet and IPA transciption of dictionary words.
License: MIT License
The following text raised an error: it is not a real gain, for the modern printer throws the gain away by putting inordinately wide spaces between his lines, which, probably,
Traceback
Traceback (most recent call last):
File "/home/mi/.local/share/virtualenvs/tacotron2-vfc1XCWN/src/text-utils/text_utils/text.py", line 86, in en_to_ipa_cmu_epitran
result = CMU_CACHE.sentence_to_ipa(
File "/home/mi/.local/share/virtualenvs/tacotron2-vfc1XCWN/src/cmudict-parser/cmudict_parser/CMUDict.py", line 63, in sentence_to_ipa
ipa = self.get_ipa_of_word_in_sentence(word, replace_unknown_with)
File "/home/mi/.local/share/virtualenvs/tacotron2-vfc1XCWN/src/cmudict-parser/cmudict_parser/CMUDict.py", line 70, in get_ipa_of_word_in_sentence
ipa = self.get_ipa_of_words_with_punctuation(word, replace_unknown_with)
File "/home/mi/.local/share/virtualenvs/tacotron2-vfc1XCWN/src/cmudict-parser/cmudict_parser/CMUDict.py", line 95, in get_ipa_of_words_with_punctuation
if self.contains(word_with_apo_at_beginning) and punctuations_before_word[-1] == "'":
IndexError: string index out of range
Please fix the error occuring on together, higgledy-piggledy, the
.
Callback:
Exception has occurred: AssertionError
File "/home/mi/code/cmudict-parser/cmudict_parser/SentenceToIPA.py", line 115, in get_ipa_of_words_with_hyphen
assert ipa is not None
File "/home/mi/code/cmudict-parser/cmudict_parser/SentenceToIPA.py", line 89, in ipa_of_punctuation_and_words_combined
ipa_of_word_without_punct = f"{get_ipa_of_words_with_hyphen(dict, word_without_punctuation, replace_unknown_with)}{char_at_end}"
File "/home/mi/code/cmudict-parser/cmudict_parser/SentenceToIPA.py", line 54, in get_ipa_of_word_with_punctuation
return ipa_of_punctuation_and_words_combined(dict, punctuation_before_word, word_without_punctuation, punctuation_after_word, replace_unknown_with)
File "/home/mi/code/cmudict-parser/cmudict_parser/SentenceToIPA.py", line 42, in get_ipa_of_word_in_sentence
ipa = get_ipa_of_word_with_punctuation(dict, word, replace_unknown_with)
File "/home/mi/code/cmudict-parser/cmudict_parser/SentenceToIPA.py", line 34, in get_ipa_of_word_in_sentence_cache
ipa = get_ipa_of_word_in_sentence(dict, word, replace_unknown_with)
File "/home/mi/code/cmudict-parser/cmudict_parser/SentenceToIPA.py", line 21, in <listcomp>
ipa_words = [get_ipa_of_word_in_sentence_cache(
File "/home/mi/code/cmudict-parser/cmudict_parser/SentenceToIPA.py", line 21, in sentence_to_ipa
ipa_words = [get_ipa_of_word_in_sentence_cache(
File "/home/mi/code/cmudict-parser/cmudict_parser/CMUDict.py", line 51, in sentence_to_ipa
return get_ipa_of_sentence(self._entries_first_ipa, sentence, replace_unknown_with, use_caching)
File "/home/mi/code/cmudict-parser/cmudict_parser/playground.py", line 9, in <module>
res = cmu.sentence_to_ipa(x, replace_unknown_with="_")
Cache the IPA of already converted words.
The method sentence_to_ipa
throws an exception for the input: "'Whose name is'--
.
The folder "hier" was pushed. Please remove it from the repo.
In method: get_ipa_of_word_in_sentence
Conversion failed for Suckin'--I mean helpin' people an' fightin' an' all that.
Traceback:
Traceback (most recent call last):
File "/home/mi/.local/share/virtualenvs/tacotron2-vfc1XCWN/src/text-utils/text_utils/text.py", line 86, in en_to_ipa_cmu_epitran
result = CMU_CACHE.sentence_to_ipa(
File "/home/mi/.local/share/virtualenvs/tacotron2-vfc1XCWN/src/cmudict-parser/cmudict_parser/CMUDict.py", line 51, in sentence_to_ipa
return get_ipa_of_sentence(self._entries_first_ipa, sentence, replace_unknown_with, use_caching)
File "/home/mi/.local/share/virtualenvs/tacotron2-vfc1XCWN/src/cmudict-parser/cmudict_parser/SentenceToIPA.py", line 17, in sentence_to_ipa
ipa_words = [get_ipa_of_word_in_sentence_cache(
File "/home/mi/.local/share/virtualenvs/tacotron2-vfc1XCWN/src/cmudict-parser/cmudict_parser/SentenceToIPA.py", line 17, in <listcomp>
ipa_words = [get_ipa_of_word_in_sentence_cache(
File "/home/mi/.local/share/virtualenvs/tacotron2-vfc1XCWN/src/cmudict-parser/cmudict_parser/SentenceToIPA.py", line 30, in get_ipa_of_word_in_sentence_cache
ipa = get_ipa_of_word_in_sentence(dict, word, replace_unknown_with)
File "/home/mi/.local/share/virtualenvs/tacotron2-vfc1XCWN/src/cmudict-parser/cmudict_parser/SentenceToIPA.py", line 38, in get_ipa_of_word_in_sentence
ipa = get_ipa_of_word_with_punctuation(dict, word, replace_unknown_with)
File "/home/mi/.local/share/virtualenvs/tacotron2-vfc1XCWN/src/cmudict-parser/cmudict_parser/SentenceToIPA.py", line 50, in get_ipa_of_word_with_punctuation
return ipa_of_punctuation_and_words_combined(dict, punctuation_before_word, word_without_punctuation, punctuation_after_word, replace_unknown_with)
File "/home/mi/.local/share/virtualenvs/tacotron2-vfc1XCWN/src/cmudict-parser/cmudict_parser/SentenceToIPA.py", line 85, in ipa_of_punctuation_and_words_combined
ipa_of_word_without_punct = f"{get_ipa_of_words_with_hyphen(dict, word_without_punctuation, replace_unknown_with)}{char_at_end}"
File "/home/mi/.local/share/virtualenvs/tacotron2-vfc1XCWN/src/cmudict-parser/cmudict_parser/SentenceToIPA.py", line 107, in get_ipa_of_words_with_hyphen
ipa = find_combination_of_certain_length_in_dict(
File "/home/mi/.local/share/virtualenvs/tacotron2-vfc1XCWN/src/cmudict-parser/cmudict_parser/SentenceToIPA.py", line 119, in find_combination_of_certain_length_in_dict
word, apos_before, apos_after = strip_apos_at_beginning_and_end_if_they_do_not_belong_to_word(
File "/home/mi/.local/share/virtualenvs/tacotron2-vfc1XCWN/src/cmudict-parser/cmudict_parser/SentenceToIPA.py", line 130, in strip_apos_at_beginning_and_end_if_they_do_not_belong_to_word
word, apos_before = strip_apos(word, 0)
File "/home/mi/.local/share/virtualenvs/tacotron2-vfc1XCWN/src/cmudict-parser/cmudict_parser/SentenceToIPA.py", line 144, in strip_apos
while word[pos] == "'":
IndexError: string index out of range
see testcase in branch bugfix_numbers
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.