Count text subdivisions
DIS object provides methods to count the text subdivisions that disambiguation identified.
These methods are listed in the following table.
For example, considering this input text:
If you are a whiskey lover, you will know that it is a spirit produced from fermented grain and aged in the wood. And a spirit is an alcoholic beverage in which the alcohol content has been increased by distillation.
var sentenceCount = DIS.getSentencesCount();
sentenceCount variable to 2, since the disambiguation found two sentences in the text.
This other statement:
var tokenCount = DIS.getTokensCount();
tokenCount variable to 44 that is the number of detected tokens. Remember that also atoms are counted as tokens.
The syntax is similar for all the methods, they have no arguments and return an integer number.
Knowing the number of subdivisions of a given type is necessary to refer to a particular subdivision using its zero-based index with the other methods of the