[Python] AttributeError: module 'sst' has no attribute 'train_reader'

Discussão em 'Python' iniciado por Stack, Maio 5, 2025.

  1. Stack

    Stack Membro Participativo

    I am very new to sentiment analysis. Trying to use Stanford Sentiment Treebank(sst) and ran into an error.

    from nltk.tree import Tree
    import os
    import sst
    trees = "C:\\Users\m\data\trees"
    tree, score = next(sst.train_reader(trees))


    [Output]:

    AttributeError Traceback (most recent call last)
    <ipython-input-19-4101f90b0b16> in <module>()
    ----> 1 tree, score = next(sst.train_reader(trees))

    AttributeError: module 'sst' has no attribute 'train_reader'

    Continue reading...

Compartilhe esta Página