Bunsetsu modules¶
BunsetsuList module¶
- class pyknp.knp.blist.BList(spec='', pattern='EOS', juman_format=0)[source]¶
Bases:
object
ある文に関する文節列を保持するオブジェクト
- Parameters
spec (str) – KNP出力
pattern (str) – KNP出力の終端記号
juman_format (JUMAN_FORMAT) – Jumanのlattice出力形式
- comment¶
KNP出力における、#から始まる行に書かれた文字列
- Type
str
- sid¶
文ID (KNP出力中のS-ID)
- Type
str
- __init__(spec='', pattern='EOS', juman_format=0)[source]¶
Initialize self. See help(type(self)) for accurate signature.
Bunsetsu module¶
- class pyknp.knp.bunsetsu.Bunsetsu(spec, bnst_id=0, juman_format=0)[source]¶
Bases:
object
KNP による係り受け解析の単位である文節の各種情報を保持するオブジェクト.
- Parameters
spec (str) – KNP出力のうち文節に該当する箇所の文字列
bnst_id (int) – 文節ID
juman_format (JUMAN_FORMAT) – Jumanのlattice出力形式
- bnst_id¶
文節ID
- Type
int
- midasi¶
見出し
- Type
str
- parent_id¶
親の文節ID
- Type
int
- children¶
子の文節オブジェクトのリスト
- Type
list
- repname¶
正規化代表表記 (normalized_repnameに同じ)
- Type
str
- normalized_repname¶
正規化代表表記
- Type
str
- head_repname¶
主辞代表表記
- Type
str
- head_prime_repname¶
主辞’代表表記
- Type
str
- fstring¶
feature情報
- Type
str