|
|
@ -57,12 +57,12 @@ def get_phonetic_transcriptions(word):
|
|
|
|
lines = [span.get_text() for span in spans]
|
|
|
|
lines = [span.get_text() for span in spans]
|
|
|
|
match = re.findall(r'\[.+\]', lines[0])
|
|
|
|
match = re.findall(r'\[.+\]', lines[0])
|
|
|
|
if match:
|
|
|
|
if match:
|
|
|
|
phones.append(match[0])
|
|
|
|
phones.append(match[0].replace('[', '/').replace(']', '/'))
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
phones.append(" ")
|
|
|
|
phones.append(" ")
|
|
|
|
match = re.findall(r'\[.+\]', lines[1])
|
|
|
|
match = re.findall(r'\[.+\]', lines[1])
|
|
|
|
if match:
|
|
|
|
if match:
|
|
|
|
phones.append(match[0])
|
|
|
|
phones.append(match[0].replace('[', '/').replace(']', '/'))
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
phones.append(" ")
|
|
|
|
phones.append(" ")
|
|
|
|
return phones
|
|
|
|
return phones
|
|
|
|