Skip to content

Instantly share code, notes, and snippets.

@language-engineering
Created September 25, 2012 09:57
Show Gist options
  • Select an option

  • Save language-engineering/3780987 to your computer and use it in GitHub Desktop.

Select an option

Save language-engineering/3780987 to your computer and use it in GitHub Desktop.
from random import sample
sentences = corpus_reader.sents()
#Randomly sample 20 sentences from all the sentences in the corpus
random_sample = sample(sentences, 20)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment