text_html_output_1.png
import numpy as np # linear algebra

sent_lens = [len(sentence.split()) for sentence in train_sentences]
sent_lens[:10]

avg_len = np.mean(sent_lens)
avg_len

out_len_seq = np.percentile(sent_lens, 95)
out_len_seq