Code for the Paper "Few-Shot Learning for Clinical Natural Language Processing Using Siamese Neural Networks: Algorithm Development and Validation Study"
Published at JMIR AI
gpt2.py
: GPT-2pt_snn.py
: Pre-trained Siamese Neural Network (PT-SNN)soe_snn.py
: Siamese Neural Network with Second-Order Embeddings (SOE-SNN)util.py
: A collection of utility functions
cd eval
./eval_pt_snn path_to_dataset.csv
./eval_soe_snn path_to_dataset.csv
./eval_gpt2.py
snn-for-fsl has been implemented by David Oniani.