Skip to content

Latest commit

 

History

History
46 lines (31 loc) · 2.8 KB

V1_annotations.md

File metadata and controls

46 lines (31 loc) · 2.8 KB
copyright link is
Copyright IBM Corp. 2017
annotations
published

Annotations

Does your message need a little more context? Sounds like you could make use of some Annotations. Annotations include information which help describe or elaborate upon the original message. Annotations may be added to messages by apps or automatically by Watson Work Services.

Annotations have a type, which help clients understand what fields to expect on the annotation and how to use that particular annotation.

Common Annotation Fields

Here are some of the common Annotation fields.

property type description
type String Helps define which other fields to expect and how to interpret the Annotation
annotationId ID An autogenerated unique ID for the Annotation
created Date Date the Annotation was created
createdBy Person ID of the creator of the Annotation
updated Date Date the Annotation was updated
updatedBy Person Person who last updated the Annotation

Note: The ID scalar type represents a unique identifier. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable.

Annotation Types

Generic annotations use the type generic and are used by applications to contribute content to a conversation.

Moment annotations use the type conversation-moment to mark the beginning of a moment and describe the conversation in the moment.

Focus annotations use the type message-focus to call attention to and describe a specific part of a message.

Information extraction annotations are a series of annotations added to messages to describe the messages, using the types message-nlp-entities, message-nlp-keywords, message-nlp-docSentiment, message-nlp-relations, message-nlp-concepts, message-nlp-taxonomy, and message-nlp-dates.

Get Annotations

You can get annotations by Listening to events in a space or Viewing a message from a conversation.

When listening to events, listen to the message-annotation-added event and identify an annotation by checking the annotationType in the event payload.

Listen to the message-annotation-edited event for updates to annotations. This includes especially periodic updates to the Moment annotations in ongoing conversations. Again, check the annotationType in the event payload.