Skip to content Skip to navigation


A sentiment analysis library for Python.  It takes a single word or larger text as input and will return a sentiment classification of positive, negative or neutral.  Dostoevsky's model was  trained the RuSentiment  dataset of more than 30,000 comments in VKontakte.  VK has requested that the original dataset be taken down temporarily, but  Dostoevsky allows you to download the trained vectors. 


from dostoevsky.tokenization import UDBaselineTokenizer, RegexTokenizer
from dostoevsky.embeddings import SocialNetworkEmbeddings

from dostoevsky.models import SocialNetworkModel

tokenizer = UDBaselineTokenizer() or RegexTokenizer()
embeddings_container = SocialNetworkEmbeddings()
model = SocialNetworkModel(
results = model.predict([entry.text])
sentiment = results[0]
confidence = results[1]
Tool functionality: