You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/usr/local/lib/python3.6/dist-packages/normalise/class_ALPHA.py in gen_featuresetsALPHA(tagged_dict, text)
109 """Return an array for features for each item in the input dict."""
110 return np.array([give_featuresALPHA(item, text)
--> 111 for item in tagged_dict.items()],
112 dtype=float)
113
/usr/local/lib/python3.6/dist-packages/normalise/class_ALPHA.py in (.0)
109 """Return an array for features for each item in the input dict."""
110 return np.array([give_featuresALPHA(item, text)
--> 111 for item in tagged_dict.items()],
112 dtype=float)
113
/usr/local/lib/python3.6/dist-packages/normalise/class_ALPHA.py in give_featuresALPHA(item, text)
116 """Return a list of features for a dictionary item."""
117 ind, nsw, tag = item[0], item[1][0], item[1][1]
--> 118 context = gen_frame(item, text)
119 out = [
120
/usr/local/lib/python3.6/dist-packages/normalise/class_NUMB.py in gen_frame(dict_tup, text)
387 else:
388 rind = round(ind)
--> 389 full = text[rind]
390 start = ''
391 end = ''
The text was updated successfully, but these errors were encountered:
IndexError Traceback (most recent call last)
in ()
7 }
8
----> 9 pprint(normalise(cleaned_corpus))
7 frames
/usr/local/lib/python3.6/dist-packages/normalise/normalisation.py in normalise(text, tokenizer, verbose, variety, user_abbrevs)
155 return insert(tokenizer(text), verbose=verbose, variety=variety, user_abbrevs=user_abbrevs)
156 else:
--> 157 return insert(text, verbose=verbose, variety=variety, user_abbrevs=user_abbrevs)
158
159
/usr/local/lib/python3.6/dist-packages/normalise/normalisation.py in insert(text, verbose, variety, user_abbrevs)
161 (expanded_ALPHA,
162 expanded_NUMB,
--> 163 expanded_MISC) = list_NSWs(text, verbose=verbose, variety=variety, user_abbrevs=user_abbrevs)
164 out = text[:]
165 split_dict = {}
/usr/local/lib/python3.6/dist-packages/normalise/normalisation.py in list_NSWs(text, verbose, variety, user_abbrevs)
69 print("CLASSIFYING ALPHABETIC NSWs")
70 print("---------------------------\n")
---> 71 tagged_ALPHA = run_clfALPHA(ALPHA_dict, text, verbose=verbose, user_abbrevs=user_abbrevs)
72 if verbose:
73 print("CLASSIFYING NUMERIC NSWs")
/usr/local/lib/python3.6/dist-packages/normalise/class_ALPHA.py in run_clfALPHA(dic, text, verbose, user_abbrevs)
96 out.update({ind: (nsw, 'ALPHA', 'EXPN')})
97 else:
---> 98 pred_int = int(clf.predict(gen_featuresetsALPHA({ind: (nsw, tag)}, text)))
99 ntag = int_tag_dict[pred_int]
100 out.update({ind: (nsw, tag, ntag)})
/usr/local/lib/python3.6/dist-packages/normalise/class_ALPHA.py in gen_featuresetsALPHA(tagged_dict, text)
109 """Return an array for features for each item in the input dict."""
110 return np.array([give_featuresALPHA(item, text)
--> 111 for item in tagged_dict.items()],
112 dtype=float)
113
/usr/local/lib/python3.6/dist-packages/normalise/class_ALPHA.py in (.0)
109 """Return an array for features for each item in the input dict."""
110 return np.array([give_featuresALPHA(item, text)
--> 111 for item in tagged_dict.items()],
112 dtype=float)
113
/usr/local/lib/python3.6/dist-packages/normalise/class_ALPHA.py in give_featuresALPHA(item, text)
116 """Return a list of features for a dictionary item."""
117 ind, nsw, tag = item[0], item[1][0], item[1][1]
--> 118 context = gen_frame(item, text)
119 out = [
120
/usr/local/lib/python3.6/dist-packages/normalise/class_NUMB.py in gen_frame(dict_tup, text)
387 else:
388 rind = round(ind)
--> 389 full = text[rind]
390 start = ''
391 end = ''
The text was updated successfully, but these errors were encountered: