seanghay commited on
Commit
ca56440
1 Parent(s): 3ece6c8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -5,6 +5,7 @@ import re
5
  import shlex
6
  import tempfile
7
  import subprocess
 
8
 
9
  def phonemizer(text: str):
10
 
@@ -68,7 +69,8 @@ def phonemizer_ipa(text: str):
68
  return phoneme
69
 
70
  def processor(text: str):
71
- return phonemizer(text), phonemizer_ipa(text)
 
72
 
73
  iface = gr.Interface(
74
  title="Khmer Phonemizer",
 
5
  import shlex
6
  import tempfile
7
  import subprocess
8
+ import khmercut
9
 
10
  def phonemizer(text: str):
11
 
 
69
  return phoneme
70
 
71
  def processor(text: str):
72
+ tokens = khmercut.tokenize(text)
73
+ return "".join(map(phonemizer, tokens)), "".join(map(phonemizer_ipa, tokens))
74
 
75
  iface = gr.Interface(
76
  title="Khmer Phonemizer",