Browse Source
replace brackets with slashes in addword.py
pull/290/head
b1f6c1c4
5 years ago
No known key found for this signature in database
GPG Key ID: 7534B21ACA726708
1 changed files with
2 additions and
2 deletions
-
tools/addword.py
|
|
@ -57,12 +57,12 @@ def get_phonetic_transcriptions(word): |
|
|
|
lines = [span.get_text() for span in spans] |
|
|
|
match = re.findall(r'\[.+\]', lines[0]) |
|
|
|
if match: |
|
|
|
phones.append(match[0]) |
|
|
|
phones.append(match[0].replace('[', '/').replace(']', '/')) |
|
|
|
else: |
|
|
|
phones.append(" ") |
|
|
|
match = re.findall(r'\[.+\]', lines[1]) |
|
|
|
if match: |
|
|
|
phones.append(match[0]) |
|
|
|
phones.append(match[0].replace('[', '/').replace(']', '/')) |
|
|
|
else: |
|
|
|
phones.append(" ") |
|
|
|
return phones |
|
|
|