Instructions to use olivetti03/lobby-ner-spain-bert-v8-14 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- spaCy
How to use olivetti03/lobby-ner-spain-bert-v8-14 with spaCy:
!pip install https://huggingface.co/olivetti03/lobby-ner-spain-bert-v8-14/resolve/main/lobby-ner-spain-bert-v8-14-any-py3-none-any.whl # Using spacy.load(). import spacy nlp = spacy.load("lobby-ner-spain-bert-v8-14") # Importing as module. import lobby-ner-spain-bert-v8-14 nlp = lobby-ner-spain-bert-v8-14.load() - Notebooks
- Google Colab
- Kaggle
Lobby-NER Spain v8.14
Class-incremental NER model for detecting registered lobbying organisations in Spanish news.
Architecture
- Base: es_dep_news_trf (RoBERTa-BNE, 570GB Spanish pre-training)
- Class-incremental: retains PER, LOC, ORG, MISC and adds LOBBY
- 5 labels: LOBBY, PER, LOC, ORG, MISC
- Framework: spaCy 3.8+ with curated-transformers
Key Innovation
Unlike previous versions that replaced the NER pipe with only LOBBY, v8.14 keeps the base model entity types (PER, LOC, ORG, MISC) and adds LOBBY on top. This allows the model to distinguish:
- Antxon Alonso is PER (not LOBBY)
- Real Madrid is ORG (not LOBBY)
- Guardia Civil is ORG (not LOBBY)
- CEOE is LOBBY (registered organization)
Negative training examples are annotated with their correct entity type (PER, LOC, ORG, MISC) using es_core_news_lg, instead of empty entity lists.
Gazetteer (v5, 8,259 terms)
4 Spanish transparency registers (Catalan, CNMV, Madrid, Valencia). Cleaned: removed person names, ambiguous entries, added UGT/CCOO/Movistar/ANFAC/Banco Sabadell.
Training Data
- 227,018 training sentences
- LOBBY: 232,344 annotations (from gazetteer)
- PER: 98,400 (from es_core_news_lg)
- LOC: 123,800
- ORG: 109,464
- MISC: 92,365
- Document-level split 70/15/15 (zero leakage)
Evaluation (TEST, greedy, LOBBY only)
- Precision: 0.9929
- Recall: 0.9916
- F1: 0.9923
- False Positives: 355
Usage
import spacy nlp = spacy.load("olivetti03/lobby-ner-spain-bert-v8-14") doc = nlp("La CEOE y UGT negociaron con el Ministerio.") for ent in doc.ents: print(ent.text, ent.label_)
CEOE LOBBY, UGT LOBBY
License: MIT
- Downloads last month
- -