[{'role': 'system', 'content': "You are an expert in machine learning and your task is to classify code snippets into one of the following categories: ['helper_functions', 'load_data', 'data_exploration', 'data_preprocessing', 'evaluation', 'modelling', 'prediction', 'result_visualization', 'save_results', 'comment_only']."}, {'role': 'user', 'content': 'Identify the single most appropriate category to which the provided code belongs. Provide your response as a single category label without any additional information, commentary, or personal opinions.\\nPython Code:def build_features(data):\n    """Generates features from input data"""\n    features = []\n    sum_good = 0\n    for i in range(0,len(data)):\n        fi = []\n        dataNext = data.loc[i]\n        text = dataNext["Text"]\n        #print(visualise(dataNext))\n        doc=nlp(text)\n        Aoff = dataNext["A-offset"]\n        Boff = dataNext["B-offset"]\n        Poff = dataNext["Pronoun-offset"]\n        lth = len(text)\n        \n        for token in doc:\n            if(token.idx==Aoff):\n                Atoken = token\n            if(token.idx==Boff):\n                Btoken = token\n            if(token.idx==Poff):\n                Ptoken=token\n        Arank, Aroot = get_rank(Atoken)\n        Brank, Broot = get_rank(Btoken)\n        Prank, Proot = get_rank(Ptoken)\n        \n        graph = Graph()\n        \n        for token in doc:\n            graph.add_edge(token, token.head, 1, 4)\n        \n        sent_root = []\n        for sent in doc.sents:\n            sent_root.append(sent.root)\n        for j in range(len(sent_root)-1):\n            graph.add_edge(sent_root[j], sent_root[j+1],1, 4)\n        try:\n            _, Alen = dijsktra(graph, Atoken, Ptoken)\n        except:\n            Alen = 300\n        try:\n            _, Blen = dijsktra(graph, Btoken, Ptoken)\n        except:\n            Blen = 300\n        \n        \n        sent_num = len(sent_root)\n        for i in range(len(sent_root)):\n            if Aroot == sent_root[i]:\n                Atop = i\n            if Broot == sent_root[i]:\n                Btop = i\n            if Proot == sent_root[i]:\n                Ptop = i\n        \n        fi.append(Aoff/lth)#0\n        fi.append(Boff/lth)#1\n        fi.append(Poff/lth)#2\n\n        fi.append(1.0*Atop/sent_num)#3\n        fi.append(1.0*Btop/sent_num)#4\n        fi.append(1.0*Ptop/sent_num)#5\n\n        fi.append(Arank/10)#6\n        fi.append(Brank/10)#7\n        fi.append(Prank/10)#8\n        \n        #fi.append(Atoken.similarity(Ptoken))#9\n        #fi.append(Btoken.similarity(Ptoken))#10\n        \n        #fi.append(Alen/300)#9\n        #fi.append(Blen/300)#10\n        \n        #fi.append(child_count(Aroot))#11\n        #fi.append(child_count(Broot))#12\n        #fi.append(child_count(Proot))#13\n        \n        features.append(fi)\n    return np.vstack(features)\n\ndef swap_raws(data, i, j):\n    """Swap the ith and jth column of the data"""\n    new_data = np.copy(data)\n    temp = np.copy(new_data[:, i])\n    new_data[:,i] = new_data[:,j]\n    new_data[:,j] = temp\n    return new_data'}, {'role': 'assistant', 'content': 'helper_functions'}]