Skip to content

Commit

Permalink
Fix frequency list not being saved due to incorrect order of slots
Browse files Browse the repository at this point in the history
Also some more documentation on tracking
  • Loading branch information
1over137 committed Mar 22, 2024
1 parent 12d5048 commit 83727d2
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Before opening the configuration panel, it is recommended to have Anki with Anki
VocabSieve is meant to have sane defaults, so that only minimal configuration is required to start using it, but a few things are still necessary. The configuration window will pop up when you first open it.

1. On the first tab, select a target language from the list.
2. Then, select a dictionary.
2. Then, select at least one dictionary in the Source tab by dragging an item from the right box to the left. Dictionaries can be removed by dragging it out of the left box.
> {: .highlight}
Use Google translation only if you have no other option. Translations are less detailed than dictionary definitions and may not provide the full range of meanings needed to understand the sentence.
3. You are recommended to leave lemmatization on as it is by default. It can greatly boost dictionary coverage for many languages. The setting is ignored if your language is not supported.
Expand Down
19 changes: 18 additions & 1 deletion docs/tracking.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,21 @@ By default, 100 points is needed for a non-cognate word to be classified as know

Using Anki data requires matching fields in each of your Anki note types. You should mark the field as "\<Ignored\>" if you do not wish to use the field or the note type as a whole.

Once you have set up vocabulary tracking, you can view a list of words VocabSieve thinks you know by going to Statistics -> Known words tab. After ensuring that you know almost all of the words listed in the text box, you can now use the features relying on vocab tracking, such as the book analyzer and auto imports from texts.
Once you have set up vocabulary tracking, you can view a list of words VocabSieve thinks you know by going to Statistics -> Known words tab. After ensuring that you know almost all of the words listed in the text box, you can now use the features relying on vocab tracking, such as the book analyzer and auto imports from texts.

## Importing content
To tell VocabSieve what you've read/watched/listened to, you need to import the files into the database by using Track -> Content Manager. You can import ebooks, text files, and subtitles this way.

## Manual marking

If you have a lemmatized frequency list, you can also manually mark words off the list using Track -> Mark words from frequency list.

![](https://i.postimg.cc/pdd8nLjt/20240321-212612.png)

Clicking on a word toggles its known status.

Green background: Known

Red border: Manually marked as unknown

Bolded score: Modifier is set (manually marked as known or unknown)
14 changes: 9 additions & 5 deletions vocabsieve/config/general_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from ..constants import langcodes
from .dictmanager import DictManager
from ..dictionary import getFreqlistsForLang, getDictsForLang, getAudioDictsForLang, langs_supported
from ..global_names import settings
from ..global_names import settings, logger

BOLD_STYLES = ["<disabled>", "Font weight", "Underscores"]

Expand Down Expand Up @@ -83,18 +83,22 @@ def load_freq_sources(self):
custom_dicts = json.loads(settings.value("custom_dicts", '[]'))
sources = getFreqlistsForLang(
langcodes.inverse[self.target_language.currentText()], custom_dicts)
logger.info(
"Loading frequency sources for language " +
self.target_language.currentText() +
": " +
str(sources))
self.freq_source.blockSignals(True)
self.freq_source.clear()
self.freq_source.addItem("<disabled>")
for item in sources:
self.freq_source.addItem(item)
self.freq_source.blockSignals(False)
self.freq_source.setCurrentText(
settings.value(
"freq_source", "<disabled>"))
self.freq_source.blockSignals(False)

def setupAutosave(self):
self.load_freq_sources()
self.register_config_handler(
self.target_language,
'target_language',
Expand All @@ -108,8 +112,6 @@ def setupAutosave(self):
'gtrans_lang',
'en',
code_translate=True)
self.register_config_handler(
self.freq_source, 'freq_source', '<disabled>')
self.register_config_handler(
self.web_preset,
'web_preset',
Expand All @@ -123,6 +125,8 @@ def setupAutosave(self):
self.gtrans_lang.currentTextChanged.connect(self.load_url)
self.load_url()
self.load_freq_sources()
self.register_config_handler(
self.freq_source, 'freq_source', '<disabled>')

def load_url(self):
lang = settings.value("target_language", "en")
Expand Down
2 changes: 1 addition & 1 deletion vocabsieve/ui/word_marking_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def setText(self, text: str):
WordRecord(
text,
self.langcode)),
self.parent_.waw) # type: ignore
self.waw) # type: ignore
self.threshold = settings.value(
"tracking/known_threshold",
100,
Expand Down

0 comments on commit 83727d2

Please sign in to comment.