Skip to main content

Crate gliner2

Crate gliner2 

Source

Re-exports§

pub use config::ExtractorConfig;
pub use engine::Gliner2Engine;
pub use backends::candle::CandleExtractor;
pub use decode::Entity;
pub use extract::BatchSchemaMode;
pub use extract::ExtractOptions;
pub use extract::ExtractionOutput;
pub use extract::LabelConfidence;
pub use extract::TaskValue;
pub use extract::batch_extract;
pub use extract::batch_extract_streaming;
pub use extract::extract_from_preprocessed;
pub use extract::extract_with_schema;
pub use preprocess::PreprocessedBatch;
pub use preprocess::PreprocessedInput;
pub use preprocess::TaskType;
pub use preprocess::collate_preprocessed;
pub use processor::SchemaTransformer;
pub use schema::ClassificationLabelsInput;
pub use schema::ClassificationTaskInfo;
pub use schema::EntityTypeInfo;
pub use schema::EntityTypesInput;
pub use schema::ExtractionMetadata;
pub use schema::ExtractionSchema;
pub use schema::FieldSpecSource;
pub use schema::ParsedFieldSpec;
pub use schema::RegexMatchMode;
pub use schema::RegexValidator;
pub use schema::RelationTypeInfo;
pub use schema::RelationTypesInput;
pub use schema::Schema;
pub use schema::SchemaDocument;
pub use schema::SchemaInfo;
pub use schema::StructureBuilder;
pub use schema::StructureFieldInfo;
pub use schema::StructureInfo;
pub use schema::ValueDtype;
pub use schema::create_schema;
pub use schema::infer_metadata_from_schema;
pub use schema::parse_field_spec;

Modules§

backends
config
decode
engine
Backend abstraction for tensor inference (Gliner2Engine). Enable candle (default) and/or tch for concrete backends.
extract
Multi-task extraction and format_results aligned with gliner2.inference.engine.
preprocess
Multi-task input formatting aligned with gliner2.processor.SchemaTransformer (inference).
processor
schema
Python-aligned Schema builder and extraction metadata (gliner2.inference.engine.Schema).
setup
span_utils
Shared CPU utilities for span index generation, used by both candle and tch backends.

Structs§

IndexMap
A hash table where the iteration order of the key-value pairs is independent of the hash values of the keys.