HanziGraph icon indicating copy to clipboard operation
HanziGraph copied to clipboard

Question: filter graph to a subset of vocabulary

Open tilusnet opened this issue 3 months ago • 4 comments

Hi,

I love your tool - it's something I intended to build, but I'm mainly a backend/python dev and rubbish at UI.

I could use your tool out of the box if it had one feature: the ability to show the graphs on a restricted / limited set of vocabulary: that's the vocabulary I am incrementally learning! You see I'd like to explore the relationship between words and characters I have learnt already - and not new / unknown ones.

Could your tool implement this "filtering" feature? It would be really powerful.

Thanks a lot.

tilusnet avatar Sep 15 '25 21:09 tilusnet

thanks for the suggestion! It makes sense.

Some questions:

  • would you imagine uploading a file? Or perhaps importing from Anki? Or I could set it up to use the flashcards a user has created within HanziGraph.
  • what about disconnected graphs? e.g., if you had a few characters connected and others not? Do you envision searching for the words you know, or viewing the whole set in a single large graph?

mreichhoff avatar Sep 16 '25 00:09 mreichhoff

Thanks for the prompt answer and questions!

would you imagine uploading a file? Or perhaps importing from Anki? Or I could set it up to use the flashcards a user has created within HanziGraph.

All three suggestion make sense to me. Uploading a file is the most versatile feature, so I'd prefer that first.

what about disconnected graphs? e.g., if you had a few characters connected and others not? Do you envision searching for the words you know, or viewing the whole set in a single large graph?

My typical use case is searching particular words, so disjoint (partial) graphs are not of concern to me. In other words, seeing my entire vocabulary in a single graph is of no interest.

tilusnet avatar Sep 16 '25 13:09 tilusnet

As a side note, since I got a bit excited about your tool, I looked into its structure.

I figured that if I reduce the wordlist.json file, I can achieve the effect I wanted. Perhaps it helps someone else willing to get hands dirty a bit.

Example: I'm interested in activating some vocabulary around "习" and I have 4 words of interest, say 复习, 学习, 练习, 大学生. My simplified/wordlist.json file now contains the 4 words and their individual characters for the nodes, so 6 more, 10 in total:

[
    "复习",
    "学习",
    "练习",
    "大学生",
    "复",
    "习",
    "学",
    "练",
    "大",
    "生"
]

Here's the resulting reduced graph on my terms:

Image

Fabulous!

tilusnet avatar Sep 16 '25 13:09 tilusnet

Related #114

tilusnet avatar Oct 26 '25 09:10 tilusnet