<commit_before># Discovery

## Installation

##### Maven

```xml
<dependency>
  <groupId>com.ibm.watson</groupId>
  <artifactId>discovery</artifactId>
  <version>9.2.0</version>
</dependency>
```

##### Gradle

```gradle
'com.ibm.watson:discovery:9.2.0'
```

## Usage

This SDK supports both the Discovery v1 and v2 APIs. Please note that the Discovery v2 API is accessible **only** on Cloud Pak for Data.

Otherwise, the APIs are fairly similar, offering the ability to manage collections of documents and query them for insights. You can learn more about the Discovery service [here](https://cloud.ibm.com/docs/discovery?topic=discovery-gs-api).

### Using Discovery v1

```java
// Make sure to use the Discovery v1 import!<commit_msg>docs: remove cp4d limitation for disco v2 in readme<commit_after># Discovery

## Installation

##### Maven

```xml
<dependency>
  <groupId>com.ibm.watson</groupId>
  <artifactId>discovery</artifactId>
  <version>9.2.0</version>
</dependency>
```

##### Gradle

```gradle
'com.ibm.watson:discovery:9.2.0'
```

## Usage

This SDK supports both the Discovery v1 and v2 APIs.

Otherwise, the APIs are fairly similar, offering the ability to manage collections of documents and query them for insights. You can learn more about the Discovery service [here](https://cloud.ibm.com/docs/discovery?topic=discovery-gs-api).

### Using Discovery v1

```java
// Make sure to use the Discovery v1 import!
{'fraction_non_alphanumeric': 0.13165266106442577, 'fraction_numerical': 0.01610644257703081, 'mean_word_length': 4.738955823293173, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '765446', 'n_tokens_mistral': 494, 'n_tokens_neox': 425, 'n_words': 150}