Commit 92cdaf69 authored by Bruno Guillaume's avatar Bruno Guillaume

Change Yojson type

parent 7d1027c2
......@@ -223,7 +223,7 @@ module Ast : sig
type grs = decl list
val strat_to_json: strat -> Yojson.Basic.json
val strat_to_json: strat -> Yojson.Basic.t
val strat_list: grs -> string list
......
......@@ -43,7 +43,7 @@ module Command : sig
| SHIFT_OUT of (command_node * command_node * Label_cst.t)
type t = (p * Loc.t)
val to_json: ?domain:Domain.t -> t -> Yojson.Basic.json
val to_json: ?domain:Domain.t -> t -> Yojson.Basic.t
val build:
......
......@@ -51,7 +51,7 @@ module Domain : sig
val dump: t option -> unit
val to_json: t -> Yojson.Basic.json
val to_json: t -> Yojson.Basic.t
val build: Label_domain.t -> Feature_domain.t -> t
val build_features_only: Feature_domain.t -> t
......
......@@ -42,7 +42,7 @@ module Label_cst : sig
| Regexp of (Str.regexp * string)
val to_string: ?domain:Domain.t -> t -> string
val to_json: ?domain:Domain.t -> t -> Yojson.Basic.json
val to_json: ?domain:Domain.t -> t -> Yojson.Basic.t
val all: t
val match_: ?domain:Domain.t -> t -> Label.t -> bool
val build: ?loc:Loc.t -> ?domain:Domain.t -> Ast.edge_label_cst -> t
......@@ -56,7 +56,7 @@ module G_edge: sig
val to_string: ?domain:Domain.t -> t -> string
val to_json: ?domain:Domain.t -> t -> Yojson.Basic.json
val to_json: ?domain:Domain.t -> t -> Yojson.Basic.t
val make: ?loc:Loc.t -> ?domain:Domain.t -> string -> t
......@@ -77,7 +77,7 @@ module P_edge: sig
(* [all] is the joker pattern edge *)
val all: t
val to_json: ?domain:Domain.t -> t -> Yojson.Basic.json
val to_json: ?domain:Domain.t -> t -> Yojson.Basic.t
val get_id: t -> string
......
......@@ -8,7 +8,6 @@
(* Authors: see AUTHORS file *)
(**********************************************************************************)
open Yojson.Basic
open Conll
open Grew_base
......@@ -51,7 +50,7 @@ module G_fs: sig
val to_word: t -> string option
val to_dep: ?decorated_feat:(string * (string * string option) list) -> ?position:float -> ?main_feat: string -> ?filter: (string -> bool) -> t -> string
val to_conll: ?exclude: string list -> t -> (string * string) list
val to_json: t -> json
val to_json: t -> Yojson.Basic.t
val to_string: t -> string
val build: ?domain:Domain.t -> Ast.feature list -> t
......@@ -71,7 +70,7 @@ end (* module G_fs *)
module P_fs: sig
type t
val to_json: ?domain:Domain.t -> t -> Yojson.Basic.json
val to_json: ?domain:Domain.t -> t -> Yojson.Basic.t
val empty: t
......
......@@ -349,7 +349,7 @@ module G_graph = struct
(* -------------------------------------------------------------------------------- *)
let of_json = function
| `Assoc (l : (string * Yojson.Basic.json) list) ->
| `Assoc (l : (string * Yojson.Basic.t) list) ->
let (ast_node_list, ast_edge_list) = List.fold_left
(fun (acc_node, acc_edge) -> function
| (id, `List [`Assoc feat_json_list; `List succ]) ->
......
......@@ -9,7 +9,6 @@
(**********************************************************************************)
open Conll
open Yojson.Basic
open Grew_base
open Grew_types
......@@ -49,7 +48,7 @@ module P_graph: sig
val empty: t
val to_json: ?domain:Domain.t -> t -> Yojson.Basic.json
val to_json: ?domain:Domain.t -> t -> Yojson.Basic.t
val find: Pid.t -> t -> P_node.t
......@@ -108,7 +107,7 @@ module G_graph: sig
val build: ?domain:Domain.t -> ?grewpy: bool -> Ast.gr -> t
val of_conll: ?domain:Domain.t -> Conll.t -> t
val of_json: json -> t
val of_json: Yojson.Basic.t -> t
(** input : "Le/DET/le petit/ADJ/petit chat/NC/chat dort/V/dormir ./PONCT/."
It supposes that "SUC" is defined in current relations *)
......@@ -197,7 +196,7 @@ module G_graph: sig
val to_dep: ?filter: (string -> bool) -> ?main_feat:string -> ?deco:G_deco.t -> t -> string
val to_conll: t -> Conll.t
val to_conll_string: ?cupt:bool -> t -> string
val to_json: t -> json
val to_json: t -> Yojson.Basic.t
val cast: ?domain:Domain.t -> t -> t
end (* module G_graph *)
......
......@@ -24,7 +24,7 @@ module Grs : sig
val dump: t -> unit
val to_json: t -> Yojson.Basic.json
val to_json: t -> Yojson.Basic.t
val domain: t -> Domain.t option
val domain_build: Ast.domain -> Domain.t
......
......@@ -88,7 +88,7 @@ module P_node: sig
val empty: t
val to_json: ?domain:Domain.t -> t -> Yojson.Basic.json
val to_json: ?domain:Domain.t -> t -> Yojson.Basic.t
val get_name: t -> Id.name
val get_fs: t -> P_fs.t
......
......@@ -8,7 +8,6 @@
(* Authors: see AUTHORS file *)
(**********************************************************************************)
open Yojson.Basic
open Grew_base
open Grew_types
open Grew_domain
......@@ -35,7 +34,7 @@ module Rule : sig
(** [get_loc t] returns the file location of the rule [t]. *)
val get_loc: t -> Loc.t
val to_json: ?domain:Domain.t -> t -> Yojson.Basic.json
val to_json: ?domain:Domain.t -> t -> Yojson.Basic.t
(** [to_dep t] returns a string in the [dep] language describing the match basic of the rule *)
val to_dep: ?domain:Domain.t -> t -> string
......@@ -51,7 +50,7 @@ module Rule : sig
val pid_name_list: pattern -> Id.name list
val to_python: pattern -> G_graph.t -> matching -> json
val to_python: pattern -> G_graph.t -> matching -> Yojson.Basic.t
val build_pattern: ?domain:Domain.t -> ?lexicons: Lexicons.t -> Ast.pattern -> pattern
......
......@@ -9,7 +9,6 @@
(**********************************************************************************)
open Conll
open Yojson.Basic
(* ==================================================================================================== *)
(** {2 General definitions} *)
......@@ -55,7 +54,7 @@ end
module Matching: sig
type t
val to_json: Pattern.t -> Grew_graph.G_graph.t -> t -> json
val to_json: Pattern.t -> Grew_graph.G_graph.t -> t -> Yojson.Basic.t
val nodes: Pattern.t -> Grew_graph.G_graph.t -> t -> (string * string) list
end
......@@ -88,8 +87,8 @@ module Graph : sig
val of_conll: ?domain:Domain.t -> Conll.t -> t
val of_json: json -> t
val to_json: t -> json
val of_json: Yojson.Basic.t -> t
val to_json: t -> Yojson.Basic.t
val of_brown: ?domain:Domain.t -> ?sentid:string -> string -> t
......@@ -125,7 +124,7 @@ module Grs : sig
val domain: t -> Domain.t option
val to_json: t -> json
val to_json: t -> Yojson.Basic.t
val get_strat_list: t -> string list
end
......
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