rhoknp.cohesion.argument module

class rhoknp.cohesion.argument.ArgumentType(value)[source]

Bases: Enum

項のタイプ.

CASE_EXPLICIT = 'C'

直接係り受けをもつ格要素(格は明示されている).

CASE_HIDDEN = 'N'

直接係り受けをもつ格要素(格は明示されていない).

OMISSION = 'O'

省略の指示対象.

DEMONSTRATIVE = 'D'

指示詞の指示対象.

EXOPHORA = 'E'

特殊(不特定:人など).

UNASSIGNED = 'U'

格要素の割り当てなし.

class rhoknp.cohesion.argument.BaseArgument(case: str, arg_type: ArgumentType)[source]

Bases: ABC

項の基底クラス.

Parameters:
  • case – 述語に対する格.

  • arg_type – 項のタイプ.

case: str

述語に対する格.

type: ArgumentType

項のタイプ.

optional: bool

修飾的な項かどうか.

property pas: Pas

述語項構造.

is_special() bool[source]

外界照応なら True.

class rhoknp.cohesion.argument.EndophoraArgument(case: str, base_phrase: BasePhrase, predicate: Predicate, arg_type: ArgumentType | None = None)[source]

Bases: BaseArgument

文脈中の基本句に対応する項を表すクラス.

Parameters:
  • case – 述語に対する格.

  • base_phrase – 項の核となる基本句.

  • arg_type – 項のタイプ.

base_phrase

項の核となる基本句.

property document: Document

項の核となる基本句が属する文書.

Raises:

AttributeError – 解析結果にアクセスできない場合.

property sentence: Sentence

項の核となる基本句が属する文.

property clause: Clause

項の核となる基本句が属する節.

Raises:

AttributeError – 解析結果にアクセスできない場合.

property phrase: Phrase

項の核となる基本句が属する文節.

class rhoknp.cohesion.argument.ExophoraArgument(case: str, exophora_referent: ExophoraReferent, eid: int)[source]

Bases: BaseArgument

外界照応の照応先に対応する項を表すクラス.

Parameters:
  • case – 述語に対する格.

  • exophora_referent – 外界照応における照応先(不特定:人など).

  • eid – エンティティID.

exophora_referent

外界照応における照応先.

eid

エンティティID.