Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Japanese names in half-width kana to romaji. #105

Closed
justjuust opened this issue Oct 5, 2020 · 4 comments
Closed

Japanese names in half-width kana to romaji. #105

justjuust opened this issue Oct 5, 2020 · 4 comments

Comments

@justjuust
Copy link

Describe the bug
Hi,

I am trying to translate Japanese names to Romaji. I used the code written under. As you can see I get the same output for hira, kana, hepburn, kunrei and passport.
Is there anything wrong with my text or code?

To Reproduce

import pykakasi
kks = pykakasi.kakasi()
text='ソウゾクニン'
result = kks.convert(text)
print(result)


[{'orig': 'ソウゾクニン', 'hira': 'ソウゾクニン', 'kana': 'ソウゾクニン', 'hepburn': 'ソウゾクニン', 'kunrei': 'ソウゾクニン', 'passport': 'ソウゾクニン'}]
@miurahr
Copy link
Owner

miurahr commented Oct 5, 2020

Already discussed on #87 about super legacy half-width katakana characters.

@miurahr
Copy link
Owner

miurahr commented Oct 6, 2020

You can do

text='ソウゾクニン'
kks = pykakasi.kakasi()
result = kks.convert(jaconv.h2z(text))

@justjuust
Copy link
Author

Hi,

Thank you.
I used the following solution and it works:

kakasi = pykakasi.kakasi()
kakasi.setMode("K", "a")
conv = kakasi.getConverter()
result = conv.do(jaconv.h2z(text))

@miurahr miurahr changed the title Japanese names to romaji. Japanese names in Hankaku Kana to romaji. Oct 7, 2020
@miurahr miurahr pinned this issue Oct 7, 2020
@miurahr miurahr changed the title Japanese names in Hankaku Kana to romaji. Japanese names in half-width kana to romaji. Oct 7, 2020
@miurahr
Copy link
Owner

miurahr commented Oct 7, 2020

Does #106 satisfy your requirement?

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

No branches or pull requests

2 participants