GLiNER2
Safetensors
Basque
Spanish
English
extractor
named-entity-recognition
ner
basque
euskara
pii
privacy
information-extraction
Eval Results (legacy)
Instructions to use tknika/gliner2-PII-basque with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- GLiNER2
How to use tknika/gliner2-PII-basque with GLiNER2:
from gliner2 import AutoExtractor extractor = AutoExtractor.from_pretrained("tknika/gliner2-PII-basque") # Extract entities text = "Apple CEO Tim Cook announced iPhone 15 in Cupertino yesterday." result = extractor.extract_entities(text, ["company", "person", "product", "location"]) print(result) - Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -37,26 +37,26 @@ Training used **LoRA (r=16, alpha=32)** on the boundary/task heads, merged into
|
|
| 37 |
|
| 38 |
Evaluation on BasqueGLUE validation sets (500 sentences per split, exact match on type + mention string):
|
| 39 |
|
| 40 |
-
| Metric | Base (zero-shot) |
|
| 41 |
-
|---|---|---|
|
| 42 |
-
| nerc_id/val person name F1 | 0.664 |
|
| 43 |
-
| nerc_id/val micro F1 | 0.464 |
|
| 44 |
-
| nerc_od/val (Wikipedia) person name F1 | 0.721 | 0.
|
| 45 |
|
| 46 |
On a PII probe sentence combining several entity types:
|
| 47 |
|
| 48 |
-
| PII type | Base (zero-shot) |
|
| 49 |
-
|---|---|---|
|
| 50 |
-
| person name | β | β |
|
| 51 |
-
| email | β |
|
| 52 |
-
| phone number | β |
|
| 53 |
-
| bank account number | β | β |
|
| 54 |
-
| date of birth | β |
|
| 55 |
-
| zip code | β |
|
| 56 |
-
| national id | β |
|
| 57 |
-
| address | β |
|
| 58 |
-
|
| 59 |
-
|
| 60 |
|
| 61 |
## Usage
|
| 62 |
|
|
|
|
| 37 |
|
| 38 |
Evaluation on BasqueGLUE validation sets (500 sentences per split, exact match on type + mention string):
|
| 39 |
|
| 40 |
+
| Metric | Base (zero-shot) | **This model** |
|
| 41 |
+
|---|---|---|
|
| 42 |
+
| nerc_id/val person name F1 | 0.664 | **0.850** |
|
| 43 |
+
| nerc_id/val micro F1 | 0.464 | **0.787** |
|
| 44 |
+
| nerc_od/val (Wikipedia) person name F1 | 0.721 | 0.813 |
|
| 45 |
|
| 46 |
On a PII probe sentence combining several entity types:
|
| 47 |
|
| 48 |
+
| PII type | Base (zero-shot) | **This model** |
|
| 49 |
+
|---|---|---|
|
| 50 |
+
| person name | β | β |
|
| 51 |
+
| email | β | β |
|
| 52 |
+
| phone number | β | β |
|
| 53 |
+
| bank account number | β | β |
|
| 54 |
+
| date of birth | β | β |
|
| 55 |
+
| zip code | β | β |
|
| 56 |
+
| national id | β | **β** |
|
| 57 |
+
| address | β | **β** |
|
| 58 |
+
|
| 59 |
+
Fine-tuning a PII model on new-language NER data alone typically causes catastrophic forgetting of the original entity types. The LoRA + experience replay combination used here preserves the base model's PII detection behavior (and even improves on `national id` and `address`) while achieving strong Basque NER results.
|
| 60 |
|
| 61 |
## Usage
|
| 62 |
|