ML.model
1from nltk.corpus import twitter_samples 2from nltk.data import path 3import os 4 5path.append(os.getcwd() + r"\backend\ML\trainingdata") 6 7class Model: 8 def __init__(self): 9 """ 10 set pos_data and neg_data for training data. 11 """ 12 self.pos_data = twitter_samples.strings('positive_tweets.json') 13 self.neg_data = twitter_samples.strings('negative_tweets.json')
class
Model:
8class Model: 9 def __init__(self): 10 """ 11 set pos_data and neg_data for training data. 12 """ 13 self.pos_data = twitter_samples.strings('positive_tweets.json') 14 self.neg_data = twitter_samples.strings('negative_tweets.json')