Finding maximal sequential patterns in text document collections and single documents