cabocha-python
This is a Python wrapper for CaboCha Japanese Dependency Structure Analyzer.
If you encounter “library not found” in install, set libraries directory to $CPLUS_INCLUDE_PATH or $CPATH and retry.
NOTE: It does not sopport Windows Python 64bit version.
Japanese document is available.
USAGE
>>> import CaboCha
>>> c = CaboCha.Parser()
>>> sentence = "太郎はこの本を二郎を見た女性に渡した。"
>>> print(c.parseToString(sentence))
太郎は-----------D
この-D |
本を---D |
二郎を-D |
見た-D |
女性に-D
渡した。
EOS
>>> tree = c.parse(sentence)
>>> print(tree.toString(CaboCha.FORMAT_TREE))
太郎は-----------D
この-D |
本を---D |
二郎を-D |
見た-D |
女性に-D
渡した。
EOS
>>> print(tree.toString(CaboCha.FORMAT_LATTICE))
* 0 6D 0/1 -2.457381
太郎 名詞,固有名詞,人名,名,*,*,太郎,タロウ,タロー
は 助詞,係助詞,*,*,*,*,は,ハ,ワ
* 1 2D 0/0 1.488413
この 連体詞,*,*,*,*,*,この,コノ,コノ
* 2 4D 0/1 0.091699
本 名詞,一般,*,*,*,*,本,ホン,ホン
を 助詞,格助詞,一般,*,*,*,を,ヲ,ヲ
* 3 4D 0/1 2.266072
二郎 名詞,固有名詞,人名,名,*,*,二郎,ジロウ,ジロー
を 助詞,格助詞,一般,*,*,*,を,ヲ,ヲ
* 4 5D 0/1 1.416783
見 動詞,自立,*,*,一段,連用形,見る,ミ,ミ
た 助動詞,*,*,*,特殊・タ,基本形,た,タ,タ
* 5 6D 0/1 -2.457381
女性 名詞,一般,*,*,*,*,女性,ジョセイ,ジョセイ
に 助詞,格助詞,一般,*,*,*,に,ニ,ニ
* 6 -1D 0/1 0.000000
渡し 動詞,自立,*,*,五段・サ行,連用形,渡す,ワタシ,ワタシ
た 助動詞,*,*,*,特殊・タ,基本形,た,タ,タ
。 記号,句点,*,*,*,*,。,。,。
EOS
License
CaboCha is copyrighted free software by Taku Kudo <taku@chasen.org> is released under any of the the LGPL (see the file LGPL) or the BSD License (see the file BSD).
CHANGES
0.69.3 (2022-08-17)
Avoid the compilation error: python-config file not found
Look up $CPLUS_INCLUDE_PATH and $CPATH
Update codes by swig 4.0.2
0.69.1 (2019-09-21)
Avoid the compilation error: ‘Python.h’ file not found
Update codes by swig 4.0.1
0.69 (2019-03-04)
First release to PyPI
Metadata
Release files for cabocha-python 0.69.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cabocha-python-0.69.3.tar.gz | 48.8 kB | Details |
Release files / cabocha-python-0.69.3.tar.gz
| Download URL | cabocha-python-0.69.3.tar.gz |
|---|---|
| Size | 48.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a65a5ff29f12a7e58afaebd915f11ef435d6e85129dfc7d5777dcbba128343c
|
|
BLAKE2b-256 checksum How to use checksums |
ec7b23e6b0ec114e6e56d86d1e221b3ba50ce2f00b970b83d31462f4197fa959
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|