Multilevel N-grams for authorship attribution and profiling