Skip to content

Instantly share code, notes, and snippets.

@xelibrion
Last active November 17, 2019 22:51
Show Gist options
  • Select an option

  • Save xelibrion/574078eafd59f28af45467bf0c078ca2 to your computer and use it in GitHub Desktop.

Select an option

Save xelibrion/574078eafd59f28af45467bf0c078ca2 to your computer and use it in GitHub Desktop.
Prodigy ner.batch-train
#!/usr/bin/env bash
set -e
TRAIN_DATASETS="re-tag-keyphrases-zoey,lyft-0-50-gold"
EVAL_DATASETS="re-tag-keyphrases-dmitry,lyft-50-100-gold"
FINAL_TRAIN="train-$(date +%s)"
FINAL_EVAL="eval-$(date +%s)"
MODEL_NAME="model-$(date +%s)"
prodigy db-merge $TRAIN_DATASETS $FINAL_TRAIN
prodigy db-merge $EVAL_DATASETS $FINAL_EVAL
prodigy ner.batch-train \
$FINAL_TRAIN en_vectors_web_lg \
-n 100 --batch-size 16 --unsegmented --no-missing \
-l KEYPHRASE \
-e $FINAL_EVAL -o $MODEL_NAME
prodigy drop $FINAL_TRAIN
prodigy drop $FINAL_EVAL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment