Text this: A Greedy Clustering Algorithm Based on Interval Pattern Concepts and the Problem of Optimal Box Positioning