Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libcaml-grew
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
grew
libcaml-grew
Commits
fc28e69e
Commit
fc28e69e
authored
Oct 10, 2017
by
Bruno Guillaume
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
keep SpaceAfter=No in amalgam lines, example:
# sent_id = fr-ud-dev_01033 21-22 au _ _ _ _ _ _ _ SpaceAfter=No
parent
ba5e49bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
15 deletions
+23
-15
src/grew_graph.ml
src/grew_graph.ml
+23
-15
No files found.
src/grew_graph.ml
View file @
fc28e69e
...
...
@@ -221,11 +221,18 @@ end (* module G_deco *)
(* ================================================================================ *)
module
G_graph
=
struct
type
fusion_item
=
{
first
:
Gid
.
t
;
last
:
Gid
.
t
;
word
:
string
;
efs
:
(
string
*
string
)
list
;
}
type
t
=
{
meta
:
string
list
;
(* meta-informations *)
map
:
G_node
.
t
Gid_map
.
t
;
(* node description *)
fusion
:
(
Gid
.
t
*
(
Gid
.
t
*
string
))
list
;
(* the list of fusion word considered in UD conll *)
highest_index
:
int
;
(* the next free integer index *)
meta
:
string
list
;
(* meta-informations *)
map
:
G_node
.
t
Gid_map
.
t
;
(* node description *)
fusion
:
fusion_item
list
;
(* the list of fusion word considered in UD conll *)
highest_index
:
int
;
(* the next free integer index *)
}
let
empty
=
{
meta
=
[]
;
map
=
Gid_map
.
empty
;
fusion
=
[]
;
highest_index
=
0
;
}
...
...
@@ -400,14 +407,15 @@ module G_graph = struct
let
fusion
=
List
.
map
(
fun
{
Conll
.
first
;
last
;
fusion
;
mw_line_num
}
->
(
fun
{
Conll
.
first
;
last
;
fusion
;
mw_line_num
;
mw_efs
}
->
let
loc
=
Loc
.
file_opt_line_opt
conll
.
Conll
.
file
mw_line_num
in
(
Id
.
gbuild
~
loc
(
first
,
None
)
gtable
,
(
Id
.
gbuild
~
loc
(
last
,
None
)
gtable
,
fusion
)
{
first
=
Id
.
gbuild
~
loc
(
first
,
None
)
gtable
;
last
=
Id
.
gbuild
~
loc
(
last
,
None
)
gtable
;
word
=
fusion
;
efs
=
mw_efs
;
}
)
)
conll
.
Conll
.
multiwords
in
...
...
@@ -849,12 +857,12 @@ module G_graph = struct
)
graph
.
map
Gid_map
.
empty
in
let
multiwords
=
List
.
map
(
fun
(
gid
,
(
gid_last
,
fusion
))
->
List
.
map
(
fun
fusion_item
->
{
Conll
.
mw_line_num
=
None
;
first
=
int_of_float
(
get_num
gid
);
last
=
int_of_float
(
get_num
gid_
last
);
fusion
;
mw_efs
=
[]
first
=
int_of_float
(
get_num
fusion_item
.
first
);
last
=
int_of_float
(
get_num
fusion_item
.
last
);
fusion
=
fusion_item
.
word
;
mw_efs
=
fusion_item
.
efs
;
}
)
graph
.
fusion
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