
Hey everyone, thanks for continuing to read my coverage on integration. This week is Viralheat’s turn in the spotlight. In case you missed it, I covered Chatterbox, Semantria, and AlchemyAPI in my last posts. Go check them out if you’re interested. Once again, I will try to be as objective as possible and highlight all aspects of the integration from my personal experience.
Viralheat
Viralheat’s main business is in social media marketing, however along with their main product, Viralheat offers several APIs for 3rd party integrators. For this project I used their sentiment API (https://app.viralheat.com/developer/sentiment).
The API itself is simple and doesn’t require any specific knowledge or skills for its usage. Viralheat offers two dedicated end-points, one for sentiment analysis, another for training. For my purposes I was interested in testing out of the box accuracy so the training end-point was not necessary for this project. The integration with Viralheat API was the simplest amongst the tested services; I did everything within a couple of hours including the additional tests and benchmarks I built for measurement purposes.
When I started the integration I did not find any ready-to-use code so I decided to implement everything myself. Fortunately, the Viralheat sentiment analysis API is quite simple. The code for Sentiment API execution looks like:
StringBuilder builder = new StringBuilder(); builder.Append("http://www.viralheat.com/api/sentiment/review.json?"); builder.AppendFormat("api_key={0}&", context.Key); builder.AppendFormat("text={0}", HttpUtility.UrlEncode(document.Value.Source));
WebRequest request = WebRequest.Create(builder.ToString()); HttpWebResponse response = request.GetResponse() as HttpWebResponse;
As with any other service, I wanted to work with native objects rather than with raw output so I implemented a small auxiliary class for deserialization from JSON output, which is the default data format used by Viralheat APIs.
[DataContract(Name = "sentiment")]
public sealed class ViralheatSentiment
{
[DataMember(Name = "text")] public string Text { get; set; } [DataMember(Name = "prob")] public double Prob { get; set; } [DataMember(Name = "mood")] public string Mood { get; set; }
Overall Opinion
Viralheat doesn’t offer any SDKs for integration with their API, however; it’s easy to integrate because of the simplicity of their exposed API. Based on my experience, the integration with Viralheat API was the easiest among the integrated services. Even deserialization into the native objects is not a big deal.
Check in next week for my integration experience with Bitext.
George Kozlov is a software engineering guru. He specializes in software research, architecture and maintenance. He co-founded Semantria, and is currently their CTO and go-to guy when things need improving.
April 3, 2020 at 8:50 am
Hi Everybody
Thanks for checking out my writing website . My name is Alton.
I have worked a long time in this niche. My aptitude for writing started at a young age. I wrote short stories as a child and eventually went on to work with my school newspaper.
This early tryst into journalism eventually led me to academic writing. There is plenty of work for professional writers. I specialize in essays, but have the skills to do all types of academic writing.
Reach out for more information about rates and a price quote. I’m looking forward to helping you.
Academic Writer – Alton Sawyer – 10 Most Common College Freshman Mistakes Confederation
April 21, 2020 at 7:50 am
Hello everyone , I’m Kalem Warner.
Welcome to my homepage . I started writing in high school after a creative writing assignment for my English teacher. I did creative writing for almost a year before I thought about doing something else.
I had always loved doing research assignments because I’m passionate about learning. When you combine writing ability with a love of learning, research paper writing only makes sense as a job.
I’m passionate about aiding the students of the future in their school career. When they don’t like their assignment , I am there to help.
Kalem Warner – Academic Writing Help – Writing recources hints Corp
November 19, 2021 at 5:21 am
Giorgio Consolini Quando Bacio Te Un Cuore Da Vendere https://aws.theblackbox.biz/62.html Bryan Smith And His Festival Orchestra Sequence Time At The Radio 2 Ballroom Vol 3
March 8, 2022 at 6:44 am
If you have any questions, consult your doctor or pharmacist.
Amiodarone generique 200 mg