Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created January 31, 2021 07:27
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/a69c6b710f5f78f1a26ead98e2bc4567 to your computer and use it in GitHub Desktop.
Save amankharwal/a69c6b710f5f78f1a26ead98e2bc4567 to your computer and use it in GitHub Desktop.
import pandas as pd
from nltk.sentiment.vader import SentimentIntensityAnalyzer
from nltk.stem import LancasterStemmer, WordNetLemmatizer
from nltk.corpus import stopwords
from nltk.probability import FreqDist
import re
import unicodedata
import nltk
import json
import inflect
import matplotlib.pyplot as plt
import json
# load json into python, assign to 'data'
with open('your_posts_1.json') as file:
data = json.load(file)
print(type(data)) # a list
print(type(data[0])) # first object in the list: a dictionary
print(len(data))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment