Skip to content

Positions

Document analysis resources return position information. For example:

  • The deep linguistic analysis resource returns the positions of all the subdivisions of the text (paragraphs, sentences, phrases, tokens and atoms).
  • The keyphrase extraction resource returns the positions of main sentences, main phrases, main concepts and main lemmas.
  • The classification resources return the positions of the parts of the text help identify a certain category.
  • Information detection resources return the positions of the parts of the text corresponding to detected information.

All these positions refer to the analyzed text, that is the vale of the content property of the data object.

The starting position is returned in the start property and the ending position in the end property.

The value of the start property is the zero-based index of the first character of the block.
For example, if a text begins with:

Michael Jordan was one of the best basketball players of all time.

the start position of phrase of all time is 54:


Michael Jordan was one of the best basketball players of all time.
                                                      ↑
01234567890123456789012345678901234567890123456789012345678901234567890
0         1         2         3         4         5         6         7

The value of the end position is the zero-based index of the first character after the text block. In the example case above, the end position of the phrase is 65:


Michael Jordan was one of the best basketball players of all time.
                                                                 ↑
01234567890123456789012345678901234567890123456789012345678901234567890
0         1         2         3         4         5         6         7