Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,17 @@
import torch
import sys
import csv
csv.field_size_limit(sys.maxsize)
maxInt = sys.maxsize

while True:
# decrease the maxInt value by factor 10
# as long as the OverflowError occurs.

try:
csv.field_size_limit(maxInt)
break
except OverflowError:
maxInt = int(maxInt/10)
from nltk.tokenize import sent_tokenize, word_tokenize
from sklearn import metrics
import numpy as np
Expand Down