Skip to content

Commit 07fdbba

Browse files
committed
_accepted_chars() accepts Vietnamese characters with tone and mark as well
ISSUE: #17
1 parent c815ff7 commit 07fdbba

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

bogo/core.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,14 @@ def get_vni_definition():
101101

102102
def _accepted_chars(rules):
103103
if sys.version_info[0] > 2:
104-
accepted_chars = \
105-
string.ascii_letters + \
106-
''.join(rules.keys())
104+
ascii_letters = \
105+
string.ascii_letters
107106
else:
108-
accepted_chars = \
107+
ascii_letters = \
109108
string.lowercase + \
110-
string.uppercase + \
111-
''.join(rules.keys())
109+
string.uppercase
112110

113-
return accepted_chars
111+
return set(ascii_letters + ''.join(rules.keys()) + utils.VOWELS + "đ")
114112

115113

116114
def process_sequence(sequence,

0 commit comments

Comments
 (0)