pub trait RelationCapable: Model {
// Required method
fn extract_with_relations(
&self,
text: &str,
language: Option<&str>,
) -> Result<(Vec<Entity>, Vec<Relation>)>;
}Expand description
Trait for models that can extract relations between entities.
Models implementing this trait can jointly extract entities and their relationships, producing (head, relation_type, tail) triples.
Required Methods§
Implementors§
impl RelationCapable for GLiNER2Onnx
Available on crate feature
onnx only.