Skip to content

Instantly share code, notes, and snippets.

@language-engineering
Last active October 11, 2015 23:58
Show Gist options
  • Select an option

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

Select an option

Save language-engineering/3939408 to your computer and use it in GitHub Desktop.
from sussex_nltk.corpus_readers import AmazonReviewCorpusReader
#Get some document ready for formatting
dvd_pos = AmazonReviewCorpusReader().positive().category("dvd").documents()
#Format the documents ready for NB classifier, but also pass in the feature extractor
dvd_pos_formatted = format_data(dvd_pos, "pos", feature_extractor)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment