grew_node.mli 1.55 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

bguillaum's avatar
bguillaum committed
21
  val remove: Gid.t -> G_edge.t -> t -> t
22

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

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

  val rm_out_edges: t -> t

30
  val add_edge: G_edge.t -> Gid.t -> t -> t option
31
  val build: Ast.node -> (Id.name * t)
bguillaum's avatar
bguillaum committed
32 33
  val of_conll: Conll.line -> t

34 35 36
  val pos_comp: t -> t -> int

  val build_neighbour: t -> t
37 38

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

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

  val empty: t

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

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

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

bguillaum's avatar
bguillaum committed
57
  val add_edge: P_edge.t -> Pid.t -> t -> t option
58

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

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