Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Carlos-Francisco Méndez-Cruz
/
nlp-preprocessing-pipeline
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 00:49:35 -0600
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9321869aa2bc0ad901269b86a81ff7b4fd97d8b6
9321869a
1 parent
34198579
New terminological tagging for CRFs
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
biologicalTermTagging-CRF.py
biologicalTermTagging-CRF.py
View file @
9321869
...
...
@@ -108,7 +108,7 @@ if __name__ == "__main__":
hashTermsOrig
[
key
]
.
append
(
line
.
capitalize
())
print
(
' Terms read {} size: {}'
.
format
(
key
,
len
(
hashTerms
[
key
])))
print
(
' Terms read {} size: {}'
.
format
(
key
,
len
(
hashTermsOrig
[
key
])))
print
(
"hashTermsOrig: {}"
.
format
(
hashTermsOrig
))
#
print("hashTermsOrig: {}".format(hashTermsOrig))
#regularWords = words.words('en')
print
()
...
...
@@ -164,6 +164,9 @@ if __name__ == "__main__":
line
=
listLine1
[
0
]
+
'
\t
'
+
listLine1
[
1
]
+
'
\t
'
+
listLine2
[
0
]
+
' '
+
'O'
+
' TermTag'
# line = listLine1[0] + '\t' + termTag + '\t' + listLine2[0] + ' ' + termTag + ' TermTag'
#line = word + '\t' + termTag + '\t' + lemma + ' ' + termTag + ' TermTag'
if
found
:
oFile
.
write
(
line
)
else
:
oFile
.
write
(
line
+
'
\n
'
)
filesPreprocessed
+=
1
...
...
Please
register
or
login
to post a comment