Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add_accents lỗi ! #15

Open
thusinh1969 opened this issue Jul 17, 2021 · 0 comments
Open

add_accents lỗi ! #15

thusinh1969 opened this issue Jul 17, 2021 · 0 comments

Comments

@thusinh1969
Copy link

Text: 'ghe an roma vai 120 - 27. gỗ tần bì tự nhiên bọc vải cao cấp. ghế ăn roma với kiểu dáng hiện đại tinh tế sẽ cho bạn sự thoải mái tuyệt đối khi ngồi nhờ thiết kế nệm đưa ra nâng đỡ phần lưng. sản phẩm sẽ thể hiện tính đồng nhất hơn khi kết hợp cùng bàn ăn roma và bộ sưu tập roma.'

text = ViTokenizer.tokenize(text)
text = ViUtils.add_accents(text)

--> ERROR:


KeyError Traceback (most recent call last)
in
----> 1 text = ViUtils.add_accents(text)
2 text

~\Anaconda3\lib\site-packages\pyvi\ViUtils.py in add_accents(s)
20
21 def add_accents(s):
---> 22 return ViDiac.add_accents(s)

~\Anaconda3\lib\site-packages\pyvi\ViDiac.py in add_accents(s)
201
202 def add_accents(s):
--> 203 return ViDiac.doit(s)

~\Anaconda3\lib\site-packages\pyvi\ViDiac.py in doit(str_sentence)
197 unichar = unichar.upper()
198 # print unichar
--> 199 output += ViDiac.reversed_mapping[unichar]
200 return output
201

KeyError: 'ỢJ'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant