Exemple #1
0
  public Document URLGetRankedNamedEntities(String url, AlchemyAPI_NamedEntityParams params)
      throws IOException, SAXException, ParserConfigurationException, XPathExpressionException {
    CheckURL(url);

    params.setUrl(url);

    return GET("URLGetRankedNamedEntities", "url", params);
  }
Exemple #2
0
  public Document HTMLGetRankedNamedEntities(
      String html, String url, AlchemyAPI_NamedEntityParams params)
      throws IOException, SAXException, ParserConfigurationException, XPathExpressionException {
    CheckHTML(html, url);

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

    return POST("HTMLGetRankedNamedEntities", "html", params);
  }
  public String URLGetRankedConcepts(String url)
      throws IOException, SAXException, ParserConfigurationException, XPathExpressionException,
          ExtractorDocumentLevelException {
    CheckURL(url);

    AlchemyAPI_NamedEntityParams params = new AlchemyAPI_NamedEntityParams();
    params.setUrl(url);
    params.setOutputMode(AlchemyAPI_NamedEntityParams.OUTPUT_JSON);
    params.setShowSourceText(true);

    return POST("URLGetRankedConcepts", "url", params);
  }
  public String URLGetRankedKeywords(String url)
      throws IOException, SAXException, ParserConfigurationException, XPathExpressionException,
          ExtractorDocumentLevelException {
    CheckURL(url);

    AlchemyAPI_NamedEntityParams params = new AlchemyAPI_NamedEntityParams();
    params.setUrl(url);
    params.setOutputMode(AlchemyAPI_NamedEntityParams.OUTPUT_JSON);
    params.setShowSourceText(true);
    if (sentimentEnabled) {
      params.setCustomParameters("sentiment", "1");
    }

    return POST("URLGetRankedKeywords", "url", params);
  }