mortii / anki-morphs

A MorphMan fork rebuilt from the ground up with a focus on simplicity, performance, and a codebase with minimal technical debt.
https://mortii.github.io/anki-morphs/
Mozilla Public License 2.0
58 stars 9 forks source link

Add option to have 'am-unknowns' field show lemma instead of inflection #149

Closed quietmansoath closed 7 months ago

quietmansoath commented 8 months ago

Describe the bug I'm not actually sure if this is a bug, but I'm uncertain as to why AM's native Japanese parser does not conjugate verbs into their infinitive forms.

I'm experimenting with transitioning away from kaegi's original Morphman add-on (using the MeCab parser) to this one, and when comparing the morph results, for verbs, AM's morphs do not conjugate the verb as expected.

To Reproduce Steps to reproduce the behavior:

  1. Parse any sentence with AM that has unknown verbs that, in its original context, are conjugated in some way using AM's native Japanese parser.

Expected behavior In the example in the screenshot, what I expected was たどりつく to show up as the unknown verb and be placed in the am-unknowns field, even though it is conjugated as たどりついた in its original context. However, the result I received was たどりつい

Screenshots

Screenshot 2024-02-04 195741

Desktop (please complete the following information):

mortii commented 8 months ago

I'll address this in the FAQ section of the guide since multiple people are raised this point.

These are my previous replies to this:

I don't like the idea of using the base form as a focus morph because it is lossy, i.e. you lose the context of how the morph is used in the card. That would be taking a step backwards compared to how it is done now, in my opinion.

Originally posted by @mortii in https://github.com/mortii/anki-morphs/issues/76#issuecomment-1836458680

'L' looks up the same derivative (inflected) version of the morph. I might be very familiar with やめる but I might not be familiar with やめ, so I want to only look at cards that have that version of the morph. If you were to look up every card that has a やめる derivative then that could be confusing and not very helpful in that scenario.

Originally posted by @mortii in https://github.com/mortii/anki-morphs/issues/76#issuecomment-1836059215

So basically, I think that having the focus morph show the dictionary form is inferior to showing the actual form used in the context.

quietmansoath commented 8 months ago

That makes sense.

So, is there any way to give a user the choice? "Prioritize inflected form" and "Prioritize non inflected form." While your opinion is valid, I don't share it, and it makes this add-on very confusing for me to use especially since it's done the later way in Morphman. If other users have brought this up before, I imagine this won't be the last time it comes up as AnkiMorphs becomes more popular.

mortii commented 8 months ago

So, is there any way to give a user the choice?

Hmm, that might be fairly easy to implement.

Just to clarify, you only want the morph in the 'am-unknowns' field to be displayed in it's dictionary form, you don't want the behavior of the L button to change, right?

Edit: Oh wait, I completely glossed over the 'prioritize' part of your comment. That is a completely different can of worms compared to just changing the visual representation of the morph in the 'am-unknowns' field.

quietmansoath commented 8 months ago

Oh, I think just changing the visual representation of the morph would be fine? Sorry if I'm being confusing, I'm trying to understand as well.

Using the original example, I think it would be good to allow a user to choose if they want to see the dictionary form (たどりつく) or the inflected form (たどりつい) of verbs and adjectives regardless of how they are conjugated in their original context. And yes, in the am-unknowns field. I guess "prioritize" suggests a hierarchy and that's not what I meant (and I can also see now how that would be really complicated!)

As long as the L button would still flag both of these options as the same "word", then I don't think it needs to change. Sorry, I'm still trying to understand the Japanese U and A chart so I might have misinterpreted.

mortii commented 8 months ago

Oh, I think just changing the visual representation of the morph would be fine? Sorry if I'm being confusing, I'm trying to understand as well.

np, np. I've been using the 'prioritizing' term in in the context of how cards are sorted, so I just think that it would be confusing to use that terminology for this. I can see that it's not what you meant though, so It's all good.

Using the original example, I think it would be good to allow a user to choose if they want to see the dictionary form (たどりつく) or the inflected form (たどりつい) of verbs and adjectives regardless of how they are conjugated in their original context.

I could see how that might be preferable: it could provide more context, especially if you already know the dictionary form.

As long as the L button would still flag both of these options as the same "word", then I don't think it needs to change. Sorry, I'm still trying to understand the Japanese U and A chart so I might have misinterpreted.

This actually works differently to how MorphMan does it. L on AnkiMorphs just show the cards that uses that same inflection, e.g., たどりつい, it does not show every card that has any inflection of たどりつく . When I want to find a card that has a better example of たどりつい, then I don't want to see cards that have たどり着かせられない, that is just noise at that point imo.

That is not to say that we can't add a feature like that, say for example L+Ctrl+Alt or something would show all cards that have derivative inflections. Would you want that?

quietmansoath commented 8 months ago

That is not to say that we can't add a feature like that, say for example L+Ctrl+Alt or something would show all cards that have derivative inflections. Would you want that?

Ah, I see. Yes, I very much would. I often will look through my cards for better or even alternative examples of the same morph, as I have a system within my card format that lets me draw attention to and manage words with multiple definitions. It would work best if I could search for たどりつく and find all sentences that have any inflection of it.

I'm not sure how difficult that would be to implement--hopefully not much so, but I would be grateful! Thank you for considering these changes.

mortii commented 8 months ago

I'm not sure how difficult that would be to implement--hopefully not much so, but I would be grateful! Thank you for considering these changes.

No problem, It should be pretty easy actually.

mortii commented 8 months ago

I'll split this issue into two separate ones, it makes it easier to keep track of progress.

mortii commented 7 months ago

Okay, I've added this option. Ideally it would be in the Extra Fields tab, but I couldn't find a way to do it that also didn't make my eyes bleed. It was truly hideous. I added it to the recalc tab instead, but maybe I'll move it later.

recalc-tab

I'll release it after I'm done with #151

github-actions[bot] commented 7 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.