From e23b3cbd6c4d1550e9391fd7370d0acfba682624 Mon Sep 17 00:00:00 2001 From: b1f6c1c4 Date: Mon, 31 Aug 2020 23:03:55 -0400 Subject: [PATCH] replace brackets with slashes in addword.py --- tools/addword.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/addword.py b/tools/addword.py index 20e640b..e89466c 100755 --- a/tools/addword.py +++ b/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