[Scipy-tickets] [SciPy] #1582: APPCRASH error when trying to use Latent Semantic Indexing method with Gensim

SciPy Trac scipy-tickets@scipy....
Fri Jan 13 13:16:58 CST 2012


#1582: APPCRASH error when trying to use Latent Semantic Indexing method with
Gensim
--------------------+-------------------------------------------------------
 Reporter:  Shahab  |       Owner:  somebody
     Type:  defect  |      Status:  new     
 Priority:  high    |   Milestone:  0.11.0  
Component:  Other   |     Version:  0.10.0  
 Keywords:          |  
--------------------+-------------------------------------------------------

Comment(by Shahab):

 Replying to [comment:3 warren.weckesser]:
 > Thanks, Shahab, but it would be even more helpful if you could provide a
 complete script that we can simply save and run.  Include sample data,
 too, if that is what it takes to make it work.  I don't think there are
 too many gensim experts here (I've never used it), so it won't be obvious
 to us how to make an incomplete snippet actually work.



 {{{
 #Create a mini method for making corpora (plural of corpus)
 class MyCorpus(corpora.textcorpus.TextCorpus):
                  def get_texts(self):
 #bc i can't provide you with my test data, a simple text file will due in
 this area, just to make a corpus
 #i.e. read in a text file and then convert it into a list


 #This will create the necesarry corpus
 corpus_memory_friendly = MyCorpus("txtFile.txt")
 corpora.MmCorpus.serialize('./corpus.mm', corpus_memory_friendly)
         corpus = corpora.MmCorpus('./corpus.mm')

 #this will create the dictionary for the corpus
 dict = corpus_memory_friendly.dictionary


 #Finally throw dict and corpus as parameters to the def previously
 described
 }}}

 if anything is unclear just tell me, and if you need help making a corpus
 go here [http://radimrehurek.com/gensim/tut1.html]

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1582#comment:4>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list