CoolFace
Modelpublic

ritam-m/bert-base-company-ner

sourceHugging Facemitupdated 2mo agoView on Hugging Face
0likes47downloads
Model Card

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.

MetricEntity-levelToken-level
Precision0.440.70
Recall0.570.78
F10.500.74

Confusion matrix (token level):

Pred OPred COMPANY
True O76,524793
True COMPANY5181,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

python
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-ner` which trades precision for higher recall