FooSoft / yomichan

Japanese pop-up dictionary extension for Chrome and Firefox.
https://foosoft.net/projects/yomichan
Other
1.06k stars 222 forks source link

Feature request for a counter that tells you a count of how many times you have looked up a word #285

Open Aakasan opened 4 years ago

Aakasan commented 4 years ago

I tend to add rare vocab way too frequently, so I have made a rule to only add a word to Anki if I see it the 2nd time.

However, I can easily forget that- I have probably looked up the same word 3-6 times. It would be useful if there was a count (similar to innocent corpus) for how many times you look up a certain word

toasted-nutbread commented 4 years ago

A potential issue with this is determining when to increment this counter and for which words. Since it's easily possible to scan the same text multiple times in a short time frame, there would have to be some sort of time limit. This would then cause issues when scanning a word found at two text locations within that same short time frame.

The larger issue would then be how to automatically determine which word of the multiple selected words is the "expected" word. Potentially the only way to fully resolve this is to just have some sort of manual method of adding annotations to terms/kanji, be it notes, counter, star markers, and so on.

oudajosefu commented 4 years ago

The larger issue would then be how to automatically determine which word of the multiple selected words is the "expected" word.

I don't understand what you mean by this, could you please elaborate.

For the first potential issue, I think it would be best to increment the count with reference to the sentence, time shouldn't be taken into account here. For example, if word A is found in sentence A then count++, if word A is found in sentence B then count++. If word A is found in sentence A again (due to another scan), keep count the same.

toasted-nutbread commented 4 years ago

I don't understand what you mean by this, could you please elaborate.

Say you are scanning a sentence and scan across のビル. This is intended to be の (particle) + ビル (building), but the first result is 延びる. This is not the intended word and should likely not count towards something that should be incremented, but there is no way for Yomichan to automatically know this. Same concept can apply to multi-word phrases in which the first word of the phrase is the relevant term, as well as words with multiple dictionary entries. The longest match is not necessarily the one we care about.

For the first potential issue, I think it would be best to increment the count with reference to the sentence

This would require storing sentences either in the database or in a local cache variable, both of which present issues. Storing only one sentence makes it easy to scan back and forth between two sentences with the same word, incrementing the word count each time despite the fact that there are only two unique sentences.

Storing the most recent sentence for each word would already pose an issue with storage space usage. Increasing the number of previous sentences would further compound this issue.

Overall, I don't think it's possible to robustly make Yomichan smart enough to know what the user wants to qualify as a unique term, and how frequently it should be updated. One person may want it updated per each sentence, but another person may want it updated only when the word has been encountered after a (potentially variable) time period. For example, one may read for an hour and want to increment the relevant words only once. Then come back later that day, or the next day, and increment the words again.

For these reasons, my opinion is that the best method to implement counters would involve user interaction. At minimum, it would be the first step.

toasted-nutbread commented 4 years ago

Related: #93

therealgrumpythomas commented 1 year ago

I'm interested in the "lookup history" page as mentioned in #93. I understand that it's challenging for yomichan to determine when to increment the counter. Could this feature be implemented if incrementing the counter does require user interaction? Maybe a button next to each definition in the pop-up

Chronopolize commented 1 year ago

Add a time delay, only "count" something as looked up if it was hovered for at least 1 second (adjustable). Lookups of the same word within X minutes don't count.