Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Carlos-Francisco Méndez-Cruz
/
conditional-random-fields
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Carlos-Francisco Méndez-Cruz
2018-03-08 01:23:41 -0600
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a02f0e9228e75a94de43dac4cf1f8f8469a84180
a02f0e92
1 parent
048c0466
Obtaining training and test data sets
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
prepare-training-test.py
prepare-training-test.py
View file @
a02f0e9
...
...
@@ -74,10 +74,10 @@ if __name__ == "__main__":
for
line
in
iFile
:
line
=
line
.
strip
(
'
\r\n
'
)
testDataset
.
append
(
line
)
with
open
(
os
.
path
.
join
(
options
.
outputPath
,
options
.
trainingFile
),
"
r
"
,
encoding
=
"utf-8"
,
errors
=
"replace"
)
as
oFile
:
with
open
(
os
.
path
.
join
(
options
.
outputPath
,
options
.
trainingFile
),
"
w
"
,
encoding
=
"utf-8"
,
errors
=
"replace"
)
as
oFile
:
for
line
in
trainingDataset
:
oFile
.
write
(
"{}
\n
"
.
format
(
line
))
with
open
(
os
.
path
.
join
(
options
.
outputPath
,
options
.
testFile
),
"
r
"
,
encoding
=
"utf-8"
,
errors
=
"replace"
)
as
oFile
:
with
open
(
os
.
path
.
join
(
options
.
outputPath
,
options
.
testFile
),
"
w
"
,
encoding
=
"utf-8"
,
errors
=
"replace"
)
as
oFile
:
for
line
in
testDataset
:
oFile
.
write
(
"{}
\n
"
.
format
(
line
))
...
...
Please
register
or
login
to post a comment