Skip to content

SMXM Mentions Extractor

When the mentions to be extracted are known by the user they can be specified in order to improve the performance of the system. Based on the SMXM linker, the SMXM mentions extractor uses the description of the mentions to give the model information about the mentions to be extracted. By using the descriptions, the SMXM model is able to understand the mention.

The SMXM mentions extractor will use the mentions specified in the zshot.PipelineConfig.

Bases: MentionsExtractor

SMXM Mentions Extractor

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