Skip to content

Instantly share code, notes, and snippets.

@piEsposito
Last active April 28, 2020 17:35
Show Gist options
  • Save piEsposito/bc4d891ff197940652f3b17a4ef2cc56 to your computer and use it in GitHub Desktop.
Save piEsposito/bc4d891ff197940652f3b17a4ef2cc56 to your computer and use it in GitHub Desktop.
lengths = [len(i) for i in tqdm(encoded_texts)]
length_as_series = pd.Series(lengths)
plt.title("Probability Density Function for text lengths")
sns.distplot(length_as_series)
max_pad_length = length_as_series.quantile(0.9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment