> For the complete documentation index, see [llms.txt](https://calculatedsystems.gitbook.io/cloud-nifi-processors/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://calculatedsystems.gitbook.io/cloud-nifi-processors/amazon-web-services/comprehend-api/detectkeyphrases-processor.md).

# DetectKeyPhrases Processor

Part of the AWS Processor package

This processor will take an input string and return key phrases found in the text.

## Properties

{% hint style="info" %}
All of our Comprehend processors also include these [common properties](/cloud-nifi-processors/amazon-web-services/comprehend-api.md#common-properties).
{% endhint %}

This processor does not have any unique properties outside of the common ones.

## Data Output

If the *Destination* property is set to `flowfile-attribute`, then the output of this processor will be routed to the FlowFile's `nlp.KeyPhrases` attribute, which will be created if it isn't present.

{% tabs %}
{% tab title="Output Format" %}

| Field Name   | Data Type          | Description                                 |
| ------------ | ------------------ | ------------------------------------------- |
| keyPhrases   | array of KeyPhrase | The list of key phrases detected by the API |
| {% endtab %} |                    |                                             |

{% tab title="Relevant Data Structures" %}

#### `KeyPhrase`

| Field Name   | Data Type | Description                                                                                            |
| ------------ | --------- | ------------------------------------------------------------------------------------------------------ |
| text         | string    | The raw text of the entity                                                                             |
| score        | float     | How confident the API is in its response                                                               |
| beginOffset  | int       | The number of characters this entity is offset from the beginning of the input string                  |
| endOffset    | int       | The number of characters this entity's last character is offset from the beginning of the input string |
| {% endtab %} |           |                                                                                                        |

{% tab title="Example Output" %}

```javascript
{
	"raw-input": "...": {
		"keyPhrases": [
			{
				"score": 0.9991118,
				"beginOffset": 0,
				"endOffset": 74,
				"text": "Computers are machines"
			},
			{
				"score": 0.988914,
				"beginOffset": 100,
				"endOffset": 121,
				"text": "that can perform calculations much faster than humans"
			},
			// ... plus potentially many more entries!
		]
	}
}
```

{% endtab %}
{% endtabs %}
