Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Iobber
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Syntactic Tools
Chunking
Iobber
Commits
ac508c1c
Commit
ac508c1c
authored
5 years ago
by
Wiktor Walentynowicz
Browse files
Options
Downloads
Patches
Plain Diff
Update chunker.py
parent
e8763b83
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
iobber/chunker.py
+2
-2
2 additions, 2 deletions
iobber/chunker.py
with
2 additions
and
2 deletions
iobber/chunker.py
+
2
−
2
View file @
ac508c1c
...
@@ -168,7 +168,7 @@ class Chunker:
...
@@ -168,7 +168,7 @@ class Chunker:
for
tok_idx
,
_
in
enumerate
(
sent
.
tokens
()):
for
tok_idx
,
_
in
enumerate
(
sent
.
tokens
()):
con
.
set_position
(
tok_idx
)
# for WCCL ops
con
.
set_position
(
tok_idx
)
# for WCCL ops
feat_vals
=
[
op
.
base_apply
(
con
)
feat_vals
=
[
op
.
base_apply
(
con
)
.
to_compact_string
(
self
.
tagset
)
.
decode
(
'
utf-8
'
)
.
to_compact_string
(
self
.
tagset
)
for
op
in
self
.
layer_ops
[
layer_idx
]]
for
op
in
self
.
layer_ops
[
layer_idx
]]
# get IOB2 tags as strings, find non-O IOB2 tag...
# get IOB2 tags as strings, find non-O IOB2 tag...
# ...or mark it O
# ...or mark it O
...
@@ -240,7 +240,7 @@ class Chunker:
...
@@ -240,7 +240,7 @@ class Chunker:
for
tok_idx
,
_
in
enumerate
(
sent
.
tokens
()):
for
tok_idx
,
_
in
enumerate
(
sent
.
tokens
()):
con
.
set_position
(
tok_idx
)
con
.
set_position
(
tok_idx
)
feat_vals
=
[
op
.
base_apply
(
con
)
feat_vals
=
[
op
.
base_apply
(
con
)
.
to_compact_string
(
self
.
tagset
)
.
decode
(
'
utf-8
'
)
.
to_compact_string
(
self
.
tagset
)
for
op
in
self
.
layer_ops
[
layer_idx
]]
for
op
in
self
.
layer_ops
[
layer_idx
]]
classify
.
eat_token
(
model
,
feat_vals
)
classify
.
eat_token
(
model
,
feat_vals
)
classify
.
close_sent
(
model
)
classify
.
close_sent
(
model
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment