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

A way to write ALL Morphs to field without affecting scheduler? #279

Open
Nayelianne opened this issue Dec 11, 2022 · 1 comment
Open

A way to write ALL Morphs to field without affecting scheduler? #279

Nayelianne opened this issue Dec 11, 2022 · 1 comment

Comments

@Nayelianne
Copy link

I'm new to MorphMan so apologies if I'm asking dumb questions, but is there a way to write all the found morphs of a card to a field (regardless of maturity)?
I know there's a browser button to view all the morphs but it'd be awesome if there were an option for that information to just get inserted into the card field instead (preferably without affecting the scheduler / without reordering cards).

The reason I ask is because I think it would be an awesome complement to this addon that scrapes weblio dictionary entries but requires a user to add the morphs of a sentence to a field first, and the way Morphman is capable of grabbing those morphs automatically was the first thing that crossed my mind to speed up that process when editing existing decks.

If anyone knows a way to achieve that and could point me in the right direction (whether through modifying some files or a separate add-on altogether) I'd really appreciate it.

@landonepps
Copy link
Collaborator

landonepps commented Jan 8, 2023

That's a good suggestion and I don't believe there's any way to tell MorphMan to add known morphs to a field on your cards.

If you want to hack it together you can hijack the MorphMan_Unknowns field for this purpose.
Replace this line in main.py

setField(mid, fs, field_unknowns, ', '.join(u.base for u in unknowns))

with

setField(mid, fs, field_unknowns, ', '.join(m.base for m in morphemes))

I think you'd likely want to filter based on part of speech to exclude particles and things like the past-tense た.
For instance 彼は交通事故に遭った parses to は, に, 彼, 交通事故, 遭う, た.

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

No branches or pull requests

2 participants