Skip to content

SMXM Linker

When there is no labelled data (i.e.: Zero-Shot approaches) the performance usually decreases due to the fact that the model doesn't really know what does the entity represent. To address this problem the SMXM model uses the description of the entities to give the model information about the entities.

By using the descriptions, the SMXM model is able to understand the entity. Although this approach is Zero-Shot, as it doesn't need to have seen the entities during training, the user still have to specify the descriptions of the entities.

This is an end-to-end model, so there is no need to use a mentions extractor before.

The SMXM linker will use the entities specified in the zshot.PipelineConfig.

Bases: Linker

SMXM linker

is_end2end: bool property

SMXM is end2end model

load_models()

Load SMXM model

predict(docs, batch_size=None)

Perform the entity prediction

Parameters:

Name Type Description Default
docs Iterator[Doc]

A list of spacy Document

required
batch_size Optional[Union[int, None]]

The batch size

None

Returns:

Type Description
List[List[Span]]

List Spans for each Document in docs