fixed :bug: in gensen_local notebook
"\n",
"import os\n",
"import papermill as pm\n",
+ "import scrapbook as sb\n",
"\n",
"from utils_nlp.dataset.preprocess import to_lowercase, to_nltk_tokens\n",
"from utils_nlp.dataset import snli, preprocess\n",
- "from scenarios.sentence_similarity.gensen_wrapper import GenSenClassifier\n",
"from utils_nlp.models.pretrained_embeddings.glove import download_and_extract\n",
- "import scrapbook as sb\n",
- "\n",
+ "from utils_nlp.dataset import Split\n",
+ "from scenarios.sentence_similarity.gensen_wrapper import GenSenClassifier\n",
"\n",
"print(\"System version: {}\".format(sys.version))"
]
}
],
"source": [
- "train = snli.load_pandas_df(base_data_path, file_split=\"train\", nrows=nrows)\n",
- "dev = snli.load_pandas_df(base_data_path, file_split=\"dev\", nrows=nrows)\n",
- "test = snli.load_pandas_df(base_data_path, file_split=\"test\", nrows=nrows)\n",
+ "train = snli.load_pandas_df(base_data_path, file_split=Split.TRAIN, nrows=nrows)\n",
+ "dev = snli.load_pandas_df(base_data_path, file_split=Split.DEV, nrows=nrows)\n",
+ "test = snli.load_pandas_df(base_data_path, file_split=Split.TEST, nrows=nrows)\n",
"\n",
"train.head()"
]
