<jupyter_start><jupyter_text>Labeling---The category names we will be using are as follows:1. `miscl.` -- Any miscellaneous emails that don't belong to one of the categories above (anything that we can't generate a generic response to)2. `conflicts` -- Anything related to midterm/final scheduling conflicts3. `attendance` -- 4. `hw` -- Anything related to homework (e.g. submissions)5. `enrollment` -- Anything related to Calcentral/course enrollment issues6. `internal`-- Anything related to course logistics, hiring, or other administrative issues7. `dsp` 8. `regrades`<jupyter_code>import pandas as pd
pd.set_option('display.max_colwidth', -1)
emails = pd.read_csv('../data/rohan_label.csv')
#emails.head()
content = emails['Body']
content[5]
#for i, em in enumerate(content):
    #print('EMAIL!!!', i, '\n', '   ', em, '\n')
l30 = [5,5,1,1]
l29 = [5,5,5,5,5,1,1,5,5,5]
l28 = [5,5,5,1,1,1,1,5,5,4]
l27 = [7,7,1,7,7,4,1,1,5,5]
l26 = [1,1,1,1,1,1,7,7,7,7]
l25 = [7,7,7,1,1,7,1,1,1,1]
l24 = [1,1,1,1,7,7,7,7,2,2]
l23 = [2,2,2,2,2,2,2,2,7,1]
l22 = [1,1,1,1,1,1,2,2,5,5]
l21 = [1,1,1,7,7,7,7,7,1,1]
l20 = [2,2,7,7,7,1,1,1,1,1]
l19 = [7,7,7,7,5,5,7,7,1,7]
l18 = [2,2,2,1,2,2,2,2,1,7]
l17 = [2,2,2,2,1,1,1,1,2,2]
l16 = [5,5,5,2,2,1,1,2,2,2]
l15 = [5,5,5,5,5,5,5,5,5,5]
l14 = [2,2,2,2,1,2,2,2,2,5]
l13 = [2,5,5,2,2,1,5,5,2,1]
l12 = [5,5,1,1,1,1,1,1,1,2]
l11 = [5,5,5,5,5,5,5,5,1,5]
l10 = [1,2,1,1,2,1,1,5,5,5]
l9 = [5,5,2,2,2,1,2,2,2,2]
l8 = [2,2,1,5,5,5,5,1,5,5]
l7 = [5,5,5,6,1,1,7,2,2,2]
l6 = [6,5,5,1,1,1,5,5,5,5]
l5 = [5,5,5,5,1,5,5,6,6,6]
l4 = [6,6,6,5,5,5,5,5,5,5]
l3 = [6,6,6,6,6,6,6,6,6,6]
l2 = [6,6,6,6,6,6,6,6,6,6]
l1 = [6,6,6,6,1,6,6,1,1,5]
l0 = [6,6,6,6,6,6,6,6,6,6]
l = l0+l1+l2+l3+l4+l5+l6+l7+l8+l9+l10+l11+l12+l13+l14+l15+l16+l17+l18+l19+l20+l21+l22+l23+l24+l25+l26+l27+l28+l29+l30
len(l)
emails['Category'] = l
emails.to_csv('../data/rohan_labeled.csv', index=False, sep=',', encoding='utf-8')<jupyter_output><empty_output><jupyter_text>Labeling Kristian's Data<jupyter_code>e2 = pd.read_csv('../data/kristian_label.csv')
#e2.head()
content = e2['Body']
#for i, em in enumerate(content):
    #print('EMAIL!!!', i, '\n', '   ', em, '\n')
lll = [0,1,2,3,4,5,6,7,8,9]
l20 = [1,1,1,1,1,1,1,1,1,8]
l21 = [8,8,8,1,1,4,4,4,4,1]
l22 = [3,1,1,4,4,7,7,4,4,1]
l23 = [1,4,4,4,3,3,3,3,3,1]
l24 = [1,1,3,3,8,8,8,8,1,1]
l25 = [8,1,8,4,4,1,7,7,1,1]
l26 = [1,1,1,1,1,1,1,2,2,6]
l27 = [1,1,4,4,4,4,4,4,4,4]
l28 = [4,4,4,4,1,4,4,1,2,2]
l29 = [2,1,2,2,2,2,2,2,2,2]
l30 = [2,1,1,1]
lll = [0,1,2,3,4,5,6,7,8,9]
l10 = [4,3,3,3,1,1,3,1,1,3]
l11 = [8,8,8,8,8,8,8,1,1,4]
l12 = [4,1,4,1,1,1,3,3,3,4]
l13 = [4,4,4,4,4,7,7,7,1,1]
l14 = [5,1,5,5,1,1,3,3,1,1]
l15 = [1,4,1,4,1,1,1,1,1,1]
l16 = [1,1,1,1,1,1,1,1,1,1]
l17 = [4,1,4,4,4,4,1,1,1,1]
l18 = [1,1,1,1,1,1,1,1,1,1]
l19 = [1,1,7,7,8,1,8,8,1,8]
l0 = [7,3,3,3,3,1,3,3,1,1]
l1 = [1,1,1,1,1,1,5,2,1,1]
l2 = [1,2,2,4,4,3,3,3,3,2]
l3 = [2,2,2,2,2,2,2,1,1,1]
l4 = [2,2,2,2,2,2,2,2,2,2]
l5 = [2,1,4,1,1,1,1,1,3,3]
l6 = [3,1,7,7,1,1,1,1,1,2]
l7 = [2,1,2,1,2,2,2,2,2,2]
l8 = [1,1,1,1,1,1,1,1,1,1]
l9 = [4,4,1,4,4,7,7,1,1,4]
l = l0+l1+l2+l3+l4+l5+l6+l7+l8+l9+l10+l11+l12+l13+l14+l15+l16+l17+l18+l19+l20+l21+l22+l23+l24+l25+l26+l27+l28+l29+l30
len(l)
e2['Category'] = l
e2.to_csv('../data/kristian_labeled.csv', index=False, sep=',', encoding='utf-8')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.31750831569398247, 'fraction_numerical': 0.25793770789234954, 'mean_word_length': 7.107843137254902, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '621126', 'license': 'MIT', 'n_tokens_mistral': 2324, 'n_tokens_neox': 2222, 'n_words': 252, 'path': 'Data Analysis and Model/exploratory_data_analysis/Labeling_Rohan.ipynb', 'repo_name': 'rexlintc/Autoreply', 'size': '3307'}