Skip to content Skip to navigation

Dostoevsky

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. 

Example: 

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(
     tokenizer=tokenizer,
     embeddings_container=embeddings_container,
      lemmatize=False,
      )
 
results = model.predict([entry.text])
sentiment = results[0]
confidence = results[1]
 
 
Type: 
Tool
Tool functionality: