Sequential pattern mining framework