Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: split and test tweet data
Post: split and test tweet data

Hi guys i have a twitter dataset i want to train and test with NB and SVM. After cleaning and vectorizing, i am stuck on the following: 1. splitting of data into 80/20 2. fitting this into classifier...
Jmekubo General Coding Help 1 2,154 May-08-2019, 09:01 AM
    Thread: ValueError: dictionary update sequence element #0 has length 1; 2
Post: RE: ValueError: dictionary update sequence element...

thank you Yoris. i am wondering how to implement that would you help me
Jmekubo General Coding Help 4 35,580 Apr-28-2019, 07:25 PM
    Thread: ValueError: dictionary update sequence element #0 has length 1; 2
Post: RE: ValueError: dictionary update sequence element...

changing 1 to 2 still pops the following error # open nodes with open('Twitter_SNA/nodes.csv', 'r')as nodescsv: nonreader = csv.reader(nodescsv) nodes2 = [n for n in nonreader][1:] # get li...
Jmekubo General Coding Help 4 35,580 Apr-28-2019, 02:56 PM
    Thread: ValueError: dictionary update sequence element #0 has length 1; 2
Post: ValueError: dictionary update sequence element #0 ...

help resolve this error when trying to create network graph # open nodes with open('Twitter_SNA/nodes.csv', 'r')as nodescsv: nonreader = csv.reader(nodescsv) nodes2 = [n for n in nonreader][1...
Jmekubo General Coding Help 4 35,580 Apr-27-2019, 10:05 PM
    Thread: NameError: name 'lst' is not defined
Post: RE: NameError: name 'lst' is not defined

thanks i hadnt seen that
Jmekubo General Coding Help 2 3,915 Apr-27-2019, 12:34 PM
    Thread: NameError: name 'lst' is not defined
Post: NameError: name 'lst' is not defined

Guys Kindly help identify this error. # clean tweets def remove_pattern(input_txt, pattern): r = re.findall(pattern, input_txt) for i in r: input_txt = re.sub(i, '', input_txt) ...
Jmekubo General Coding Help 2 3,915 Apr-27-2019, 08:30 AM
    Thread: TypeError: 'NoneType' object is not subscriptable
Post: RE: TypeError: 'NoneType' object is not subscripta...

the labels are in a file stored in below location: so the code is supposed to load from labels_filename # input file input_filename = os.path.join(os.path.expanduser("~"),"data_folder", "bonny.json"...
Jmekubo General Coding Help 6 27,333 Apr-25-2019, 01:44 PM
    Thread: TypeError: 'NoneType' object is not subscriptable
Post: RE: TypeError: 'NoneType' object is not subscripta...

# load tweets and labels tweets = [] with open(input_filename)as inf: for line in inf: if len(line.strip()) == 0: continue tweets.append(json.loads(line))['text'] w...
Jmekubo General Coding Help 6 27,333 Apr-25-2019, 11:40 AM
    Thread: TypeError: 'NoneType' object is not subscriptable
Post: TypeError: 'NoneType' object is not subscriptable

Hi guys am new to python, pls help trouble shoot this code i get the following error when executing the code in jupiter notebook Error:-------------------------------------------------------------...
Jmekubo General Coding Help 6 27,333 Apr-25-2019, 11:20 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020