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

Getting radical of a character #45

Open
alt-romes opened this issue Aug 27, 2024 · 2 comments · May be fixed by #46
Open

Getting radical of a character #45

alt-romes opened this issue Aug 27, 2024 · 2 comments · May be fixed by #46

Comments

@alt-romes
Copy link
Contributor

I would like to know whether it is possible to get the radical (not the components) of a character.

In the documentation, you mention precisely the difference between radicals and components, but only show how to get the components.

From reading the API it looks like it's not possible to get the radical only? If there is a way, please do tell.

I'd be happy to improve the documentation wrt this.

Thanks!

@alt-romes
Copy link
Contributor Author

Indeed, there's a way to get the Kangxi radical of the character:

jam.lookup("蹴").chars[0].radical
> 足-foot[sc:7]
jam.lookup("蹴").chars[0].radical.radical
>  足
jam.lookup("蹴").chars[0].radical.meaning
> foot

This is great! Though, ideally, it would be reflected in the documentation. At least now it should be findable here...

@alt-romes
Copy link
Contributor Author

I'll submit a patch to the documentation

@alt-romes alt-romes reopened this Aug 29, 2024
alt-romes added a commit to alt-romes/jamdict that referenced this issue Aug 29, 2024
@alt-romes alt-romes linked a pull request Aug 29, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants
@alt-romes and others