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 01:57:27 -0600
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f1f59f7a30608979d24166b8efef395acb6ff91c
f1f59f7a
1 parent
f612c3cc
New terminological tagging for CRFs
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
27 deletions
biologicalTermTagging-CRF.py
biologicalTermTagging-CRF.py
View file @
f1f59f7
...
...
@@ -158,33 +158,6 @@ if __name__ == "__main__":
break
#print("Line: {}".format(line))
if
not
found
:
wordOrig
=
word
for
i
in
range
(
repetitions
,
0
,
-
1
):
wordOrig
=
wordOrig
.
replace
(
'-'
,
' '
,
i
)
print
(
"Word: {}"
.
format
(
wordOrig
))
if
wordOrig
in
hashTermsOrig
[
termTag
]:
print
(
"WordOrig: {}"
.
format
(
wordOrig
))
found
=
True
line
=
''
for
w
,
l
in
zip
(
word
.
split
(
'-'
),
lemma
.
split
(
'-'
)):
line
+=
w
+
'
\t
'
+
listLine1
[
1
]
+
'
\t
'
+
l
+
' '
+
termTag
+
' TermTag'
+
'
\n
'
line
=
line
.
rstrip
(
'
\n
'
)
break
if
not
found
:
for
i
in
range
(
1
,
repetitions
+
1
):
wordOrig
=
word
.
replace
(
'-'
,
' '
,
i
)
print
(
"Word: {}"
.
format
(
wordOrig
))
if
wordOrig
in
hashTermsOrig
[
termTag
]:
print
(
"WordOrig: {}"
.
format
(
wordOrig
))
found
=
True
line
=
''
for
w
,
l
in
zip
(
word
.
split
(
'-'
),
lemma
.
split
(
'-'
)):
line
+=
w
+
'
\t
'
+
listLine1
[
1
]
+
'
\t
'
+
l
+
' '
+
termTag
+
' TermTag'
+
'
\n
'
line
=
line
.
rstrip
(
'
\n
'
)
break
if
not
found
:
line
=
listLine1
[
0
]
+
'
\t
'
+
listLine1
[
1
]
+
'
\t
'
+
listLine2
[
0
]
+
' '
+
termTag
+
' TermTag'
else
:
line
=
listLine1
[
0
]
+
'
\t
'
+
listLine1
[
1
]
+
'
\t
'
+
listLine2
[
0
]
+
' '
+
termTag
+
' TermTag'
...
...
Please
register
or
login
to post a comment