open ENIAM_LCGtypes
open Xstd

(* [ORTH: ; LEMMA: wiedzieć; POS: ; ID: 1;
    WEIGHT: 0.; SYMBOL: ∙; ARG_SYMBOL: ∙; ARG_DIR: ; ARGS:
     [ORTH: ; LEMMA: pro; POS: ; ID: 0;
      WEIGHT: 0.; SYMBOL: ∙; ARG_SYMBOL: ∙; ARG_DIR: ; ARGS: ∙;
      PERS: pri; NUM: sg; CASE: nom];
    PUN: ; NEGATION: aff; TENSE: pres; MOOD: indicative; ASPECT: imperf] *)

let empty_node = {
  orth=""; lemma=""; pos=""; weight=0.; id=0; symbol=Dot; arg_symbol=Dot; arg_dir=""; attrs=[]; args=Dot;}


let r0 c = Node{empty_node with lemma = c;
                              id=0;
                              attrs=["PERS",Var "pri";"NUM",Var "sg";"CASE",Var "nom"];
                              args = Dot} 

let r1 c = Node{empty_node with lemma = "wiedzieć";
                              id=1;
                              attrs=["NEGATION",Var "aff";"TENSE",Var "pres";"MOOD",Var "indicative";"ASPECT",Var "imperf"];
                              args = r0 c} 

let _ =
  let results = ["p1", r1 "pies"; "p2", r1 "pies"] in
  let l_term = ParserMerger.merge_results results in
  print_endline (ENIAM_LCGstringOf.linear_term 0 l_term)
