Edit model card

You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

CRF-based Named Entity Recognition (NER) Model

Model Description

This model leverages a Conditional Random Field (CRF) for Named Entity Recognition (NER), trained to identify various entity types in text, including:

  • Geopolitical entities (GPE)
  • Locations (LOC)
  • Organizations (ORG)
  • Persons (PER)
  • Artifacts (ART)
  • Events (EVE)
  • Natural phenomena (NAT)

CRFs are highly effective in NER tasks due to their ability to capture contextual dependencies across sequential data. Unlike classifiers that evaluate tokens independently, CRFs consider the entire sentence structure, which improves accuracy in tag predictions (Lafferty et al., 2001).

Model Highlights

  • Conditional Random Field (CRF): CRFs are robust for structured prediction tasks like NER, handling word interdependencies and improving context-based tagging accuracy (Sutton & McCallum, 2011).
  • Accuracy & Precision: This model achieves a Weighted F1-Score of 97.1%, showing high performance in recognizing and classifying named entities across multiple categories.

Intended Use

  • Text Analysis: Suitable for use in NLP applications that require identifying named entities within text.
  • Applications: Designed for information extraction, document classification, and enhancing search relevance by understanding contextual relationships in text.

Limitations

While CRFs perform well on high-frequency entity categories, performance may vary for less frequent classes. Additionally, the model is sensitive to out-of-vocabulary (OOV) words, which may affect tagging accuracy in texts with unusual or novel terminology.

How to Use

  1. Setup: Ensure Python and necessary libraries are installed:

    pip install sklearn-crfsuite pandas scikit-learn
    
  2. Data Preprocessing: Prepare text by tokenizing sentences and structuring them according to the model’s input format, which includes sentence tokens and entity tags.

  3. Model Inference:

    • Tokenize input text.
    • Run predictions on each token to obtain NER tags.
    • Interpret the output, mapping each tag to its corresponding named entity.

Example Usage

To run the model, structure your input in the format of tokenized sentences and pass it to the model inference function. The model will output the NER tags for each token based on learned contextual relationships.

Evaluation Metrics

This model was evaluated using precision, recall, and F1-score across all entity classes, showing the following key performance metrics:

  • Weighted F1-Score: 97.1%
  • Precision and Recall: High scores across major entity categories, with particularly strong performance on frequent tags like GPE and LOC (Jurafsky & Martin, 2019).

Ethical Considerations

  • Bias: Trained on a specific dataset, this model’s performance may vary depending on the diversity and representativeness of the training data. It may exhibit bias towards entity categories more commonly present in the training set.
  • Sensitive Data: Ensure compliance with privacy regulations if processing personal or sensitive information.

Acknowledgments and Citations

This model was built using the sklearn-crfsuite library, which is widely recognized for its efficiency in handling CRF models in Python. Additionally, tokenization and feature extraction were done following standard NER methodologies outlined by Lafferty et al., 2001.

Key References

  1. Lafferty, J., McCallum, A., & Pereira, F. C. (2001). Conditional random fields: Probabilistic models for segmenting and labeling sequence data. Proceedings of the 18th International Conference on Machine Learning.
  2. Sutton, C., & McCallum, A. (2011). An Introduction to Conditional Random Fields for Relational Learning. Foundations and Trends® in Machine Learning, 4(4), 267-373.
  3. Jurafsky, D., & Martin, J. H. (2019). Speech and Language Processing (3rd ed.). Pearson.

If you use this model in your research or applications, please cite it as follows:

@model{your_name_2024,
  title={CRF-based Named Entity Recognition (NER) Model},
  author={Your Name},
  year={2024}
}
Downloads last month
0
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Model tree for SriramRokkam/NER_CRF_MODEL

Finetuned
(2)
this model

Dataset used to train SriramRokkam/NER_CRF_MODEL