I've often wanted to diagram Japanese sentences to better illustrate how the different parts fit together. With our current markdown setup, this is difficult at best.

I dimly recall having seen posts in the past where answerers used a tool like this, but my search-fu is failing me and I cannot find these at the moment -- if I'm even remembering them correctly.

Is anyone here familiar with any such tool?


There are a number of syntax tree generators out there. I'd recommend Miles Shang's Syntax Tree Generator as it's both easy to use and supports Japanese text.

You might have had trouble finding a tool because you were searching for "diagramming sentences", which often refers to the worse-than-useless Reed–Kellogg system which has been obsolete for over a century, but is nevertheless still taught to English-speaking children; note that I used the modern term "syntax tree" instead.


This might not be any help, but I use J.DepP to do this. It's a dependency parser and bunsetsu chunker that sits on top of morphological parsers like MeCab. So I can do something like this in my command-line:

echo 大量の文書を入力しなきゃならない | mecab -d /usr/local/lib/mecab/dic/unidic | jdepp | to_tree.py

and it produces:

  0:   大量の━━┓
  1:      文書を━━┓
  2:  入力しなきゃならないEOS

If you read the output from top to bottom you get back the original sentence, grouped into bunsetsu (chunks of morphemes), with the legs giving you the dependency information. Other examples from a Kamoshida Hajime novel I'm working through:

0:       瑛太が━━┓
1:     住むことになった━━┓
2:         マンションも、━━┓
3:  街の━━┓           ┃
4:    中心を━━┓        ┃
5:        走る━━┓     ┃
6:        道路沿いの━━┓  ┃
7:             斜面に━━┫
8:            建てられているEOS


0:   引っ越してくるまで━━┓
1:  こっちで━━┓     ┃
2:      暮らす━━┓  ┃
3:          家が━━┫
4:      どんな━━┓  ┃
5:        ところか━━┫
6:         瑛太は━━┫
7:         知らなかったEOS

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .