[Tutor] gensim to generate document vectors

2015-08-17 Thread Joshua Valdez
continue else: print item ###I'm not sure how to produce the vectors from here and this doesn't work## sent_id = 0for item in model: print model["SENT_"+str(sent_id)] sent_id += 1 I'm not sure where to go from here so any help is appreciated. Than

Re: [Tutor] memory error

2015-07-02 Thread Joshua Valdez
#x27;m not sure what to do here) is it possible to look ahead in a loop to discover other lines and then backtrack? I think this may be the solution but again I'm not sure how I would execute such a command structure... *Joshua Valdez* *Computational Linguist : Cognitive Scientist

Re: [Tutor] memory error

2015-07-01 Thread Joshua Valdez
g? Here is an example of the last few lines of my output: [[Category:Asteroids| ]] [[Category:Spaceflight]] h4rxxfq37qg30eqegyf4vfvkqn3r142 *Joshua Valdez* *Computational Linguist : Cognitive Scientist * (440)-231-0479 jd...@case.edu | j...@uw.edu | jo...

[Tutor] memory error

2015-06-30 Thread Joshua Valdez
ace("_"," ") page_titles.append(item) # with open(sys.argv[1], 'r') as wiki: soup = BeautifulSoup(wiki) wiki.closed wiki_page = soup.find_all("page") del soup for item in wiki_page: title = item.title.get_tex

[Tutor] python and Beautiful soup question

2015-06-21 Thread Joshua Valdez
8') pages = cleaned.split('\n') pages = pages[4:-2] test = test = port_ID.items()[0] page_ID = 1 for item in pages: test_file.write('%s %s %s\n' % (test[0],item,page_ID)) page_ID+=1 page_ID = 1 Hi I posted this on stac