Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Unidecode due to licensing issues #27

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pypinyin
jieba
# english
eng_to_ipa
unidecode
anyascii
inflect
# japanese
# if pyopenjtalk fail to download open_jtalk_dic_utf_8-1.11.tar.gz, manually download and unzip the file below
Expand Down
4 changes: 2 additions & 2 deletions text/english.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import re
import inflect
from unidecode import unidecode
from anyascii import anyascii
import eng_to_ipa as ipa
_inflect = inflect.engine()
_comma_number_re = re.compile(r'([0-9][0-9\,]+[0-9])')
Expand Down Expand Up @@ -158,7 +158,7 @@ def mark_dark_l(text):


def english_to_ipa(text):
text = unidecode(text).lower()
text = anyascii(text).lower()
text = expand_abbreviations(text)
text = normalize_numbers(text)
phonemes = ipa.convert(text)
Expand Down
4 changes: 2 additions & 2 deletions text/japanese.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import re
from unidecode import unidecode
from anyascii import anyascii
import pyopenjtalk


Expand Down Expand Up @@ -108,7 +108,7 @@ def japanese_to_romaji_with_accent(text):
elif a2 == 1 and a2_next == 2:
text += '↑'
if i < len(marks):
text += unidecode(marks[i]).replace(' ', '')
text += anyascii(marks[i]).replace(' ', '')
return text


Expand Down