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-07 23:39:37 -0600
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
15de56ccec6c58fbabfc9997c05204eff3b221a9
15de56cc
1 parent
a7e1ac4e
Prepare abstracts
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
prepare-abstracts.py
prepare-abstracts.py
View file @
15de56c
...
...
@@ -20,7 +20,7 @@ __author__ = 'CMendezC'
# Execution:
# python3 prepare-abstracts.py
# --inputPath /export/space1/users/compu2/bionlp/conditional-random-fields/data-sets
# --inputFile text-annotated-abstracts
-original
.txt
# --inputFile text-annotated-abstracts.txt
# --outputPath /export/space1/users/compu2/bionlp/conditional-random-fields/data-sets/original
# --dicPath /export/space1/users/compu2/bionlp/nlp-preprocessing-pipeline/dictionaries
# --dicFile genes.txt
...
...
@@ -64,7 +64,7 @@ if __name__ == "__main__":
with
open
(
os
.
path
.
join
(
options
.
inputPath
,
options
.
inputFile
),
"r"
,
encoding
=
"utf-8"
,
errors
=
"replace"
)
as
iFile
:
print
(
"Reading file..."
+
options
.
inputFile
)
for
line
in
iFile
:
line
=
line
.
strip
(
'
\n
'
)
line
=
line
.
strip
(
'
\
r\
n
'
)
for
gene
in
reGene
.
findall
(
line
):
# print("genes: {}".format(gene))
if
gene
not
in
hashGenes
:
...
...
Please
register
or
login
to post a comment