Skip to content

edit_tree_lemmatizer

DEFAULT_EDIT_TREE_LEMMATIZER_MODEL module-attribute #

DEFAULT_EDIT_TREE_LEMMATIZER_MODEL = from_str(default_model_config)['model']

TOP_K_GUARDRAIL module-attribute #

TOP_K_GUARDRAIL = 20

default_model_config module-attribute #

default_model_config = '\n[model]\n@architectures = "spacy.Tagger.v2"\n\n[model.tok2vec]\n@architectures = "spacy.HashEmbedCNN.v2"\npretrained_vectors = null\nwidth = 96\ndepth = 4\nembed_size = 2000\nwindow_size = 1\nmaxout_pieces = 3\nsubword_features = true\n'

EditTreeLemmatizer #

Bases: TrainablePipe

Lemmatizer that lemmatizes each word using a predicted edit tree.

backoff instance-attribute #

backoff = backoff

cfg instance-attribute #

cfg = {'labels': []}

hide_labels property #

hide_labels

label_data property #

label_data

labels property #

labels

Returns the labels currently added to the component.

min_tree_freq instance-attribute #

min_tree_freq = min_tree_freq

model instance-attribute #

model = model

name instance-attribute #

name = name

numpy_ops instance-attribute #

numpy_ops = NumpyOps()

overwrite instance-attribute #

overwrite = overwrite

overwrite_labels instance-attribute #

overwrite_labels = overwrite_labels

scorer instance-attribute #

scorer = scorer

top_k instance-attribute #

top_k = top_k

tree2label instance-attribute #

tree2label = {}

trees instance-attribute #

trees = EditTrees(strings)

vocab instance-attribute #

vocab = vocab

from_bytes #

from_bytes(bytes_data, *, exclude=tuple())

from_disk #

from_disk(path, exclude=tuple())

get_loss #

get_loss(examples, scores)

initialize #

initialize(get_examples, *, nlp=None, labels=None)

predict #

predict(docs)

set_annotations #

set_annotations(docs, batch_tree_ids)

to_bytes #

to_bytes(*, exclude=tuple())

to_disk #

to_disk(path, exclude=tuple())

debug #

debug(*args)

make_edit_tree_lemmatizer #

make_edit_tree_lemmatizer(nlp, name, model, backoff, min_tree_freq, overwrite, top_k, overwrite_labels, scorer)

Construct an EditTreeLemmatizer component.