Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
bb61b747
Unverified
Commit
bb61b747
authored
Apr 15, 2019
by
Thomas Wolf
Committed by
GitHub
Apr 15, 2019
Browse files
Merge pull request #474 from jiesutd/master
Fix tsv read error in Windows
parents
7873d764
c49ce3c7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/run_classifier.py
examples/run_classifier.py
+1
-1
No files found.
examples/run_classifier.py
View file @
bb61b747
...
...
@@ -95,7 +95,7 @@ class DataProcessor(object):
@
classmethod
def
_read_tsv
(
cls
,
input_file
,
quotechar
=
None
):
"""Reads a tab separated value file."""
with
open
(
input_file
,
"r"
)
as
f
:
with
open
(
input_file
,
"r"
,
encoding
=
"utf-8"
)
as
f
:
reader
=
csv
.
reader
(
f
,
delimiter
=
"
\t
"
,
quotechar
=
quotechar
)
lines
=
[]
for
line
in
reader
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment