Views
No views yet
rafmacalaba/GLiNER2@feat/main-fixes-clw) that feeds mean-pooled passage token embeddings
into count_pred instead of the schema [P] token. This is the first adapter
version where multi-mention recall is trained via a meaningful gradient.mention_name (verbatim from text)specificity_tag: named / descriptive / vaguetypology_tag: survey / census / database / administrative / indicator / geospatial / microdata / report / otheris_used: True / Falseusage_context: primary / supporting / backgroundfastino/gliner2-large-v1rafmacalaba/GLiNER2@feat/main-fixes-clw1from gliner2 import GLiNER2
2
3# Install the patched library first
4# pip install git+https://github.com/rafmacalaba/GLiNER2.git@feat/main-fixes-clw
5
6extractor = GLiNER2.from_pretrained("fastino/gliner2-large-v1")
7extractor.load_adapter("rafmacalaba/gliner2-datause-large-v15-transformed")
8
9schema = (
10 extractor.create_schema()
11 .structure("data_mention")
12 .field("mention_name", dtype="str")
13 .field("specificity_tag", dtype="str", choices=["named", "descriptive", "vague", "na"])
14 .field("typology_tag", dtype="str", choices=["survey", "census", "administrative",
15 "database", "indicator", "geospatial",
16 "microdata", "report", "other", "na"])
17 .field("is_used", dtype="str", choices=["True", "False", "na"])
18 .field("usage_context", dtype="str", choices=["primary", "supporting", "background", "na"])
19)
20
21result = extractor.extract(text, schema)