[{'role': 'system', 'content': "You are an expert in machine learning and your task is to classify the code snippets into categories from the provided list of categories. List of categories: ['helper_functions', 'load_data', 'data_exploration', 'data_preprocessing', 'evaluation', 'modelling', 'prediction', 'result_visualization', 'save_results', 'comment_only']"}, {'role': 'user', 'content': "Identify to which category the provided code belongs and assign the code snippet to at least 1 but up to 5 categories based on the probabilities, ignore if the probability of the category is negligible. Strictly provide your response as a list. Avoid providing any additional information, commentary, or personal opinions.\\nPython Code:import nltk\nfrom nltk.tokenize import word_tokenize\nimport numpy as np\nimport random\nimport pickle\nfrom collections import Counter\nfrom nltk.stem import WordNetLemmatizer\nfrom nltk.stem.lancaster import LancasterStemmer\nstemmer = LancasterStemmer()\nlemmatizer = WordNetLemmatizer()\nhm_lines = 100000\ndef create_lexicon(pos,neg):\nlexicon = []\nwith open(pos,'r') as f:\ncontents = f.readlines()\nfor l in contents[:hm_lines]:\nall_words = word_tokenize(l)\nlexicon += list(all_words)\nwith open(neg,'r') as f:\ncontents = f.readlines()\nfor l in contents[:hm_lines]:\nall_words = word_tokenize(l)\nlexicon += list(all_words)\nlexicon = [stemmer.stem(i.lower()) for i in lexicon]\nw_counts = Counter(lexicon)\nl2 = []\nfor w in w_counts:\nif 1000 > w_counts[w] > 50:\nl2.append(w)\nprint('# words:', len(l2))\nreturn l2\ndef sample_handling(sample,lexicon,classification):\nfeatureset = []\nwith open(sample,'r') as f:\ncontents = f.readlines()\nfor l in contents[:hm_lines]:\ncurrent_words = word_tokenize(l.lower())\ncurrent_words = [stemmer.stem(i.lower()) for i in current_words]\nfeatures = np.zeros(len(lexicon))\nfor word in current_words:\nif word.lower() in lexicon:\nindex_value = lexicon.index(word.lower())\nfeatures[index_value] += 1\nfeatures = list(features)\nfeatureset.append([features,classification])\nreturn featureset\ndef create_feature_sets_and_labels(pos,neg,test_size = 0.15):\nlexicon = create_lexicon(pos,neg)\nfeatures = []\nfeatures += sample_handling('pos.txt',lexicon,[1,0])\nfeatures += sample_handling('neg.txt',lexicon,[0,1])\nrandom.shuffle(features)\nfeatures = np.array(features)\ntesting_size = int(test_size*len(features))\ntrain_x = list(features[:,0][:-testing_size])\ntrain_y = list(features[:,1][:-testing_size])\ntest_x = list(features[:,0][-testing_size:])\ntest_y = list(features[:,1][-testing_size:])\nreturn train_x,train_y,test_x,test_y\nif __name__ == '__main__':\ntrain_x,train_y,test_x,test_y = create_feature_sets_and_labels('pos.txt','neg.txt')"}, {'role': 'assistant', 'content': "['helper_functions', 'load_data', 'data_exploration']"}]