textblob-de — textblob-de 0.4.4a1 documentation (original) (raw)

Release 0.4.4a1 (Changelog)

TextBlob is a Python (2 and 3) library for processing textual data. It is being developed by Steven Loria. It provides a simple API for diving into common natural language processing (NLP) tasks such as part-of-speech tagging, noun phrase extraction, sentiment analysis, classification, translation, and more.

`textblob-de` is the German language extension for TextBlob.

from textblob_de import TextBlobDE

text = ''' "Der Blob" macht in seiner unbekümmert-naiven Weise einfach nur Spass. Er hat eben den gewissen Charme, bei dem auch die eher hölzerne Regie und das konfuse Drehbuch nicht weiter stören. '''

blob = TextBlobDE(text) blob.tags # [('Der', 'DT'), ('Blob', 'NN'), ('macht', 'VB'), # ('in', 'IN'), ('seiner', 'PRP$'), ...]

blob.noun_phrases # WordList(['Der Blob', 'seiner unbekümmert-naiven Weise', # 'den gewissen Charme', 'hölzerne Regie', # 'konfuse Drehbuch'])

for sentence in blob.sentences: print(sentence.sentiment.polarity)

1.0

0.0

blob.translate(to="es") # '" The Blob " hace a su manera ingenua...'

For a complete overview of TextBlob ‘s features, see documentation of the main TextBlob library.

The docs of the German language extension focus on additions/differences toTextBlob and provide a detailed API reference.