grew_node.mli 1.58 KB
Newer Older
bguillaum's avatar
bguillaum committed
1
open Grew_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
bguillaum's avatar
bguillaum committed
19
  val set_pos: t -> float -> 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: Ast.node -> (Id.name * t)
bguillaum's avatar
bguillaum committed
34 35
  val of_conll: Conll.line -> t

36 37 38
  val pos_comp: t -> t -> int

  val build_neighbour: t -> t
39 40

  val rename: (Gid.t * Gid.t) list -> t -> t
41 42 43 44 45 46 47 48 49
end
(* ================================================================================ *)

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

  val empty: t

bguillaum's avatar
bguillaum committed
50
  val get_name: t -> Id.name
51
  val get_fs: t -> P_fs.t
bguillaum's avatar
bguillaum committed
52
  val get_next: t -> P_edge.t Massoc_pid.t
53

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

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

bguillaum's avatar
bguillaum committed
59
  val add_edge: P_edge.t -> Pid.t -> t -> t option
60

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

bguillaum's avatar
bguillaum committed
63
  val compare_pos: t -> t -> int
pj2m's avatar
pj2m committed
64
end
65
(* ================================================================================ *)