kyoto_reader.base_phrase module¶
-
class
kyoto_reader.base_phrase.BasePhrase(tag: pyknp.knp.tag.Tag, dmid_offset: int, dtid: int, sid: str, doc_id: str, parent: Optional[BasePhrase] = None, children: Optional[List[BasePhrase]] = None)[source]¶ Bases:
object文中に出現する基本句を表すクラス
-
tag¶ Tag object in pyknp.
Type: Tag
-
sid¶ Sentence ID.
Type: str
-
dtid¶ Document-wide tag ID.
Type: int
-
content_dmid¶ Document-wide morpheme ID of the content word in the base phrase.
Type: int
-
parent¶ Dependency parent.
Type: Optional[BasePhrase]
-
children¶ Dependency children.
Type: List[BasePhrase]
-
__init__(tag: pyknp.knp.tag.Tag, dmid_offset: int, dtid: int, sid: str, doc_id: str, parent: Optional[BasePhrase] = None, children: Optional[List[BasePhrase]] = None)[source]¶ Parameters: - tag (Tag) – Tag object in pyknp.
- dmid_offset (int) – Document-wide morpheme ID of the previous morpheme.
- dtid (int) – Document-wide tag ID.
- sid (str) – Sentence ID.
- doc_id (str) – Document ID.
- parent (Optional[BasePhrase]) – Dependency parent.
- children (List[BasePhrase]) – Dependency children.
-
core¶ A core expression without ancillary words.
-
dmid¶ Document-wide morpheme ID.
-
dmids¶ A list of document-wide morpheme IDs.
-
mrph2dmid¶ A mapping from morpheme to its document-wide ID.
-
mrphs¶ A list of morphemes.
-
surf¶ A surface expression.
-
tid¶ Tag ID in pyknp.
-