grew_node.mli 1.51 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 17
  val get_next: t -> G_edge.t Massoc.t

18
  val set_fs: t -> G_fs.t -> t
19 20 21 22 23 24

(* FIXME move Gid up and replace int by Gid.t *) 
  val remove: int -> G_edge.t -> t -> t 

  val remove_key: int -> t -> t 

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

  val rm_out_edges: t -> t

  val add_edge: G_edge.t -> int -> 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 37 38 39 40 41 42 43 44 45
  val pos_comp: t -> t -> int

  val build_neighbour: t -> t
end
(* ================================================================================ *)

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

  val empty: t

bguillaum's avatar
bguillaum committed
46
  val get_name: t -> Id.name
47
  val get_fs: t -> P_fs.t
48 49
  val get_next: t -> P_edge.t Massoc.t

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

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

  val add_edge: P_edge.t -> int -> t -> t option

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

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