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
0727e5d9
There was an error fetching the commit references. Please try again later.
Commit
0727e5d9
authored
12 years ago
by
jezozwierzak
Browse files
Options
Downloads
Patches
Plain Diff
some naming fixes
parent
a21dc6c0
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
INSTALL
+1
-1
1 addition, 1 deletion
INSTALL
iobber/chunker.py
+3
-4
3 additions, 4 deletions
iobber/chunker.py
iobber/classify.py
+4
-4
4 additions, 4 deletions
iobber/classify.py
setup.py
+1
-1
1 addition, 1 deletion
setup.py
with
9 additions
and
10 deletions
INSTALL
+
1
−
1
View file @
0727e5d9
...
...
@@ -18,7 +18,7 @@ This will install the python modules (iobber package), the iobber executable and
To use the trained model, issue the following (for more details please consult README and the output of iobber -h):
iobber kpwr.ini -d model-kpwr0
3
/ my_xces_input.xml -i xces -O ccl_chunked_output.xml
iobber kpwr.ini -d model-kpwr0
4
/ my_xces_input.xml -i xces -O ccl_chunked_output.xml
NOTE: the kpwr.ini configuration assumes that the input is morphosyntactically tagged.
This diff is collapsed.
Click to expand it.
iobber/chunker.py
+
3
−
4
View file @
0727e5d9
...
...
@@ -110,7 +110,7 @@ class Chunker:
self
.
conf
,
self
.
model_name
,
self
.
data_dir
,
layer
)
def
train_and_save
(
self
,
in_path
,
input_format
):
"""
Trains the
tagg
er and stores the model to files beginning with
"""
Trains the
chunk
er and stores the model to files beginning with
model_name.
"""
self
.
layer_models
=
None
# forget any previously trained model
if
self
.
verbose
:
...
...
@@ -158,9 +158,8 @@ class Chunker:
chan
=
asent
.
get_channel
(
chan_name
)
there_iob
=
corpus2
.
to_string
(
chan
.
get_iob_at
(
tok_idx
))
if
there_iob
!=
'
O
'
:
if
non_O_chan
is
not
None
:
sys
.
stderr
.
write
(
'
WARNING: overlapping phrases in sentence %s
\n
'
%
unicode
(
asent
.
id
()))
if
non_O_chan
is
not
None
and
self
.
verbose
:
sys
.
stderr
.
write
(
'
WARNING: overlapping phrases in sentence %s
\n
'
%
unicode
(
asent
.
id
()))
else
:
non_O_chan
=
chan_name
non_O_tag
=
there_iob
...
...
This diff is collapsed.
Click to expand it.
iobber/classify.py
+
4
−
4
View file @
0727e5d9
...
...
@@ -20,11 +20,11 @@ import config, corpio
DATA_SEP
=
'
\t
'
def
open_tr_files
(
model_name
,
data_dir
,
channel
s
):
def
open_tr_files
(
model_name
,
data_dir
,
layer
s
):
tr_files
=
{}
for
chan
in
channel
s
:
tr_files
[
chan
]
=
codecs
.
open
(
corpio
.
f_name
(
model_name
,
data_dir
,
config
.
EXT_DATA
,
chan
),
'
wb
'
,
'
utf-8
'
)
for
layer
in
layer
s
:
tr_files
[
layer
]
=
codecs
.
open
(
corpio
.
f_name
(
model_name
,
data_dir
,
config
.
EXT_DATA
,
layer
),
'
wb
'
,
'
utf-8
'
)
return
tr_files
def
close_tr_files
(
tr_files
):
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
0727e5d9
...
...
@@ -14,7 +14,7 @@ setup(name='iobber',
package_data
=
{
'
iobber
'
:
[
'
data/*.ini
'
,
'
data/*.ccl
'
,
'
data/*.txt
'
,
'
data/*.lex
'
,
'
data/model-kpwr0
3
/*.cr
'
,
'
data/model-kpwr0
3
/*.lex
'
]
'
data/model-kpwr0
4
/*.cr
'
,
'
data/model-kpwr0
4
/*.lex
'
]
# TODO: pre-trained models as well
},
license
=
'
LGPL
'
,
...
...
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