Skip to content

Commit

Permalink
GH-61: Read line one by one.
Browse files Browse the repository at this point in the history
  • Loading branch information
tabergma committed Oct 4, 2018
1 parent cd8d2a3 commit b1929e1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions flair/data_fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,7 @@ def read_text_classification_file(path_to_file, max_tokens_per_doc=-1):
sentences = []

with open(path_to_file) as f:
lines = f.readlines()

for line in lines:
for line in f:
words = line.split()

labels = []
Expand Down

0 comments on commit b1929e1

Please sign in to comment.