analyzeEntities method

  1. @override
Future<AnalyzeEntitiesResponse> analyzeEntities(
  1. AnalyzeEntitiesRequest request
)
override

Finds named entities (currently proper names and common nouns) in the text along with entity types, probability, mentions for each entity, and other properties.

Throws a http.ClientException if there were problems communicating with the API service. Throws a ServiceException if the API method failed for any reason.

Implementation

@override
Future<AnalyzeEntitiesResponse> analyzeEntities(
  AnalyzeEntitiesRequest request,
) async {
  if (isClosed) throw StateError('Service is closed');

  if (_analyzeEntities case final analyzeEntities?) {
    return analyzeEntities(request);
  }
  throw UnsupportedError('analyzeEntities');
}