using jQuery ajax request to get ngrams