You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Step [54] "data = [[d.split(':')[1][:-1], d.split(':')[0]] for d in data]" seems to include the sub-category output into the input sequence.
For example, for data line "DESC:def What is ethology ?", data will be ["def What is ethology ?", "DESC"] so the "def" sub-category is included into the input sequence.
I suggest a fix:
# Remove the sub-category (first word) and the '?' at the end.
data = [[d.split(':')[1].split(' ', 1)[1][:-2], d.split(':')[0]] for d in data]
The text was updated successfully, but these errors were encountered:
Step [54] "data = [[d.split(':')[1][:-1], d.split(':')[0]] for d in data]" seems to include the sub-category output into the input sequence.
For example, for data line "DESC:def What is ethology ?",
data
will be["def What is ethology ?", "DESC"]
so the "def" sub-category is included into the input sequence.I suggest a fix:
The text was updated successfully, but these errors were encountered: