conllable

Conllable marks a class that can be output as a CoNLL formatted string. Conllable classes implement a conll method.

This is an abstract base class, and so no pure Conllable instance can be created. Instead this serves as an interface, marking types which have an expectation of supporting serialization. This consists of classes such as Conll, Sentence, and Token, which are unified by this interface.

API

Holds the Conllable interface, which is a marker interface to show that a class is a Conll object, such as a treebank, sentence, or token, and therefore has a conll method.

class pyconll.conllable.Conllable[source]

A Conllable mixin to indicate that the component can be converted into a CoNLL representation.

conll()[source]

Provides a conll representation of the component.

Returns:A string conll representation of the base component.
Raises:NotImplementedError – If the child class does not implement the method.