:- module oc_tree. :- interface. :- implementation. :- pred x(io::di, io::uo) is det. x(!IO) :- ( det_get_environment_var("FINALTREE", FTFileNamePattern, !IO), FTFileName = string.replace_all(FTFileNamePattern, "%", int_to_string(int(OCS^input_tree^sentid))), some[!D] ( !D = svg.new, place(tl, lt_to_svg(output_tree_so_far(OCS)), tl, bless("output"), !D), SVG = svg.to_svg(hard_pad(30.0, !:D)) ), string_to_file(SVG++"\n\n", FTFileName, !IO) ).