Its input are stem and answer, and output is candidate set of distractors. It is fine-tuned by
CLOTH dataset based on
bert-base-uncased model.
For more details, you can see our
paper or
GitHub.
1from transformers import BertTokenizer, BertForMaskedLM, pipeline
2
3tokenizer = BertTokenizer.from_pretrained("AndyChiang/cdgp-csg-bert-cloth")
4csg_model = BertForMaskedLM.from_pretrained("AndyChiang/cdgp-csg-bert-cloth")
1sent = "I feel [MASK] now. [SEP] happy"
2cs = unmasker(sent)
3print(cs)
This model is fine-tuned by
CLOTH dataset, which is a collection of nearly 100,000 cloze questions from middle school and high school English exams. The detail of CLOTH dataset is shown below.
The evaluations of this model as a Candidate Set Generator in CDGP is as follows: