Statistical Learning for Structural Patterns with Trees