getPOS NLP

getPOS API retrieve parts of speech counts for any content block.

Syntax

getPOS(blockKey: Number) : Promise<object>

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import INKAPI from './inkapi.js'

INKAPI.ready(async () => {

  const NLP = INKAPI.nlp;

  const data = await NLP.getPOS(1);

  console.log(data);

  /*
    Console Output:

    {
      "ADJECTIVE": 2,
      "ADVERB": 2,
      "CONJUNCTION": 2,
      "DETERMINER": 3,
      "INTERJECTION": 0,
      "NOUN": 5,
      "PREPOSITION": 1,
      "PRONOUN": 3,
      "VERB": 4,
      "CARDINAL": 0
    }

  */

});

Parameters

Name

Type

Description

blockKey

Number

Required. Key of the block to be selected.

Note

Learn more about how blocks work in INK editor here.