Testing the n-Gram functions