Skip to content

JSON serializable with gensim's TFIDF matrix #2

@husseinkohy

Description

@husseinkohy

Hi,
I have a gnsim LDA model based on a TFIDF matrix. When I call "pyLDAvis.display" I get the following error.

"TypeError: 0j is not JSON serializable"

this error is not raised when I prepare the data:
pyLDAvis.gensim.prepare
or
pyLDAvis.utils.html_id_ok(pyLDAvis.utils.get_id(pyLDAvis.gensim.prepare))

similar issue is raised but a solution is not provided (bmabey/pyLDAvis#69). also, when I do not use a tfidf matrix I am able to display the results as expected.

thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions