859a6ddb6abf4e9e7848be9160195a0ba080f13e,pythainlp/util/digitconv.py,,digit_to_text,#Any#,121
Before Change
if not text or not isinstance(text, str):
return ""
newtext = []
for ch in text:
if ch in _thai_arabic:
ch = _thai_arabic[ch]
if ch in _digit_spell:
newtext.append(_digit_spell[ch])
else:
newtext.append(ch)
return "".join(newtext)
def text_to_arabic_digit(text: str) -> str:
After Change
if not text or not isinstance(text, str):
return ""
text = text.translate(_thai_arabic_translate_table)
text = text.translate(_digit_spell_translate_table)
return text
def text_to_arabic_digit(text: str) -> str:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 16
Instances
Project Name: PyThaiNLP/pythainlp
Commit Name: 859a6ddb6abf4e9e7848be9160195a0ba080f13e
Time: 2019-09-30
Author: 6845502+abhabongse@users.noreply.github.com
File Name: pythainlp/util/digitconv.py
Class Name:
Method Name: digit_to_text
Project Name: PyThaiNLP/pythainlp
Commit Name: 859a6ddb6abf4e9e7848be9160195a0ba080f13e
Time: 2019-09-30
Author: 6845502+abhabongse@users.noreply.github.com
File Name: pythainlp/util/digitconv.py
Class Name:
Method Name: arabic_digit_to_thai_digit
Project Name: PyThaiNLP/pythainlp
Commit Name: 859a6ddb6abf4e9e7848be9160195a0ba080f13e
Time: 2019-09-30
Author: 6845502+abhabongse@users.noreply.github.com
File Name: pythainlp/util/digitconv.py
Class Name:
Method Name: digit_to_text
Project Name: PyThaiNLP/pythainlp
Commit Name: 859a6ddb6abf4e9e7848be9160195a0ba080f13e
Time: 2019-09-30
Author: 6845502+abhabongse@users.noreply.github.com
File Name: pythainlp/util/digitconv.py
Class Name:
Method Name: thai_digit_to_arabic_digit