Commit 2494134c authored by bguillaum's avatar bguillaum
Browse files

WARNING: grs files need to be updated.

* add "num" feature in loading mechanism.
* change Conll loading:
  - Conll field 4 --> "cat" feature (ex: V)
  - Conll field 5 --> "pos" feature (ex: VPP)

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/semagramme/libcaml-grew/trunk@7572 7838e531-6607-4d57-9587-6c381814729c
parent a3444c29
......@@ -197,7 +197,9 @@ module G_fs = struct
let unsorted =
("phon", String line.Conll.phon)
:: ("lemma", String line.Conll.lemma)
:: ("cat", String line.Conll.pos2)
:: ("cat", String line.Conll.pos1)
:: ("pos", String line.Conll.pos2)
:: ("num", Int line.Conll.num)
:: (List.map (fun (f,v) -> (f, String v)) line.Conll.morph) in
List.sort G_feature.compare unsorted
......
......@@ -36,8 +36,12 @@ module G_node = struct
| None -> None
let build (ast_node, loc) =
let fs = G_fs.build ast_node.Ast.fs in
let fs_with_num = match ast_node.Ast.position with
| None -> fs
| Some num -> G_fs.set_feat "num" (string_of_int num) fs in
(ast_node.Ast.node_id,
{ fs = G_fs.build ast_node.Ast.fs;
{ fs = fs_with_num;
pos = ast_node.Ast.position;
next = Massoc_gid.empty;
} )
......
......@@ -648,7 +648,6 @@ module Lex_par = struct
Str.global_replace (Str.regexp "\\( \\|\t\\)*$") ""
(Str.global_replace (Str.regexp "^\\( \\|\t\\)*") "" s)
let parse_line ?loc nb_p nb_c line =
let line = rm_peripheral_white line in
if line = "" || line.[0] = '%'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment