#!/usr/bin/python # -*- coding: utf-8 -*- import CaboCha # c = CaboCha.Parser(""); c = CaboCha.Parser() sentence = "太éã¯ãã®æ¬ãäºéãè¦ã女æ§ã«æ¸¡ããã" print c.parseToString(sentence) tree = c.parse(sentence) print tree.toString(CaboCha.FORMAT_TREE) print tree.toString(CaboCha.FORMAT_LATTICE) <PERSON>太é</PERSON>ã¯-----------D ãã®-D | æ¬ã---D | äºéã-D | è¦ã-D | 女æ§ã«-D 渡ããã EOS <PERSON>太é</PERSON>ã¯-----------D ãã®-D | æ¬ã
{{#tags}}- {{label}}
{{/tags}}