#!/usr/bin/env ruby
# coding: utf-8

# This file is a part of TaCo: a morphosyntactic tagset converter
#
# License: GPL v. 3
# Author: Bartosz Zaborowski
#

require "#{File.dirname(__FILE__)}/converter_logic"

if ARGV.empty?
  puts "TaCo: morphosyntactic tagset converter - tree inspection tool"
  puts "by Bartosz Zaborowski"
  puts "License: GPL v.3"
  puts
  puts "usage:"
  puts "./print_tree.rb <model_file> <printing_depth>"
  exit
end


model = File.open(ARGV[0], "r"){|f| Marshal::load f.read}

depth = ARGV[1].to_i
puts model.pretty_print_tree depth

puts "\n\n\n"
puts "tree depth: #{model.tree_depth}, printed: #{depth}"
