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
2019-09-12 14:03:30 -0500
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a87ee9f90c957955fe34f3653017d0e831d93efa
a87ee9f9
1 parent
626bc4ba
Conditional Random Fields
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
training-validation-v1.py
training-validation-v1.py
View file @
a87ee9f
...
...
@@ -41,7 +41,7 @@ from nltk.corpus import stopwords
# Examples
# python training-validation-v1.py
# --inputPath /export/space1/users/compu2/bionlp/conditional-random-fields/data-sets
# --trainingFile training-data-set-
35
.txt
# --trainingFile training-data-set-
70
.txt
# --testFile test-data-set-30.txt
# --outputPath /export/space1/users/compu2/bionlp/conditional-random-fields
# python training-validation-v1.py --inputPath /export/space1/users/compu2/bionlp/conditional-random-fields/data-sets --trainingFile training-data-set-35.txt --testFile test-data-set-30.txt --outputPath /export/space1/users/compu2/bionlp/conditional-random-fields
...
...
@@ -234,7 +234,7 @@ if __name__ == "__main__":
# crf = rs.best_estimator_
nameReport
=
options
.
trainingFile
.
replace
(
'.txt'
,
'.fStopWords_'
+
str
(
options
.
excludeStopWords
)
+
'.fSymbols_'
+
str
(
options
.
excludeSymbols
)
+
'.txt'
)
with
open
(
os
.
path
.
join
(
options
.
outputPath
,
"reports
-lp
"
,
"report_"
+
nameReport
),
mode
=
"w"
)
as
oFile
:
with
open
(
os
.
path
.
join
(
options
.
outputPath
,
"reports"
,
"report_"
+
nameReport
),
mode
=
"w"
)
as
oFile
:
oFile
.
write
(
"********** TRAINING **********
\n
"
)
oFile
.
write
(
"Training file: "
+
options
.
trainingFile
+
'
\n
'
)
oFile
.
write
(
'
\n
'
)
...
...
Please
register
or
login
to post a comment