From 68d6b1c8293087b4c5d1ed882a9f6d97da45432c Mon Sep 17 00:00:00 2001 From: Piotr Czapla Date: Mon, 10 Jun 2019 20:31:04 +0200 Subject: [PATCH] fix bug in the hack for poleval reddit --- ulmfit/pretrain_lm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ulmfit/pretrain_lm.py b/ulmfit/pretrain_lm.py index 6fbecf1..07da1ce 100644 --- a/ulmfit/pretrain_lm.py +++ b/ulmfit/pretrain_lm.py @@ -41,7 +41,7 @@ def istitle(line): return len(re.findall(r'^ ?= [^=]* = ?$', line)) != 0 def read_wiki_articles(filename): - if "reddit" in filename: # Temporary hack to handle poleval reddit dataset + if "reddit" in str(filename): # Temporary hack to handle poleval reddit dataset return pd.read_csv(filename, header=None, names=["texts"]).fillna("") articles = []