bert-base-NER β Company NER (Financial News)
A dslim/bert-base-NER model fine-tuned for Named Entity Recognition (NER) to detect company names in financial news articles. The base model was already pre-trained on the CoNLL-2003 NER benchmark, giving it strong NER task knowledge before domain-specific fine-tuning.
Model Details
- Base model:
dslim/bert-base-NER(110M params, BERT pre-trained on CoNLL-2003 NER) - Task: Token classification β company name detection using IOB tagging
- Language: English (financial domain)
- Label scheme:
O,B-COMPANY,I-COMPANY
Performance
Evaluated on a held-out test set of 167 articles.
| Metric | Entity-level | Token-level |
|---|---|---|
| Precision | 0.44 | 0.70 |
| Recall | 0.57 | 0.78 |
| F1 | 0.50 | 0.74 |
Confusion matrix (token level):
| Pred O | Pred COMPANY | |
|---|---|---|
| True O | 76,524 | 793 |
| True COMPANY | 518 | 1,818 |
This model has higher precision (0.70) β more conservative than the FinBERT variant, with fewer false positives. Prefer this model when false alarms are more costly than occasionally missing a company.
Training
- Dataset: 1,664 Indian financial news articles from MarketAux API, ground-truthed using MarketAux equity entity tags
- Split: 1,331 train / 166 val / 167 test
- Epochs: 8
- Batch size: 8
- Learning rate: 1e-5
- Weight decay: 0.01
- Hardware: NVIDIA RTX 3070
Usage
from transformers import pipeline
nlp = pipeline(
"ner",
model="ritam-m/bert-base-company-ner",
aggregation_strategy="first",
)
text = "HDFC Bank reported strong Q1 earnings, while Infosys maintained its FY27 guidance."
results = nlp(text)
for entity in results:
if entity["entity_group"] == "COMPANY":
print(entity["word"], entity["score"])
Limitations
- Ground truth derived from MarketAux API entity tags β not manually verified
- Trained primarily on Indian financial news; performance may vary on other markets
- Entity-level F1 of 0.50 reflects a first training run on ~1,300 examples; more data will improve results
- Compare with
ritam-m/finbert-company-nerwhich trades precision for higher recall
- Downloads last month
- 27
Model tree for ritam-m/bert-base-company-ner
Base model
dslim/bert-base-NER