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

Recognize 3つ 2つ etc the same way it recognizes 1つ #709

Closed
Tomalak opened this issue Aug 1, 2021 · 7 comments
Closed

Recognize 3つ 2つ etc the same way it recognizes 1つ #709

Tomalak opened this issue Aug 1, 2021 · 7 comments

Comments

@Tomalak
Copy link

Tomalak commented Aug 1, 2021

I'm aware 1つ is recognized because it has its own dictionary entry proper, but it would be nice to have at least the irregular つ counters (and maybe 日 too?) recognized as well, with any kind numerals (half--width, full-width, Kanji).

@Tomalak Tomalak changed the title Recognize 3つ 2tsu Recognize 3つ 2つ etc the same way ut recognizes 1つ Aug 1, 2021
@Tomalak Tomalak changed the title Recognize 3つ 2つ etc the same way ut recognizes 1つ Recognize 3つ 2つ etc the same way ut recognizes 1つ Aug 1, 2021
@Tomalak Tomalak changed the title Recognize 3つ 2つ etc the same way ut recognizes 1つ Recognize 3つ 2つ etc the same way it recognizes 1つ Aug 1, 2021
@birtles
Copy link
Member

birtles commented Aug 2, 2021

Sorry, I didn't quite follow the scope of the issue here. Is it to support half-width numerals followed by つ/日 where there are dictionary entries, i.e. recognize 2つ, 6つ? I think for kanji there are already dictionary entries for 三つ、八つ etc.

Or is it for handling even those without dictionary entries? e.g. 123つ? In which case what would you expect it to display?

(On an unrelated note, it would be neat if one day we could do this for all counters and also show the correct reading, e.g. showing 4分[よんぷん] = 4 minutes)

@Tomalak
Copy link
Author

Tomalak commented Aug 3, 2021

Is it to support half-width numerals followed by つ/日 where there are dictionary entries
Or is it for handling even those without dictionary entries?

Well... that's a good question. I didn't really mean a number reading generator, though. While this might be an option - arbitrary number readings could be generated pretty easily - I'm not sure how much worth it has.

However, if 一つ and 1つ, resolve, then 1つ should, too. If 14日 and 20日 resolve, 14日 and 20日 should, to.

I have cross-checked, and at least for つ there are entries from 1-9 and for 日 there are entries from 1-31, so simply resolving half-width numerals would be quite enough here.

Other things like 月 are regular enough to not need a reading hint, but they also all have entries, so why not include them.

Beyond that, things get flaky. 枚 only has dictionary entries up to 3, 千 is even missing a couple between 1 and 9, 台 only has 1, but all these read quite regular, so they are less of a concern.

I think for starters it wold be good to just resolve half-width numerals and link to the existing entries. A full-blown "counter- and numeral reading generator" seems a bit out of scope.

@birtles birtles closed this as completed in 4e3b6df Sep 8, 2021
@Tomalak
Copy link
Author

Tomalak commented Sep 8, 2021

Wow, from looking at the source changes, this was a lot more complex than I had imagined. Thank you!

@birtles
Copy link
Member

birtles commented Sep 9, 2021

Wow, from looking at the source changes, this was a lot more complex than I had imagined. Thank you!

Thanks! Unfortunately it looks like I messed it up leading to issue #749 which I've just now patched.

@Tomalak
Copy link
Author

Tomalak commented Sep 9, 2021

Luckily an easy fix. :)

@nicolasmaia
Copy link

I noticed this unfortunately doesn't quite work for 小1(cf. 小1)

@birtles
Copy link
Member

birtles commented Oct 26, 2023

I noticed this unfortunately doesn't quite work for 小1(cf. 小1)

Fixed in 7b73ccf (not yet released)

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

3 participants