pub trait DynamicLabels: Model {
// Required method
fn extract_with_labels(
&self,
text: &str,
labels: &[&str],
language: Option<&str>,
) -> Result<Vec<Entity>>;
}Expand description
Trait for models that support dynamic/zero-shot entity type specification.
Models implementing this trait can extract entities of arbitrary types specified at inference time (e.g., GLiNER, UniversalNER), rather than being limited to a fixed set of pre-trained types.
Required Methods§
Implementors§
impl DynamicLabels for GLiNER2Onnx
Available on crate feature
onnx only.impl DynamicLabels for NuNER
Available on crate feature
onnx only.