Open topic with navigation

# DocumentStats

Analyzes the text that you specify and generates basic statistics, such as the number of terms, sentences, paragraphs, and stop words in the specified text, and the number of terms that appear in IDOL Server.

Note: This is an administrative action that can be sent only from AdminClients (which are set in the `[Server]` section of the configuration file).

The following XML is an example of the output of the `DocumentStats` action.

    −<autnresponse>
    <action>DOCUMENTSTATS</action>
    <response>SUCCESS</response>
    −<responsedata>
    <sentences>2</sentences>
    <paragraphs>1</paragraphs>
    −<total>
       <total_terms>23</total_terms>
       <stopwords>10</stopwords>
       <dre_terms>13</dre_terms>
       <average_percent_dococcs>4.216</average_percent_dococcs>
       <average_percent_dredococcs>4.216</   average_percent_dredococcs>
    </total>
    −<distinct>
       <total_terms>21</total_terms>
       <stopwords>10</stopwords>
       <dre_terms>11</dre_terms>
       <average_percent_dococcs>4.522</average_percent_dococcs>
       <average_percent_dredococcs>4.522</average_percent_dredococcs>
    </distinct>
    −<characters>
       <total>134</total>
       <percent_alphabetic>80.60</percent_alphabetic>
       <percent_uppercase>1.49</percent_uppercase>
       <percent_numeric>0.00</percent_numeric>
       <percent_whitespace>16.42</percent_whitespace>
       <percent_punctuation>2.99</percent_punctuation>
       <percent_control>0.00</percent_control>
       <utf8_1-byte>134</utf8_1-byte>
       <utf8_2-byte>0</utf8_2-byte>
       <utf8_3-byte>0</utf8_3-byte>
    </characters>
    </responsedata>
    </autnresponse>

Note: To use `DocumentStats` for queries that include Wildcard terms, you must set the TermPositions parameter to `True`.

## Example

    http://12.3.4.56:9000/action=DocumentStats&Text="businesses"&LanguageType=englishASCII

This action uses port `9000` to request document statistics for the term `businesses` from IDOL Server which is located on a machine with the IP address `12.3.4.56`.

## Parameters

Parameter | Description | Required
--- | --- | ---
AnyLanguage | Allows IDOL Server to return documents in any language. |
LanguageType | The language type of the text. |
MatchID | A list of document references from which to return the term position for the specified text. |
MatchReference | A list of document references from which to return the term position for the specified text. |
QueryStats | Whether to return information about the optimal content to use for an AgentBoolean rule. |
Synchronous | Whether to run the action synchronously or asynchronously. |
Text | The text for which statistics are returned. | Yes
TermPositions | Returns a list of the positions of the occurrences of any terms that satisfy the query text. |

This action accepts the following standard ACI action parameters.

Parameter | Description
--- | ---
ActionID | A string to use to identify an ACI action.
ResponseFormat | The format of the action output.

© 2016 Hewlett Packard Enterprise Development LP | Send documentation feedback to HPE Close We welcome your comments! To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to AutonomyTPFeedback@hpe.com. Product: Topic Title: Help Topic: Feedback:

_HP_HTML5_bannerTitle.htm