Skip to content

KeyError while trying to create a topicmodel #56

@khalidkhannz78PK

Description

@khalidkhannz78PK

Hi there,

I have been trying to follow the tutorial on topic modelling on the main tethne website. I installed anaconda, tethne, nltk, and also mallet. But when I run the line

MyLDAModel = MyManager.build(Z=50, max_iter=300, prep=True)

i get the following error

Traceback (most recent call last):
File "", line 1, in
File "//anaconda/lib/python2.7/site-packages/tethne/model/managers/init.py", line 108, in build
self.prep()
File "//anaconda/lib/python2.7/site-packages/tethne/model/managers/init.py", line 89, in prep
self._generate_corpus(meta)
File "//anaconda/lib/python2.7/site-packages/tethne/model/managers/mallet.py", line 152, in _generate_corpus
vocab=self.D.features[self.feature]['index'] )
File "//anaconda/lib/python2.7/site-packages/tethne/writers/corpora.py", line 59, in to_documents
meta += [ str(metadict[p][f]) for f in metakeys ]
KeyError: '10.1525/rac.2006.16.1.95'

I will appreciate all the help in this regard

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions