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:24:51 -0600
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a709b026d7e8eec22f88e674d184c091e6dc5d6e
a709b026
1 parent
a02f0e92
Obtaining training and test data sets
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
prepare-training-test.py
prepare-training-test.py
View file @
a709b02
...
...
@@ -68,12 +68,13 @@ if __name__ == "__main__":
for
line
in
iFile
:
line
=
line
.
strip
(
'
\r\n
'
)
trainingDataset
.
append
(
line
)
if
counter
>
70
and
counter
<=
100
:
el
if
counter
>
70
and
counter
<=
100
:
print
(
" Joining file {} to test data set"
.
format
(
file
))
with
open
(
os
.
path
.
join
(
path
,
file
),
"r"
,
encoding
=
"utf-8"
,
errors
=
"replace"
)
as
iFile
:
for
line
in
iFile
:
line
=
line
.
strip
(
'
\r\n
'
)
testDataset
.
append
(
line
)
counter
+=
1
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
))
...
...
Please
register
or
login
to post a comment