Issue
I would like to know how i can get my python pandas dataframe rows attribute receiving for exemple a Korean word and convert to the phonetics, for example :
I'm receiving '코리아서버호스팅' but i want to have 'koliaseobeohoseuting' as an output.
I need to have it using pandas dataframe or other solution from Python.
I already tried to find in pandas dataframe to help, without success. There is any encode or decode that i should be using ?
Thank you!
Solution
For a library that Romanises the Korean alphabet, there are a few options. Here are a couple with examples:
korean-romanizer
https://github.com/osori/korean-romanizer/tree/master
from korean_romanizer.romanizer import Romanizer
r = Romanizer("코리아서버호스팅")
out = r.romanize()
print(out)
hangul-romanize
https://github.com/youknowone/hangul-romanize/tree/master
from hangul_romanize import Transliter
from hangul_romanize.rule import academic
transliter = Transliter(academic)
input_text = "코리아서버호스팅"
decoded_text = transliter.translit(input_text)
print(decoded_text)
You'll then need to iterate through your pandas dataframe, converting the column names and data in the table using one of the functions above.
Answered By - Mark
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.