[Python] Textblob-de missing deprecated module textblob.translate()

Discussão em 'Python' iniciado por Stack, Março 11, 2025.

  1. Stack

    Stack Membro Participativo

    I want to run a sentiment analysis on German headlines and would like to use textblob-de for it. After installing as described here: https://textblob-de.readthedocs.io/en/latest/readme.html#installing-upgrading, I run into the error below when running a very simple script like so:

    from textblob_de import TextBlobDE as TextBlob

    text = "drama vor lampedusa : mehr als 1000 flüchtlinge im mittelmeer vor italien gerettet"

    blob = TextBlob(text)

    print(blob.sentiment)


    The error states:


    Exception has occurred: ModuleNotFoundError No module named 'textblob.translate'
    ​

    The weird thing is that I have just now installed the package and textblob.translate is actually deprecated as stated in the change logs: https://textblob.readthedocs.io/en/dev/changelog.html

    Regardless, textblobde seems to be using it. Do you see a way around this or is this model no longer feasible for German text?

    Continue reading...

Compartilhe esta Página