Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
grew
grew
Commits
a09715c4
Commit
a09715c4
authored
Sep 10, 2018
by
Bruno Guillaume
Browse files
add -cupt flag
parent
692215b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/grew_args.ml
View file @
a09715c4
...
...
@@ -20,6 +20,7 @@ module Grew_args = struct
let
grs
=
ref
None
let
gui_doc
=
ref
false
let
dep_dir
=
ref
None
let
cupt
=
ref
false
let
(
input_data
:
string
list
ref
)
=
ref
[]
let
(
output_file
:
string
option
ref
)
=
ref
None
...
...
@@ -88,6 +89,7 @@ module Grew_args = struct
""
;
"Optionnal arguments:"
;
" -strat <name> The stategy used in transformation (default=
\"
main
\"
)"
;
" -cupt If the option is present, a 11-column CoNLL format is produced"
;
""
;
"For additional information, see http://grew.loria.fr"
;
"----------------------------------------------------------"
;
...
...
@@ -108,6 +110,7 @@ module Grew_args = struct
|
"-max_depth_non_det"
::
i
::
args
->
Log
.
warning
"max_depth_non_det not implemented, skip the arg"
;
loop
args
|
"-quiet"
::
args
->
quiet
:=
true
;
loop
args
|
"-cupt"
::
args
->
cupt
:=
true
;
loop
args
|
"-safe_commands"
::
args
->
Libgrew
.
set_safe_commands
true
;
loop
args
|
"-debug"
::
args
->
Libgrew
.
set_debug_mode
true
;
loop
args
...
...
src/grew_corpus.ml
View file @
a09715c4
...
...
@@ -56,7 +56,7 @@ let transform () =
(
fun
index
(
id
,
gr
)
->
Counter
.
print
index
len
id
;
match
Rewrite
.
simple_rewrite
~
gr
~
grs
~
strat
:!
Grew_args
.
strat
with
|
[
one
]
->
fprintf
out_ch
"%s
\n
"
(
Graph
.
to_conll_string
one
)
|
[
one
]
->
fprintf
out_ch
"%s
\n
"
(
Graph
.
to_conll_string
~
cupt
:!
Grew_args
.
cupt
one
)
|
l
->
List
.
iteri
(
fun
i
gr
->
let
conll
=
Graph
.
to_conll
gr
in
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment