extractor
module wittgenstein_rebel_extractor.extractor
Classes
-
RebelExtractor — Wraps HuggingFace seq2seq pipeline for local relation extraction using REBEL.
wittgenstein_rebel_extractor.extractor.RebelExtractor
class RebelExtractor(model_name: str = 'Babelscape/rebel-large', device: str = 'cpu')
Wraps HuggingFace seq2seq pipeline for local relation extraction using REBEL.
Methods
-
extract_relations — Extract structured relation triplets from text using REBEL.
wittgenstein_rebel_extractor.extractor.RebelExtractor.extract_relations
method RebelExtractor.extract_relations(text: str, max_length: int = 256, length_penalty: float = 0.1, num_beams: int = 3) → List[KGTriplet]
Extract structured relation triplets from text using REBEL.