Quick usage:
- Install
allennlp
(2.9.3) in a fresh virtual/conda environment (NB: we are testing with Python 3.9.x; there appears to be an installation issue with 3.10.x)- Or
pip install -r requirements.txt
- Or
- For a sentiment analysis classifying experiment:
- Run
sh get_classifying_data.sh
to download the sentiment analysis dataset and split it into train/val/test - Two options for running:
python run_classifying.py
allennlp train classifying_experiment.jsonnet -s /tmp/exp --include-package classifying
- Run
- For a semantic tagging experiment:
- Run
python get_tagging_data.py
to download the semantic tagging dataset and split it into train/val/test - Two options for running:
python run_tagging.py
allennlp train tagging_experiment.jsonnet -s /tmp/exp --include-package tagging
- Run
- To look at logs during training:
tensorboard --logdir /tmp/exp
(you can run tensorboard on a remote server and usessh
port forwarding to view the logs locally)
NB: the first time you run the experiments, the pre-trained models will be downloaded, but retrieved from local cache thereafter.