mortii/anki-morphs

name.txt w/ Spaces

Closed this issue · 5 comments

Version ⁨24.04.1 (ccd9ca1a)⁩
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1

AnkiMorphs: Languages w/ Spaces

Sometimes the words are in names.txt they are processed incorrectly.

Снимок экрана 2024-06-05 195522

&gt;&gt; Darwin: A map?<br>&gt;&gt; Gumball: [ Laughing ] <br>[ Sighs ]

&gt;&gt; D<span morph-status="known">a</span>rwin: <span morph-status="known">A</span> <span morph-status="unknown">map</span>?<br>&gt;&gt; Gumb<span morph-status="known">a</span>ll: [ Laughing ] <br>[ Sighs ]

config:

{
"filters": [
{
"extra_highlighted": true,
"extra_score": true,
"extra_unknowns": true,
"extra_unknowns_count": true,
"field": "Expression",
"modify": true,
"morph_priority": "Collection frequency",
"morphemizer_description": "AnkiMorphs: Language w/ Spaces",
"note_type": "Morphsmovies2anki - subs2srs (video)",
"read": true,
"tags": {
"exclude": [],
"include": []
}
},
{
"extra_highlighted": true,
"extra_score": true,
"extra_unknowns": true,
"extra_unknowns_count": true,
"field": "English (US)",
"modify": true,
"morph_priority": "Collection frequency",
"morphemizer_description": "AnkiMorphs: Language w/ Spaces",
"note_type": "Glossika Russian - English (US)",
"read": true,
"tags": {
"exclude": [],
"include": []
}
},
{
"extra_highlighted": true,
"extra_score": true,
"extra_unknowns": true,
"extra_unknowns_count": true,
"field": "English",
"modify": true,
"morph_priority": "Collection frequency",
"morphemizer_description": "AnkiMorphs: Language w/ Spaces",
"note_type": "Speakly",
"read": true,
"tags": {
"exclude": [],
"include": []
}
},
{
"extra_highlighted": true,
"extra_score": true,
"extra_unknowns": true,
"extra_unknowns_count": true,
"field": "English 1",
"modify": true,
"morph_priority": "Collection frequency",
"morphemizer_description": "AnkiMorphs: Language w/ Spaces",
"note_type": "Tatoeba Russian-English",
"read": true,
"tags": {
"exclude": [],
"include": []
}
},
{
"extra_highlighted": false,
"extra_score": false,
"extra_unknowns": false,
"extra_unknowns_count": false,
"field": "Expression",
"modify": false,
"morph_priority": "Collection frequency",
"morphemizer_description": "AnkiMorphs: Language w/ Spaces",
"note_type": "movies2anki - subs2srs (video)",
"read": false,
"tags": {
"exclude": [],
"include": []
}
}
],
"preprocess_ignore_bracket_contents": true,
"preprocess_ignore_names_morphemizer": true,
"preprocess_ignore_names_textfile": true,
"preprocess_ignore_round_bracket_contents": true,
"preprocess_ignore_slim_round_bracket_contents": false,
"preprocess_ignore_suspended_cards_content": false,
"recalc_due_offset": 50000,
"recalc_interval_for_known": 99,
"recalc_move_known_new_cards_to_the_end": false,
"recalc_number_of_morphs_to_offset": 999,
"recalc_offset_new_cards": false,
"recalc_on_sync": false,
"recalc_read_known_morphs_folder": true,
"recalc_suspend_known_new_cards": false,
"recalc_toolbar_stats_use_known": false,
"recalc_toolbar_stats_use_seen": true,
"recalc_unknowns_field_shows_inflections": false,
"recalc_unknowns_field_shows_lemmas": true,
"shortcut_browse_all_same_unknown": "Shift+L",
"shortcut_browse_ready_same_unknown": "L",
"shortcut_browse_ready_same_unknown_lemma": "Ctrl+Shift+L",
"shortcut_frequency_file_generator": "Ctrl+Shift+F",
"shortcut_generators": "Ctrl+Shift+G",
"shortcut_known_morphs_exporter": "Ctrl+Shift+E",
"shortcut_learn_now": "Ctrl+Alt+N",
"shortcut_readability_report_generator": "Ctrl+Shift+'",
"shortcut_recalc": "Ctrl+M",
"shortcut_set_known_and_skip": "K",
"shortcut_settings": "Ctrl+O",
"shortcut_view_morphemes": "Ctrl+Alt+V",
"skip_only_known_morphs_cards": true,
"skip_show_num_of_skipped_cards": true,
"skip_unknown_morph_seen_today_cards": true,
"tag_known_automatically": "am-known-automatically",
"tag_known_manually": "am-known-manually",
"tag_learn_card_now": "am-learn-card-now",
"tag_not_ready": "am-not-ready",
"tag_ready": "am-ready"
}

Taking this opportunity, I leave the .srt file from which the generator pops up an error.
123.zip

I also take this opportunity to ask what should I change in the config to remove keyboard shortcuts? They conflict with other addons.
"shortcut_browse_ready_same_unknown_lemma": "Ctrl+Shift+L",

image

That is very strange, I'll look into it.

Taking this opportunity, I leave the .srt file from which the generator pops up an error. 123.zip

The files must have utf-8 encoding, see #232

I also take this opportunity to ask what should I change in the config to remove keyboard shortcuts? They conflict with other addons.

I haven't thought about that before... There should be an option to completely disable the shortcuts. In the meantime you can maybe just give them a weird shortcut you never use, e.g. Ctrl + Del + Insert.

image

That is very strange, I'll look into it.

The names are actually correctly removed, this is just a problem with the highlighting, I'll see if I can fix it.

EDIT:
Since the morphs in names.txt are removed before the the highlighting takes place, it makes them prone to false-positive highlighting. Fixing this is probably very costly and time consuming, so for now I'll just add it a known problem in the guide.

Fixing this issue is quite complex and, given its rarity, I believe it's best to leave it as a known problem. My apologies 🙏

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.