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 HPE Content Component.

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 HPE Content Component which is located on a machine with the IP address `12.3.4.56`.

## Parameters

Parameter | Description | Required
--- | --- | ---
AnyLanguage | Allows HPE Content Component 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. |
QueryAnalysis | Returns information about the elements of a query. |
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.
EncryptResponse | Encrypt the output.
FileName | The file to write output to.
ForceTemplateRefresh | Forces the server to load the template from disk.
Output | Writes output to a file.
ResponseFormat | The format of the action output.
Template | The template to use for the action output.
TemplateParamCSVs | A list of variables to use for the specified template.

© 2017 Hewlett Packard Enterprise Development LP | Send documentation feedback to HPE Close Send documentation feedback 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. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_HP_HTML5_bannerTitle.htm