Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created January 31, 2021 07:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/7ca2f627be3bc2119df7bcd507602da8 to your computer and use it in GitHub Desktop.
Save amankharwal/7ca2f627be3bc2119df7bcd507602da8 to your computer and use it in GitHub Desktop.
from nltk.probability import FreqDist
# Find frequency of sentence
fdist_sent = FreqDist(sents)
fdist_sent.most_common(10)
# Plot
fdist_sent.plot(10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment