All Downloads are FREE. Search and download functionalities are using the official Maven repository.

technology.semi.weaviate.client.v1.contextionary.api.ConceptsGetter Maven / Gradle / Ivy

There is a newer version: 4.0.0
Show newest version
package technology.semi.weaviate.client.v1.contextionary.api;

import technology.semi.weaviate.client.Config;
import technology.semi.weaviate.client.base.BaseClient;
import technology.semi.weaviate.client.base.ClientResult;
import technology.semi.weaviate.client.base.Response;
import technology.semi.weaviate.client.base.Result;
import technology.semi.weaviate.client.v1.contextionary.model.C11yWordsResponse;

public class ConceptsGetter extends BaseClient implements ClientResult {

  private String concept;

  public ConceptsGetter(Config config) {
    super(config);
  }

  public ConceptsGetter withConcept(String concept) {
    this.concept = concept;
    return this;
  }

  @Override
  public Result run() {
    String path = String.format("/modules/text2vec-contextionary/concepts/%s", concept);
    Response resp = sendGetRequest(path, C11yWordsResponse.class);
    return new Result<>(resp);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy