def tree_bank_string
      span = j_instance.getSpan
      text = j_instance.getText
      type = j_instance.getType
      res = ''
      start = span.getStart

      res << "(#{type} " if type != Java::opennlp.tools.parser.AbstractBottomUpParser::TOK_NODE

      j_instance.getChildren.each do |child|
        child_span = child.span
        res << text[start..child_span.getStart - 1] if start < child_span.getStart
        res << self.class.new(child).tree_bank_string
        start = child_span.getEnd
      end

      res << text[start..span.getEnd - 1] if start < span.getEnd
      res << ')' if type != Java::opennlp.tools.parser.AbstractBottomUpParser::TOK_NODE

      res
    end
def tree_bank_string
      span = j_instance.getSpan
      text = j_instance.getText
      type = j_instance.getType
      res = ''
      start = span.getStart

      res << "(#{type} " if type != Java::opennlp.tools.parser.AbstractBottomUpParser::TOK_NODE

      j_instance.getChildren.each do |child|
        child_span = child.span
        res << text[start..child_span.getStart - 1] if start < child_span.getStart
        res << self.class.new(child).tree_bank_string
        start = child_span.getEnd
      end

      res << text[start..span.getEnd - 1] if start < span.getEnd
      res << ')' if type != Java::opennlp.tools.parser.AbstractBottomUpParser::TOK_NODE

      res
    end
Initializes instance of Parser::Parse

 @param [Java::opennlp.tools.parser.Parse] java_instance
 Composes tree bank string, nested string representation of sentence parts, parts-of-speech and words,
 for example:
   '(TOP (S (NP (DT The) (JJ red) (NN fox)) (VP (VBZ sleeps) (ADVP (RB soundly))) (. .)))'

 @return [String]