ani-hovhannisyan / kanji-visualization

Kanji words visualization graph draws relational graph for kanjis of particular words in Japanese. Aim is to understand the relational graph of one kanji within different words and it's relations to all possible words.
MIT License
5 stars 1 forks source link

Reduce kana from drawing in kanji graph view. #64

Closed ani-hovhannisyan closed 2 years ago

ani-hovhannisyan commented 2 years ago

As discussed in #59 PR, remove all words from nodes which contain other than kanji, e.g. okurigana containing words, as it's not the case from current domain diagram. Use same method as SearchController does for checking one kanji input.

ani-hovhannisyan commented 2 years ago

Done, instead of previous okurigana words will be displayed only kanji words. OLD

{ "graphMatrix":{ "nodes":[ 
{ "id":"柳" },
{ "id":"き" },
{ "id":"ゅ" },
{ "id":"う" },
{ "id":"山" },
{ "id":"四" },
{ "id":"川", "isMain":"true" },
{ "id":"上" },
{ "id":"堀" },
{ "id":"河" },
{ "id":"下" },
{ "id":"江" },
{ "id":"戸" },
{ "id":"小" } ],
"links":[ { "source":"川", "target":"柳" },
{ "source":"川", "target":"き" },
{ "source":"き", "target":"ゅ" },
{ "source":"ゅ", "target":"う" },
{ "source":"山", "target":"川" },
{ "source":"四", "target":"川" },
{ "source":"川", "target":"上" },
{ "source":"堀", "target":"川" },
{ "source":"河", "target":"川" },
{ "source":"川", "target":"下" },
{ "source":"江", "target":"戸" },
{ "source":"戸", "target":"川" },
{ "source":"小", "target":"川" } ] },
"kanjiInfo":{ 
"onyomi":[ "セン" ],
"kunyomi":[ "かわ" ],
"meaning":[ "stream", "river", "river or three-stroke river radical (no. 47)" ] } }

NEW

{ "graphMatrix": 
{"nodes": [
{ "id": "柳" }, 
{ "id": "山" }, 
{ "id": "四" }, 
{ "id": "川", "isMain": "true" }, 
{ "id": "上" }, 
{ "id": "堀" }, 
{ "id": "河" }, 
{ "id": "下" }, 
{ "id": "江" }, 
{ "id": "戸" }, 
{ "id": "小" }],
 "links": [
{ "source": "川", "target": "柳" }, 
{ "source": "山", "target": "川" }, 
{ "source": "四", "target": "川" }, 
{ "source": "川", "target": "上" }, 
{ "source": "堀", "target": "川" }, 
{ "source": "河", "target": "川" }, 
{ "source": "川", "target": "下" }, 
{ "source": "江", "target": "戸" }, 
{ "source": "戸", "target": "川" }, 
{ "source": "小", "target": "川" }] },
"kanjiInfo": {
"onyomi": ["セン"],
"kunyomi": ["かわ"],
"meaning": ["stream", "river", "river or three-stroke river radical (no. 47)"] } }