Treebank base class.