Oslovich/Topic-Classification-with-Base-BERT
Yahoo! Answers Topic Classification - Base BERT
A fine-tuned bert-base-uncased classifying a Yahoo! Answers-style question into one of 10 topics: Society & Culture, Science & Mathematics, Health, Education & Reference, Computers & Internet, Sports, Business & Finance, Entertainment, Family & Relationships, Politics & Government.
Test performance: 70.03% accuracy / 0.698 macro-F1 (10k official-test subsample) - the best of 11 models trained in the project notebook (TF-IDF/GloVe classical + six RNN variants + BERT). CSE440 (NLP II) lab project; the model was retrained with the notebook's exact winning configuration (lr=2e-5, batch=32, epochs=2, seed 42, 40k/5k/10k stratified subsample).
The prediction path replicates the notebook exactly:
question_title + ' ' + question_content- lemmatized preprocessing (lowercase, URL/entity strip, punctuation removal, NLTK English stopwords, WordNet lemmatization)
bert-base-uncasedtokenizer, max_len=96- softmax over the 10 classes
The "Model input (preprocessed)" box in the UI exists to show this parity between deployment and training. The fine-tuned weights ship in model/ (~418 MB, LFS).
