ckipnlp.pipeline.coref module

This module provides co-reference detection pipeline.

class ckipnlp.pipeline.coref.CkipCorefDocument(*, ws=None, pos=None, parsed=None, coref=None)[source]

Bases: collections.abc.Mapping

The co-reference document.

Variables
class ckipnlp.pipeline.coref.CkipCorefPipeline(*, coref_chunker_kind=<DriverKind.BUILTIN: 1>, lazy=True, **kwargs)[source]

Bases: ckipnlp.pipeline.core.CkipPipeline

The co-reference detection pipeline.

Parameters
  • sentence_segmenter_kind (DriverKind) – The type of sentence segmenter.

  • word_segmenter_kind (DriverKind) – The type of word segmenter.

  • pos_tagger_kind (DriverKind) – The type of part-of-speech tagger.

  • ner_chunker_kind (DriverKind) – The type of named-entity recognition chunker.

  • sentence_parser_kind (DriverKind) – The type of sentence parser.

  • coref_chunker_kind (DriverKind) – The type of co-reference detection chunker.

Other Parameters

lazy (bool) – Lazy initialize the drivers.

get_coref(doc, corefdoc)[source]

Apply co-reference delectation.

Parameters
Returns

corefdoc.coref (CorefParagraph) – The co-reference results.

Note

This routine modify corefdoc inplace.