pimlico.utils.pos module

exception pimlico.utils.pos.NonPTBTagError[source]

Bases: exceptions.Exception

pimlico.utils.pos.pos_tag_to_ptb(tag)[source]

see :doc:pos_pos_tags_to_ptb

pimlico.utils.pos.pos_tags_to_ptb(tags)[source]

Takes a list of POS tags and checks they’re all in the PTB tagset. If they’re not, tries mapping them according to CCGBank’s special version of the tagset. If that doesn’t work, raises a NonPTBTagError.