AI · NLP · TEXT CLASSIFICATION

IndoBERT News Classification

Fine-tuned IndoBERT for Indonesian football and sports news classification across 2,276 articles and five classes.

An Indonesian NLP classification workflow that transforms sports-news text into relevant football-league categories using a fine-tuned transformer model.

ROLEAI / NLP Developer
RESPONSIBILITIESScraping · Sastrawi Normalization · Fine-Tuning
TECH STACKIndoBERT · PyTorch · HuggingFace · Sastrawi
DATASET & TASK2,276 Articles · 5 Categories
Indonesian News → Tokenization → IndoBERT → ClassificationCUDA READY
INDONESIAN NEWS

“Persija menghadapi lawan…”

“Manchester United menang…”

raw news fragments
INDOBERTindobenchmark / indobert-base-p1
contextual token embeddings
5 CLASSIFICATIONS
Liga InggrisLiga ItaliaLiga SpanyolLiga IndonesiaNon-Sepak Bola
01 / PROJECT OVERVIEW

What I built.

I fine-tuned IndoBERT to automatically classify Indonesian sports news into Liga Inggris, Liga Italia, Liga Spanyol, Liga Indonesia, and Non-Sepak Bola.

The workflow covers collection, cleaning, Indonesian-language preprocessing, transformer fine-tuning, and evaluation of the resulting classifications.

01NEWS ARTICLESource text02TEXT CLEANINGNormalize text03NLP PREPROCESSINGIndonesian language04TOKENIZATIONModel-ready input05INDOBERTContext-aware model06CLASSIFICATIONFive categories
02 / MY ROLE

AI / NLP
Developer.

My contribution focused on the technical work behind the model, from source collection to interpreting classification results.

01Data collection & web scraping02Dataset preparation & cleaning03Exploratory data analysis04Indonesian NLP preprocessing05IndoBERT implementation & fine-tuning06Model evaluation & result interpretation
03 / DATASET

2,276 articles across five classes.

Sources were collected from Detik, Kompas, and Liputan6, with URL-based labeling and no duplicate articles found.

2,276ARTICLES
3MEDIA SOURCES
5CLASSIFICATION CLASSES
DetikKompasLiputan6
Liga Indonesia367 articles
Liga Inggris376 articles
Liga Italia386 articles
Liga Spanyol386 articles
Non-Sepak Bola761 articles
04 / INDONESIAN NLP PIPELINE

From raw articles to prepared tokens.

RAW ARTICLE

“Persija Jakarta akan menghadapi lawan pada pertandingan berikutnya…”

persija jakarta hadap lawan tanding

LOWERCASEREGEX CLEANINGSASTRAWI STEMMINGSTOPWORD REMOVALTOKENIZATIONBERT INPUT
01SCRAPErequests · BeautifulSoup · trafilatura
02CLEANlowercase · regex · duplicate checks
03NORMALIZESastrawi stemming · Indonesian stopwords
04TOKENIZEtruncation · padding · tokenization
05FINE-TUNEIndoBERT on GPU / CUDA
05 / MODEL ARCHITECTURE

Context-aware Indonesian text classification.

The implementation uses indobenchmark/indobert-base-p1 with a dropout and linear classification head, trained using PyTorch and CrossEntropyLoss.

Model · indobenchmark/indobert-base-p1Framework · PyTorchLoss · CrossEntropyLossOptimizer · AdamCompute · CUDA
INPUT TEXTINDOBERTCONTEXTUAL REPRESENTATIONDROPOUT + LINEAR HEAD5 CLASSES
06 / EVALUATION

Measured with classification methodology.

Evaluation uses accuracy, precision, recall, F1-score, and a confusion matrix. Exact performance figures are intentionally not shown here because they are not included in the available project record.

AccuracyPrecisionRecallF1-score
CONFUSION MATRIX
L. INGL. ITAL. SPAL. INDNON
07 / WHAT I LEARNED

The context behind classification matters.

01

Class distribution needs consideration during training.

02

Indonesian-specific preprocessing materially affects text quality.

03

Football leagues share semantically similar terminology.

04

Different media sources introduce stylistic variation.

05

Contextual transformer representations are valuable for Indonesian text.

TECH STACK
PythonPyTorchHuggingFace TransformersIndoBERTSastrawiNLTKPandasScikit-learnBeautifulSouptrafilaturaCUDA

Explore the IndoBERT Project Repository

View the collection, Indonesian NLP preprocessing, PyTorch fine-tuning, and evaluation implementation.