Multilingual Social-Media Named Entity Recognition

← Back to projects

Context: Machine Learning Engineer Intern · EnlightyAI · May–October 2025
Focus: Named Entity Recognition · Transformer fine-tuning · Model evaluation

I worked on a transformer-based Named Entity Recognition system for noisy social-media text, with a strong focus on data quality, reproducible experimentation, model comparison and span-level evaluation.

The project was not only a model-training task. Improving performance required coordinating annotation, refining the entity schema, cleaning the training data, benchmarking several transformer architectures and analysing where the system failed.

Project snapshot

MetricResult
Span-level micro-F10.44 → 0.75
Relative F1 improvement~70%
Annotated and validated data6,000 tweets
Language split5,000 Turkish · 1,000 English
Models benchmarked5 BERT / XLM-R variants
Final entity schema9 entity types
Annotation team8 people

The challenge

Named Entity Recognition on social-media text is substantially harder than on clean, formal text. Tweets contain spelling variation, abbreviations, inconsistent punctuation, informal language, brand and product references and ambiguous entity boundaries.

The initial system reached a 0.44 span-level micro-F1, leaving significant room for improvement. Rather than treating the model architecture as the only source of error, I worked across the full ML workflow:

  1. annotation quality,
  2. preprocessing,
  3. entity-schema design,
  4. model selection,
  5. fine-tuning,
  6. validation,
  7. error analysis.

Data and annotation

I coordinated an 8-person team working on the annotation and validation of 6,000 tweets, including 5,000 Turkish and 1,000 English samples.

A major part of the work was improving annotation consistency. I helped develop structured annotation guidelines and quality checks so that the training data better represented difficult social-media cases.

The annotation schema was expanded from earlier 3- and 7-entity configurations to 9 entity types, increasing coverage for concepts such as brands, products and social-media-specific language.

This was important because inconsistent or incomplete labels directly limited what the model could learn.

Model development

I benchmarked five transformer-based NER models from the BERT and XLM-R families using PyTorch, TensorFlow and Hugging Face Transformers.

The workflow included:

Among the evaluated architectures, BERTurk-SUNLP produced the strongest result for the target task.

Results

The final system improved span-level micro-F1 from 0.44 to 0.75.

That represents:

The gain came from improving the system as a whole rather than relying on model replacement alone. Better annotation quality, cleaner preprocessing, model benchmarking and systematic error analysis all contributed to the final result.

Reproducible ML workflow

To make experiments comparable, I built a reproducible workflow on AWS EC2 covering:

Raw annotated text
Preprocessing and validation
Token / entity alignment
Transformer fine-tuning
Model validation
Span-level evaluation
Prediction and error analysis

The workflow used Hugging Face, PyTorch, AWS EC2 and Git to keep model experiments, training changes and evaluation results consistent across multiple candidate architectures.

What I contributed

What this project demonstrates

This project is representative of how I approach applied machine learning: measure the system, inspect failure modes, improve the data as well as the model and keep experiments reproducible.

Core technologies: Python · PyTorch · Hugging Face Transformers · BERT · XLM-R · AWS EC2 · Git · NLP · Named Entity Recognition · Model Evaluation

← Back to projects