The paper can be found here
Automatic question generation for sentexces from passages in reading comprehension
The paper can be found here
Automatic question generation for sentexces from passages in reading comprehension
# This small script shows how to use AllenNLP Semantic Role Labeling (http://allennlp.org/) with SpaCy 2.0 (http://spacy.io) components and extensions | |
# Script installs allennlp default model | |
# Important: Install allennlp form source and replace the spacy requirement with spacy-nightly in the requirements.txt | |
# Developed for SpaCy 2.0.0a18 | |
from allennlp.commands import DEFAULT_MODELS | |
from allennlp.common.file_utils import cached_path | |
from allennlp.service.predictors import SemanticRoleLabelerPredictor | |
from allennlp.models.archival import load_archive |
import torch | |
import torch.nn as nn | |
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence | |
seqs = ['gigantic_string','tiny_str','medium_str'] | |
# make <pad> idx 0 | |
vocab = ['<pad>'] + sorted(set(''.join(seqs))) | |
# make model |
# Author: Kyle Kastner | |
# License: BSD 3-Clause | |
# See core implementations here http://geekyisawesome.blogspot.ca/2016/10/using-beam-search-to-generate-most.html | |
# Also includes a reduction of the post by Yoav Goldberg to a script | |
# markov_lm.py | |
# https://gist.github.com/yoavg/d76121dfde2618422139 | |
# These datasets can be a lot of fun... | |
# | |
# https://github.com/frnsys/texts |