On Aug 20, 10:20 pm, Shivani <
raoshiv...@gmail.com> wrote:
> Hello Randim,
>
> Thanks so much for being so patient with me as I learn how to do this.
>
> The declaration/defn of this class is as follows in a file called
> unigram.py
>
> logger = logging.getLogger('gensim.models.unigram_model')
> class UnigramModel(interfaces.TransformationABC):
> ""class description....
>
> I tried what you suggested, just added this file to the gensim/models
> folder which is located in a folder "/home/shivani/researchtools"
> This folder is a local folder where I downloaded and ran "python
> setup.py install" from to intially install gensim.
>
> I tried the following in my python (not command line)
>
> >>from gensim.models import unigram
> >>> myC
>
> <gensim.corpora.mmcorpus.MmCorpus object at 0x9c4958c>>>> uni = gensim.models.UnigramModel(corpus=myC, id2word=myCorpus.dictionary)
>
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> AttributeError: 'module' object has no attribute 'UnigramModel'>>> uni = gensim.models.unigram_model(corpus=myC, id2word=myCorpus.dictionary)
>
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> AttributeError: 'module' object has no attribute 'unigram_model