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
250e24b5
Commit
250e24b5
authored
Nov 02, 2017
by
Bruno Guillaume
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve regexp for parsing MElt output
parent
50295f28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
src/grew_graph.ml
src/grew_graph.ml
+4
-1
No files found.
src/grew_graph.ml
View file @
250e24b5
...
...
@@ -423,10 +423,13 @@ module G_graph = struct
(* -------------------------------------------------------------------------------- *)
(** input : "Le/DET/le petit/ADJ/petit chat/NC/chat dort/V/dormir ./PONCT/." *)
let
re
=
Str
.
regexp
"/
\\
(ADJ
\\
|ADJWH
\\
|ADV
\\
|ADVWH
\\
|CC
\\
|CLO
\\
|CLR
\\
|CLS
\\
|CS
\\
|DET
\\
|DETWH
\\
|ET
\\
|I
\\
|NC
\\
|NPP
\\
|P
\\
|P
\\
+D
\\
|P
\\
+PRO
\\
|PONCT
\\
|PREF
\\
|PRO
\\
|PROREL
\\
|PROWH
\\
|V
\\
|VIMP
\\
|VINF
\\
|VPP
\\
|VPR
\\
|VS
\\
)/"
let
of_brown
?
domain
?
sentid
brown
=
let
units
=
Str
.
split
(
Str
.
regexp
" "
)
brown
in
let
conll_lines
=
List
.
mapi
(
fun
i
item
->
match
Str
.
full_split
(
Str
.
regexp
"/[A-Z'+'']+/"
)
item
with
(
fun
i
item
->
match
Str
.
full_split
re
item
with
|
[
Str
.
Text
form
;
Str
.
Delim
pos
;
Str
.
Text
lemma
]
->
let
pos
=
String
.
sub
pos
1
((
String
.
length
pos
)
-
2
)
in
let
feats
=
match
(
i
,
sentid
)
with
...
...
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