Rosette Server - Embedded defines a series of endpoints; each endpoint performs a text analysis task. For example, the
/entities endpoint tags the entities in a text. You specify an endpoint to the API by providing its path;
/entities is an endpoint path. To invoke the API, you prepare a request object, and pass the endpoint path, the request object, and the
Class of response that the endpoint returns to the
EmbeddedRosetteAPI object. You receive, in return, a response object or an exception.
Most of the endpoints accept free text; these are the document endpoints. The other endpoints accept names, and are described later. All the document endpoints use a common class for their requests:
DocumentRequest is a generic class. The generic parameter is an option class, which is not used in simple cases. Here's a simple example:
DocumentRequest<? extends Options> request = new DocumentRequest.Builder<>()
.content("George Washington slept in Lincoln, Nebraska.")
EntitiesResponse response =
The Names Endpoints
/name-deduplication, work with the names of people, places, and organizations. These endpoints have their own request and response classes that you can read about in the javadoc.
Simple and AnnotatedText Responses
The Rosette API defines two data models for results: simple and annotated text. The simple model consists of a data structure for each endpoint that contains the essential results of the operation. For example, for entities, the simple response contains a list of
EntityMention objects, each of which contains the basic facts about a mention of an entity in document.
In contrast, the Annotated Data Model provides a comprehensive data model for text analytics. When you request an
AnnotatedText object as the response type, you get the full results of the text analytic operations that make up the endpoint.