Advertisement
sesquiipedalian

Untitled

Jul 29th, 2023
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. import pandas as pd
  2. import numpy as np
  3.  
  4. np.random.seed(8)
  5.  
  6. def load_NYT_news():
  7. df = pd.read_json('business_dump.json')
  8. return df
  9.  
  10. def predict_sentiment(data):
  11. return np.random.choice(range(len(data)), len(data), replace=False)
  12.  
  13. def main():
  14. data = load_NYT_news()['title']
  15. print(predict_sentiment(data))
  16.  
  17. if __name__ == '__main__':
  18. main()
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement