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-02-14 12:51:41 -0600
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
af5d06076ee73e86a4c9acb116e7bf1765055c35
af5d0607
1 parent
791dee53
Conditional Random Fields
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
training-validation-v1.py
training-validation-v1.py
View file @
af5d060
...
...
@@ -60,7 +60,7 @@ def word2features(sent, i):
features
=
{
#'word': word,
'lemma'
:
lemma
,
#
'postag': postag,
'postag'
:
postag
,
}
if
i
>
0
:
listElem
=
sent
[
i
-
1
]
.
split
(
'|'
)
...
...
@@ -70,7 +70,7 @@ def word2features(sent, i):
features
.
update
({
#'-1:word': word1,
'-1:lemma'
:
lemma1
,
#
'-1:postag': postag1,
'-1:postag'
:
postag1
,
})
if
i
<
len
(
sent
)
-
1
:
...
...
@@ -81,7 +81,7 @@ def word2features(sent, i):
features
.
update
({
#'+1:word': word1,
'+1:lemma'
:
lemma1
,
#
'+1:postag': postag1,
'+1:postag'
:
postag1
,
})
return
features
...
...
Please
register
or
login
to post a comment