grew_node.mli 1.71 KB
Newer Older
1
open Libgrew_utils
pj2m's avatar
pj2m committed
2 3
open Grew_fs
open Grew_edge
bguillaum's avatar
bguillaum committed
4
open Grew_ast
pj2m's avatar
pj2m committed
5

6 7 8 9 10 11 12 13 14
(* ================================================================================ *)
module G_node: sig
  type t

  val empty: t

  val to_string: t -> string
  val to_gr: t -> string

15
  val get_fs: t -> G_fs.t
16
  val get_next: t -> G_edge.t Massoc_gid.t
17

18
  val set_fs: t -> G_fs.t -> t
19
  val set_position: float -> t -> t
20

21 22
  val is_conll_root: t -> bool

bguillaum's avatar
bguillaum committed
23
  val remove: Gid.t -> G_edge.t -> t -> t
24

bguillaum's avatar
bguillaum committed
25
  val remove_key: Gid.t -> t -> t
26

27
  val merge_key: ?strict:bool -> Gid.t -> Gid.t -> t -> t option
bguillaum's avatar
bguillaum committed
28
  val shift_out: ?strict:bool -> t -> t -> t option
29 30 31

  val rm_out_edges: t -> t

32
  val add_edge: G_edge.t -> Gid.t -> t -> t option
33
  val build: ?def_position: float -> Ast.node -> (Id.name * t)
34
  val of_conll: ?loc:Loc.t -> Conll.line -> t
bguillaum's avatar
bguillaum committed
35

36 37 38
  val get_position: t -> float

  val position_comp: t -> t -> int
39

bguillaum's avatar
bguillaum committed
40 41
  val get_annot_info: t -> (string * string) option

42
  val build_neighbour: t -> t
43 44

  val rename: (Gid.t * Gid.t) list -> t -> t
45 46 47 48 49 50 51 52 53
end
(* ================================================================================ *)

(* ================================================================================ *)
module P_node: sig
  type t

  val empty: t

bguillaum's avatar
bguillaum committed
54
  val get_name: t -> Id.name
55
  val get_fs: t -> P_fs.t
bguillaum's avatar
bguillaum committed
56
  val get_next: t -> P_edge.t Massoc_pid.t
57

bguillaum's avatar
bguillaum committed
58 59 60
  (** [unif_fs fs t] replaces the feature structure of the node by node.fs unif fs *)
  val unif_fs: P_fs.t -> t -> t

61
  val build: ?pat_vars: string list -> Ast.node -> (Id.name * t)
62

bguillaum's avatar
bguillaum committed
63
  val add_edge: P_edge.t -> Pid.t -> t -> t option
64

65
  val match_: ?param: Lex_par.t -> t -> G_node.t -> Lex_par.t option
pj2m's avatar
pj2m committed
66

bguillaum's avatar
bguillaum committed
67
  val compare_pos: t -> t -> int
pj2m's avatar
pj2m committed
68
end
69
(* ================================================================================ *)