Thanks to visit codestin.com
Credit goes to github.com

Skip to content

LDA Mallet error #55

@Vinmai

Description

@Vinmai

I tried running the following command:

dlatkInterface.py -d dla_tutorial -t msgs_lda -c message_id \
    -f 'feat$1gram$msgs_lda$message_id$16to16' \
    --estimate_lda_topics \
    --lda_lexicon_name my_lda_lexicon \
    --mallet_path /path/to/mallet/bin/mallet

but I am encountering the error as below:

TopicExtractor: gensim Mallet wrapper unavailable, using Mallet directly.

-----
DLATK Interface Initiated: 2024-07-24 01:11:32
-----
Writing joined feature lines file: /Users/vinmaykhandode/lda_msgs.txt.
Yielding values with zeros for 10542 groups * 75326 feats.
Wrote joined features file to: /Users/vinmaykhandode/lda_msgs.txt
Estimating LDA topics. This may take a long time!
Estimating LDA topics using Mallet.
Traceback (most recent call last):
  File "/Users/vinmaykhandode/anaconda3/bin/dlatkInterface.py", line 2257, in <module>
    main()
  File "/Users/vinmaykhandode/anaconda3/bin/dlatkInterface.py", line 1157, in main
    state_file = lda_estimator.estimate_topics(args.printjoinedfeaturelines, args.mallet_path)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/vinmaykhandode/anaconda3/lib/python3.11/site-packages/dlatk/topicExtractor.py", line 308, in estimate_topics
    mallet = OurLdaMallet(mallet_path, id2word=corpora.Dictionary([["dummy"]]),
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: OurLdaMallet() takes no arguments
``


Could you help debug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions