How can I add a open source (free) sentiment filter


(Bsongcc) #1

Anybody know if I there's a free/open source sentiment analysis API available for elasticsearch? The Alchemy API used to be the one to go to, but now it's bought by IBM and not in use anymore. Please suggest, thanks!


(Mark Walkom) #2

There is https://github.com/tylerjl/logstash-filter-sentimentalizer


(Bsongcc) #3

Thanks Mark for the prompt response. I just put the filter in the logstash config file by simply adding
filter {
sentimentalizer {
source => "message"
}
}
assuming the config file will automatically look for the plugin in the bin folder under the logstash folder. However, I am getting error message saying" "LogStash::PluginLoadingError", :message=>"Couldn't find any filter plugin named 'sentimentalizer'. Are you sure this is correct? Trying to load the sentimentalizer filter plugin resulted in this error: Problems loading the requested plugin named sentimentalizer of type filter. Error: NameError NameError", :backtrace=>..."
Do you know why? Do I have to install the plugin first? if yes, what is the command line to install it?
Sorry for my stupid questions, I am a real newby to this.


(Mark Walkom) #4

You need to install it - https://www.elastic.co/guide/en/logstash/6.0/working-with-plugins.html#installing-plugins


(Bsongcc) #5

Yes, I downloaded the entire "logstash-filter-sentimentalizer-master" folder, I also located the sentimentalizer.rb file in one of the subfolders. I copy the sentimentalizer.rb to the bin folder under elastic search.
Next I run the bin/logstash-plugin install /user/desktop/elkstack/logstash-6.0.0/bin/sentimentalizer.rb in my Mac terminal.
this is what I got : -bash: bin/logstash-plugin: No such file or directory
I don't know where am I supposed to move the "logstash-filter-sentimentalizer-master" to finish the installation. and I also don't know what exactly the path is as described in the instruction like this "bin/logstash-plugin install /path/to/logstash-output-kafka-1.0.0.gem"
Honestly they are not doing a great job on explaining the plugin installation process. At least for beginners like me. But I do appreciate your help.


(Mark Walkom) #6

/user/desktop/elkstack/logstash-6.0.0/bin/logstash-plugin install logstash-filter-sentimentalizer is all you should need to do.


(Bsongcc) #7

Thanks so much, it worked like a charm!


(system) #8

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.