1# Run everything (analogy + bias + tagger training):2python pos_tagger.py --mode train_all
34# Run only analogy tests:5python pos_tagger.py --mode analogy
67# Run only bias check:8python pos_tagger.py --mode bias
Outputs: console logs + confusion_.png images.
MLP Hyperparameters
Parameter
Value
WINDOW
2 (5-word input window)
HIDDEN
[512, 256]
DROPOUT
0.3
ACTIVATION
ReLU
EPOCHS
20
BATCH_SIZE
512
LR
0.001 (Adam)
Freeze embeddings?
GloVe: frozen; SVD & CBOW: fine-tuned
Freeze justification: GloVe was trained on a massive external corpus; fine-tuning on
the small Brown corpus risks degrading its representations. SVD/CBOW embeddings were
trained on Brown so joint fine-tuning is beneficial.