Attr

class ucca.textutil.Attr[source]

Bases: enum.Enum

Wrapper for spaCy Attr, determining order for saving in layer0.extra per token when as_array=True

Attributes Summary

DEP
ENT_IOB
ENT_TYPE
HEAD
LEMMA
ORTH
POS
PREFIX
SHAPE
SUFFIX
TAG
key String used in `extra’ dict of Terminals to store this attribute when as_array=False

Methods Summary

__call__(value[, vocab, as_array, lang]) Resolve numeric ID of attribute value to string (if as_array=False) or to int (if as_array=True)

Attributes Documentation

DEP = 6
ENT_IOB = 5
ENT_TYPE = 4
HEAD = 7
LEMMA = 1
ORTH = 0
POS = 3
PREFIX = 9
SHAPE = 8
SUFFIX = 10
TAG = 2
key

String used in `extra’ dict of Terminals to store this attribute when as_array=False

Methods Documentation

__call__(value, vocab=None, as_array=False, lang=None)[source]

Resolve numeric ID of attribute value to string (if as_array=False) or to int (if as_array=True)