public void loadTree(InputStream treeStream) throws IOException, MaryConfigurationException {
  MaryCARTReader cartReader=new MaryCARTReader();
  this.tree=cartReader.loadFromStream(treeStream);
  this.featureDefinition=tree.getFeatureDefinition();
  this.indexPredictedFeature=featureDefinition.getFeatureIndex(PREDICTED_STRING_FEATURENAME);
  this.convertToLowercase=false;
  Properties props=tree.getProperties();
  if (props == null)   throw new IllegalArgumentException("Prediction tree does not contain properties");
  convertToLowercase=Boolean.parseBoolean(props.getProperty("lowercase"));
  context=Integer.parseInt(props.getProperty("context"));
}

public void loadTree ( InputStream treeStream ) throws IOException , MaryConfigurationException { MaryCARTReader cartReader = new MaryCARTReader ( ) ; this . tree = cartReader . loadFromStream ( treeStream ) ; this . featureDefinition = tree . getFeatureDefinition ( ) ; this . indexPredictedFeature = featureDefinition . getFeatureIndex ( PREDICTED_STRING_FEATURENAME ) ; this . convertToLowercase = false ; Properties props = tree . getProperties ( ) ; if ( props == null ) throw new IllegalArgumentException ( "Prediction tree does not contain properties" ) ; convertToLowercase = Boolean . parseBoolean ( props . getProperty ( "lowercase" ) ) ; context = Integer . parseInt ( props . getProperty ( "context" ) ) ; }
convenience method to load tree from an inputstream
