Knowledge Extractor¶
The knowledge extractor will perform at the same time the extraction and classification of named entities and the extraction of relations among them.
Currently, the are only two Knowledge Extractor available: KnowGL and ReLiK
Bases: ABC
Instantiate the Knowledge Extractor
Parameters:
Name | Type | Description | Default |
---|---|---|---|
device
|
Optional[Union[str, device]]
|
Device to be used for computation |
None
|
__hash__()
¶
Get hash representation of the component
extract_knowledge(docs, batch_size=None)
¶
from_disk(path, exclude=())
classmethod
¶
Load component from disk
load_models()
¶
Load the model
Returns:
Type | Description |
---|---|
|
parse_triples(preds)
¶
predict(docs, batch_size=None)
abstractmethod
¶
set_device(device)
¶
to_disk(path)
¶
Save component into disk