Obtaining annotations

For documents in PubAnnotation, annotations can be obtained from REST web services. To obtain annotations, PubAnnotation can talk with a web service which

  • takes a piece of text through the parameter, text, and
  • responses with annotations to the text.

To obtain automatic annotations for a document

  1. Go to a document page (or a division page in case of PMC document) of your project.
    If your are logged in and the document belongs to one of your projects, you will find the interface to request annotations from a web service.
    open the editor
  2. Enter the URL of an annotation service. If you do not know one, see below.
  3. Enter the prefix for the annotations from the annotation service.
    • Note that individual annotation services may not know about each other, and there is a chance of id confliction among annotations produced by different services, which may cause an unexpected result. By specifying unique prefixes to different annotation services, id confliction can be avoided.
    • A typical prefix may be a short simple character string. It may be discriptive, e.g., ‘gene’, or just simple enumerations, e.g. ‘L1’, ‘L2’, which does not matter much, as long the prefixes are maintained unique to each other within a project.
    • Giving prefixes properly is particularly important when annotations are obtained in the ‘add’ mode (See below).
  4. Choose the storing mode: replace or add.
    • In the replace mode, the obtained annotations will replace current annotations. In other words, current annotations will be all deleted before the newly obtained annotations are stored.
    • In the add mode, current annotations will be preserved and the obtained annotations will be additionally stored.
  5. Click the button, Request annotation, then PubAnnotation will “post” the text of the document to the web service, receive the response, and store it in your project, if the response is verified as valid annotations.

PubAnnotation-compatible annotation web services

For an annotation web service to be compatible with PubAnnotation, it has to take either

  • a piece of text through the parameter variable, text, e.g.