RussianSentimentAnalyzer

FREEMIUM
Durch Insider | Aktualisiert 5 days ago | Text Analysis
Health Check

N/A

Follower: 107
Ressourcen:
Produktwebsite Nutzungsbedingungen
API-Ersteller:
Rapid account: Insider
Insider
insider
Melden Sie sich bei Rate API an
Bewertung: 5 - Stimmen: 1

README

www.semanticanalyzer.info

Annotating sentiment with RussianSentimentAnalyzer API in Java

In this post we will show how easy it is to start using RussianSentimentAnalyzer API on mashape from your Java code.

package com.semanticanalyzer;

import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.JsonNode;
import com.mashape.unirest.http.Unirest;
import com.mashape.unirest.http.exceptions.UnirestException;

public class RussianSentimentAnalyzerMashapeClient {

    private final static String mashapeKey = "[PUT_YOUR_MASHAPE_KEY_HERE]";

    public static void main(String[] args) throws UnirestException {

        String textToAnnotate = "'ВТБ кстати неплохой банк)'";
        String targetObject = "'ВТБ'";

        // These code snippets use an open-source library. http://unirest.io/java
        HttpResponse response = Unirest.post("https://russiansentimentanalyzer.p.mashape.com/ru/sentiment/polarity/json/")
                .header("X-Mashape-Key", mashapeKey)
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
                .body("{'text':" + textToAnnotate + ",'object_keywords':" + targetObject + ",'output_format':'json'}")
                .asJson();

        System.out.println("Input text = " + textToAnnotate + "\n" + "Target object:" + targetObject);
        System.out.println("RussianSentimentAnalyzer response:" + response.getBody().toString());
    }
}

In the code snippet above we’ve used the mashape’s Unirest API, that makes HTTP requesting in Java super easy.

All you really need to care about is to register at mashape.com, sign up for RussianSentimentAnalyzer API and insert your unique mashape key into the code, in place of “PUT_YOUR_MASHAPE_KEY_HERE”, as a value of the mashapeKey variable.

If everything has been set right, execute the code and you should see the following output:

Input text = 'ВТБ кстати неплохой банк)'
Target object:'ВТБ'
RussianSentimentAnalyzer response:{"sentiment":"POSITIVE","synonyms":"[ВТБ]"}

Now you can easily hook the API up into your cool Java app and annotate texts in Russian for sentiment!

You’ll find the code on our github here: https://github.com/semanticanalyzer/nlproc_sdk_sample_code

Как качественно анализировать объектную тональность при помощи RussianSentimentAnalyzer API

Привет!

В этой короткой заметке мы хотели бы уделить особое внимание тому, как RussianSentimentAnalyzer API анализирует тональность по отношению к конкретному объекту. Передача объекта в поле object_keywords значительно повышает качество получаемой разметки на тональность.

Рассмотрим текст, присланный одним из пользователей:

Проблемы со связью так и не решены. Сегодня тестировали систему, вводили телефон билайн номеризменён, после чего поступал звонок, сообщали что это входящий звонок и далее абонент недоступен или находится вне зоны действия сети, хотя это не так. Тут же перезванивали на этот номер, просто с телефона и он был доступен. Проверяли ни один раз и все одно и тоже: через заявку на сайте он недоступен, если звонить просто с этой же трубки, то все ОК.

В случае, если мы не передаём ни одного объекта, мы получаем NEGATIVE в качестве метки тональности всего текста. Однако в тексте видно, что присутствует и позитивная тональность.

Если передать объект “связь”, то получаем NEGATIVE метку тональности.
Для объекта “номер” мы получаем POSITIVE метку тональности.

Надеемся, что эта информация и пример окажутся вам полезны при работе с RussianSentimentAnalyzer API.

Команда SemanticAnalyzer

Semaadfasdf

SemanticAnalyzer company: www.semanticanalyzer.info

Annotating sentiment with RussianSentimentAnalyzer API in Java

In this post we will show how easy it is to start using RussianSentimentAnalyzer API on mashape from your Java code.

package com.semanticanalyzer;

import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.JsonNode;
import com.mashape.unirest.http.Unirest;
import com.mashape.unirest.http.exceptions.UnirestException;

public class RussianSentimentAnalyzerMashapeClient {

    private final static String mashapeKey = "[PUT_YOUR_RAPIDAPI_KEY_HERE]";

    public static void main(String[] args) throws UnirestException {

        String textToAnnotate = "'ВТБ кстати неплохой банк)'";
        String targetObject = "'ВТБ'";

        // These code snippets use an open-source library. http://unirest.io/java
        HttpResponse response = Unirest.post("https://dmitrykey-russiansentimentanalyzer-v1.p.rapidapi.com/rsa/sentiment/polarity/jsons")
                .header("X-Mashape-Key", mashapeKey)
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
                .body("{'text':" + textToAnnotate + ",'object_keywords':" + targetObject + ",'output_format':'json'}")
                .asJson();

        System.out.println("Input text = " + textToAnnotate + "\n" + "Target object:" + targetObject);
        System.out.println("RussianSentimentAnalyzer response:" + response.getBody().toString());
    }
}

In the code snippet above we’ve used the mashape’s Unirest API, that makes HTTP requesting in Java super easy.

All you really need to care about is to register at mashape.com, sign up for RussianSentimentAnalyzer API and insert your unique mashape key into the code, in place of “PUT_YOUR_MASHAPE_KEY_HERE”, as a value of the mashapeKey variable.

If everything has been set right, execute the code and you should see the following output:

Input text = 'ВТБ кстати неплохой банк)'
Target object:'ВТБ'
RussianSentimentAnalyzer response:{"sentiment":"POSITIVE","synonyms":"[ВТБ]"}

Now you can easily hook the API up into your cool Java app and annotate texts in Russian for sentiment!

You’ll find the code on our github here: https://github.com/semanticanalyzer/nlproc_sdk_sample_code

Как качественно анализировать объектную тональность при помощи RussianSentimentAnalyzer API

Привет!

В этой короткой заметке мы хотели бы уделить особое внимание тому, как RussianSentimentAnalyzer API анализирует тональность по отношению к конкретному объекту. Передача объекта в поле object_keywords значительно повышает качество получаемой разметки на тональность.

Рассмотрим текст, присланный одним из пользователей:

Проблемы со связью так и не решены. Сегодня тестировали систему, вводили телефон билайн номеризменён, после чего поступал звонок, сообщали что это входящий звонок и далее абонент недоступен или находится вне зоны действия сети, хотя это не так. Тут же перезванивали на этот номер, просто с телефона и он был доступен. Проверяли ни один раз и все одно и тоже: через заявку на сайте он недоступен, если звонить просто с этой же трубки, то все ОК.

В случае, если мы не передаём ни одного объекта, мы получаем NEGATIVE в качестве метки тональности всего текста. Однако в тексте видно, что присутствует и позитивная тональность.

Если передать объект “связь”, то получаем NEGATIVE метку тональности.
Для объекта “номер” мы получаем POSITIVE метку тональности.

Надеемся, что эта информация и пример окажутся вам полезны при работе с RussianSentimentAnalyzer API.

Команда SemanticAnalyzer

test

www.semanticanalyzer.info

Annotating sentiment with RussianSentimentAnalyzer API in Java

In this post we will show how easy it is to start using RussianSentimentAnalyzer API on mashape from your Java code.

package com.semanticanalyzer;

import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.JsonNode;
import com.mashape.unirest.http.Unirest;
import com.mashape.unirest.http.exceptions.UnirestException;

public class RussianSentimentAnalyzerMashapeClient {

    private final static String mashapeKey = "[PUT_YOUR_MASHAPE_KEY_HERE]";

    public static void main(String[] args) throws UnirestException {

        String textToAnnotate = "'ВТБ кстати неплохой банк)'";
        String targetObject = "'ВТБ'";

        // These code snippets use an open-source library. http://unirest.io/java
        HttpResponse response = Unirest.post("https://russiansentimentanalyzer.p.mashape.com/ru/sentiment/polarity/json/")
                .header("X-Mashape-Key", mashapeKey)
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
                .body("{'text':" + textToAnnotate + ",'object_keywords':" + targetObject + ",'output_format':'json'}")
                .asJson();

        System.out.println("Input text = " + textToAnnotate + "\n" + "Target object:" + targetObject);
        System.out.println("RussianSentimentAnalyzer response:" + response.getBody().toString());
    }
}

In the code snippet above we’ve used the mashape’s Unirest API, that makes HTTP requesting in Java super easy.

All you really need to care about is to register at mashape.com, sign up for RussianSentimentAnalyzer API and insert your unique mashape key into the code, in place of “PUT_YOUR_MASHAPE_KEY_HERE”, as a value of the mashapeKey variable.

If everything has been set right, execute the code and you should see the following output:

Input text = 'ВТБ кстати неплохой банк)'
Target object:'ВТБ'
RussianSentimentAnalyzer response:{"sentiment":"POSITIVE","synonyms":"[ВТБ]"}

Now you can easily hook the API up into your cool Java app and annotate texts in Russian for sentiment!

You’ll find the code on our github here: https://github.com/semanticanalyzer/nlproc_sdk_sample_code

Как качественно анализировать объектную тональность при помощи RussianSentimentAnalyzer API

Привет!

В этой короткой заметке мы хотели бы уделить особое внимание тому, как RussianSentimentAnalyzer API анализирует тональность по отношению к конкретному объекту. Передача объекта в поле object_keywords значительно повышает качество получаемой разметки на тональность.

Рассмотрим текст, присланный одним из пользователей:

Проблемы со связью так и не решены. Сегодня тестировали систему, вводили телефон билайн номеризменён, после чего поступал звонок, сообщали что это входящий звонок и далее абонент недоступен или находится вне зоны действия сети, хотя это не так. Тут же перезванивали на этот номер, просто с телефона и он был доступен. Проверяли ни один раз и все одно и тоже: через заявку на сайте он недоступен, если звонить просто с этой же трубки, то все ОК.

В случае, если мы не передаём ни одного объекта, мы получаем NEGATIVE в качестве метки тональности всего текста. Однако в тексте видно, что присутствует и позитивная тональность.

Если передать объект “связь”, то получаем NEGATIVE метку тональности.
Для объекта “номер” мы получаем POSITIVE метку тональности.

Надеемся, что эта информация и пример окажутся вам полезны при работе с RussianSentimentAnalyzer API.

Команда SemanticAnalyzer

In this post we will show how easy it is to start using RussianSentimentAnalyzer API on mashape from your Java code.

package com.semanticanalyzer;

import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.JsonNode;
import com.mashape.unirest.http.Unirest;
import com.mashape.unirest.http.exceptions.UnirestException;

public class RussianSentimentAnalyzerMashapeClient {

    private final static String mashapeKey = "[PUT_YOUR_MASHAPE_KEY_HERE]";

    public static void main(String[] args) throws UnirestException {

        String textToAnnotate = "'ВТБ кстати неплохой банк)'";
        String targetObject = "'ВТБ'";

        // These code snippets use an open-source library. http://unirest.io/java
        HttpResponse response = Unirest.post("https://russiansentimentanalyzer.p.mashape.com/ru/sentiment/polarity/json/")
                .header("X-Mashape-Key", mashapeKey)
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
                .body("{'text':" + textToAnnotate + ",'object_keywords':" + targetObject + ",'output_format':'json'}")
                .asJson();

        System.out.println("Input text = " + textToAnnotate + "\n" + "Target object:" + targetObject);
        System.out.println("RussianSentimentAnalyzer response:" + response.getBody().toString());
    }
}

In the code snippet above we’ve used the mashape’s Unirest API, that makes HTTP requesting in Java super easy.

All you really need to care about is to register at mashape.com, sign up for RussianSentimentAnalyzer API and insert your unique mashape key into the code, in place of “PUT_YOUR_MASHAPE_KEY_HERE”, as a value of the mashapeKey variable.

If everything has been set right, execute the code and you should see the following output:

Input text = 'ВТБ кстати неплохой банк)'
Target object:'ВТБ'
RussianSentimentAnalyzer response:{"sentiment":"POSITIVE","synonyms":"[ВТБ]"}

Now you can easily hook the API up into your cool Java app and annotate texts in Russian for sentiment!

You’ll find the code on our github here: https://github.com/semanticanalyzer/nlproc_sdk_sample_code
Привет!

В этой короткой заметке мы хотели бы уделить особое внимание тому, как RussianSentimentAnalyzer API анализирует тональность по отношению к конкретному объекту. Передача объекта в поле object_keywords значительно повышает качество получаемой разметки на тональность.

Рассмотрим текст, присланный одним из пользователей:

Проблемы со связью так и не решены. Сегодня тестировали систему, вводили телефон билайн номеризменён, после чего поступал звонок, сообщали что это входящий звонок и далее абонент недоступен или находится вне зоны действия сети, хотя это не так. Тут же перезванивали на этот номер, просто с телефона и он был доступен. Проверяли ни один раз и все одно и тоже: через заявку на сайте он недоступен, если звонить просто с этой же трубки, то все ОК.

В случае, если мы не передаём ни одного объекта, мы получаем NEGATIVE в качестве метки тональности всего текста. Однако в тексте видно, что присутствует и позитивная тональность.

Если передать объект “связь”, то получаем NEGATIVE метку тональности.
Для объекта “номер” мы получаем POSITIVE метку тональности.

Надеемся, что эта информация и пример окажутся вам полезны при работе с RussianSentimentAnalyzer API.

Команда SemanticAnalyzer