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
3e9420ad
"vscode:/vscode.git/clone" did not exist on "87b4ade9e5e6424673652286c46ff3d5039c0503"
Commit
3e9420ad
authored
Sep 19, 2019
by
Marianne Stecklina
Committed by
thomwolf
Oct 15, 2019
Browse files
Make file reading more robust
parent
cde42c43
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/utils_ner.py
examples/utils_ner.py
+1
-1
No files found.
examples/utils_ner.py
View file @
3e9420ad
...
...
@@ -75,7 +75,7 @@ def read_examples_from_file(data_dir, evaluate=False):
else
:
splits
=
line
.
split
(
" "
)
words
.
append
(
splits
[
0
])
labels
.
append
(
splits
[
-
1
]
[:
-
1
]
)
labels
.
append
(
splits
[
-
1
]
.
replace
(
"
\n
"
,
""
)
)
if
words
:
examples
.
append
(
InputExample
(
guid
=
"%s-%d"
.
format
(
guid_prefix
,
guid_index
),
words
=
words
,
...
...
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