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 13:30:23 -0600
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bebea4ad5041f1b56e43c3d63009db1a1adee16e
bebea4ad
1 parent
b721f242
Conditional Random Fields
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
training-validation-v2.py
training-validation-v2.py
View file @
bebea4a
...
...
@@ -69,11 +69,14 @@ def word2features(sent, i):
#'word[-1:]': word[-1:],
#'word.isupper()': word.isupper(),
#'word': word,
'lemma'
:
lemma
,
'postag'
:
postag
,
#'lemma[-3:]': lemma[-3:],
#'lemma[-2:]': lemma[-2:],
#'lemma[-1:]': lemma[-1:],
#'lemma': lemma,
#'postag': postag,
'lemma[-3:]'
:
lemma
[
-
3
:],
'lemma[-2:]'
:
lemma
[
-
2
:],
'lemma[-1:]'
:
lemma
[
-
1
:],
'lemma[+3:]'
:
lemma
[:
3
],
'lemma[+2:]'
:
lemma
[:
2
],
'lemma[+1:]'
:
lemma
[:
1
],
#'word[:3]': word[:3],
#'word[:2]': word[:2],
#'word[:1]': word[:1],
...
...
Please
register
or
login
to post a comment