class documentation

class POS(Enum):

View In Hierarchy

Universal POS tag set.

Class Method from_tag Construct a POS from a POS tag character.
Static Method compare_by_pos Compare POSes.
Constant ADJ Adjective
Constant ADV Adverb
Constant NOUN Noun
Constant VERB Verb
Property ordinal The ordinal property
Property tag Get the POS tag character.
Method __repr__ Undocumented
Method __str__ Undocumented
@classmethod
def from_tag(cls, tag):

Construct a POS from a POS tag character.

Parameters
tag:strThe POS tag character.
Returns
Optional[POS]The corresponding POS.
@staticmethod
def compare_by_pos(pos1, pos2):

Compare POSes.

Parameters
pos1:POSFirst POS.
pos2:POSSecond POS.
Returns
intCompare result.
ADJ: POS =

Adjective

Value
(0, 'a')
ADV: POS =

Adverb

Value
(1, 'r')
NOUN: POS =

Noun

Value
(2, 'n')
VERB: POS =

Verb

Value
(3, 'v')
@property
ordinal =

The ordinal property

@property
tag: Optional[str] =

Get the POS tag character.

def __repr__(self):

Undocumented

def __str__(self):

Undocumented