Пример #1
0
  public Document TextGetTargetedSentiment(
      String text, String target, AlchemyAPI_TargetedSentimentParams params)
      throws IOException, SAXException, ParserConfigurationException, XPathExpressionException {
    CheckText(text);
    CheckText(target);

    params.setText(text);
    params.setTarget(target);

    return POST("TextGetTargetedSentiment", "text", params);
  }
Пример #2
0
  public Document URLGetTargetedSentiment(
      String url, String target, AlchemyAPI_TargetedSentimentParams params)
      throws IOException, SAXException, ParserConfigurationException, XPathExpressionException {
    CheckURL(url);
    CheckText(target);

    params.setUrl(url);
    params.setTarget(target);

    return GET("URLGetTargetedSentiment", "url", params);
  }
Пример #3
0
  public Document HTMLGetTargetedSentiment(
      String html, String url, String target, AlchemyAPI_TargetedSentimentParams params)
      throws IOException, SAXException, ParserConfigurationException, XPathExpressionException {
    CheckHTML(html, url);
    CheckText(target);

    params.setHtml(html);
    params.setUrl(url);
    params.setTarget(target);

    return POST("HTMLGetTargetedSentiment", "html", params);
  }