Check for existing n-grams before generating n-grams, to improve performance when re-adding texts to the database. Closes #26.