ripose-jp / Memento

An mpv-based video player for studying Japanese
https://ripose-jp.github.io/Memento/
GNU General Public License v2.0
464 stars 21 forks source link

Term Marker for part of speech #233

Open Furshia opened 1 month ago

Furshia commented 1 month ago

Add a feature to know what kind of part of speech is the word, for example

subtitles: 彼は学校に走った Added to anki: 走った

{sentence} = 彼は学校に走った therefore {part-of-speech} = verb since 走った is a verb

ripose-jp commented 1 month ago

In dictionaries, parts of speech are stored as tags attached to definitions. Since each term has one or more definitions, having a marker that only picks out a single tag is not possible. Tags are entirely dictionary dependent as well, meaning there is no way to know what tags represent parts of speech and what tags don't. There is also no guarantee that a word doesn't occupy multiple parts of speech based on the definition. Regardless, this feature is kind of redundant assuming you're using {glossary} since it contains all that information. If you're using {glossary-brief} or {glossary-compact} you do give up this information, but that should be obvious.

Furshia commented 1 month ago

Would it be then possible to seperate those tags, e.g in glossary theres given tags on what kind of word it is given by the dictionary is it possible to only seperate those to become a term marker, and yes picking up multiple parts of speech at the same time. Therefore manually editing it in anki then.

Also how can I customize it btw? Im using {glossary-brief} but I don't really like how it exports as bulleted numbers (for me its a waste of space) would it be possible to export it as in sentence form seperated by commas e.g

power, struggle instead of

  1. power
  2. struggle
ripose-jp commented 1 month ago

It is possible to create a list of only tags. I think that has minimal utility though. Even with this tag, you admit you'd have to go in and manually edit all your cards. If you're going to go that far, you can just manually add the part of speech information without the creation of a new marker.

A decent middle ground might be making double click copy the text of a tag to clipboard. Then you can use the {clipboard} marker as your part of speech marker. What are your thoughts?

Also how can I customize it btw? Im using {glossary-brief} but I don't really like how it exports as bulleted numbers (for me its a waste of space) would it be possible to export it as in sentence form seperated by commas e.g

If I recall correctly, {glossary-compact} uses the | character instead of numbered lists.

Furshia commented 1 month ago

fair enough, I did came across something on parts of speech asking on anki discord some did said a code which uses machine learning but I do think that would be a whole ton of work for minimal use case. For the meantime I think clipboard marker would do just fine then.

still does numbered lists tho: {glossary-compact} : image

what i would want (to save space so no scrolling down if have too many meanings) image

ripose-jp commented 1 month ago

You could use {glossary-brief} and use some CSS to restyle lists so they appear inline separated by commas if you wanted to. I don't think this is a problem that needs to be solved in Memento.

Furshia commented 1 month ago

I guess so, thank you.

ripose-jp commented 3 weeks ago

I consider the double clicking tags thing to be an outstanding feature request, so I'm reopening this.