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
55 stars 8 forks source link

'ignore names found by morphemizer' does nothing #41

Closed mortii closed 10 months ago

mortii commented 10 months ago

This option hasn't actually been implemented in any way.... I don't remember know if the respective option worked in morphman either. I assume there is a parameter that can be passed to the morphemizer somewhere that takes care of this.

Vilhelm-Ian commented 10 months ago

It worked in og morphman only if you used a custom dictionary like for japanese. There is no way to make it universal without Spacy. SPACY has an option to mark a word as person

mortii commented 10 months ago

This isn't a super big deal now that we have the names.txt option, so I don't know if I will bother fixing this for the mecab japanese morphemizer. Depends on how annoyed I get.

HQYang1979 commented 10 months ago

This isn't a super big deal now that we have the names.txt option, so I don't know if I will bother fixing this for the mecab japanese morphemizer. Depends on how annoyed I get.

I don't think the names.txt option works. It seems no action taken even if there are names in the name.txt

Vilhelm-Ian commented 10 months ago

@HQYang1979 It works. Two things you need to do.

  1. Enable the names.txt option
  2. After selceting a word as a name you should bury the card. Because it will work with Recalc once you restart anki. The reason why it's like that is because it uses memozation. Basically the function that reads names.txt only reads it once and stores the result for later.
  3. Probably the best thing to do is to paste a bunch of names in the file.
  4. Also @mortii working on the frequency analyzer I realized how fast is to generate a hash_map so I think we should remove the memozation from the functiotn so it works even if the user dosen'nt close anki
mortii commented 10 months ago

I don't think the names.txt option works. It seems no action taken even if there are names in the name.txt

@HQYang1979 Thanks for the feedback! Please create a new issue for this, I don't want your problem to get lost in the void when I fix and close this issue!

Also @mortii working on the frequency analyzer I realized how fast is to generate a hash_map so I think we should remove the memozation from the functiotn so it works even if the user dosen'nt close anki

@Vilhelm-Ian Please create a discussion thread for this, same reason as above^

mortii commented 10 months ago

morphman does this:

morpheme.isProperNoun()

def isProperNoun(self):
        return (self.subPos == '固有名詞' or self.pos == 'PROPN')

So fixing this is super easy. I'll do it shortly.

mortii commented 10 months ago

This removed 2k+ names from my 37K japanese cards, so this was actually a non-trivial improvement :raised_hands:

github-actions[bot] commented 6 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.