use of com.amazonaws.services.comprehendmedical.model.DetectEntitiesRequest in project aws-doc-sdk-examples by awsdocs.
the class SampleAPICall method main.
public static void main() {
AWSCredentialsProvider credentials = new AWSStaticCredentialsProvider(new BasicAWSCredentials("YOUR AWS ACCESS KEY", "YOUR AWS SECRET"));
AWSComprehendMedical client = AWSComprehendMedicalClient.builder().withCredentials(credentials).withRegion("YOUR REGION").build();
DetectEntitiesRequest request = new DetectEntitiesRequest();
request.setText("cerealx 84 mg daily");
DetectEntitiesResult result = client.detectEntities(request);
result.getEntities().forEach(System.out::println);
}
Aggregations