> For the complete documentation index, see [llms.txt](https://guilhermesantos.gitbook.io/niro-health/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guilhermesantos.gitbook.io/niro-health/modules/similarity-filter.md).

# Similarity Filter

### Imports

{% tabs %}
{% tab title="Service" %}

```typescript
import { SimilarityFilterService } from 'niro-health';
```

{% endtab %}

{% tab title="Module" %}

```typescript
import { SimilarityFilterModule } from 'niro-health';
```

{% endtab %}

{% tab title="Interface" %}

```typescript
import type { ISimilarityFilterService } from 'niro-health';
```

{% endtab %}
{% endtabs %}

### Method of Use

To use this module, you need to inject it into the desired service.

{% code overflow="wrap" %}

```typescript
import { Module } from '@nestjs/common';
import {
  SimilarityFilterService,
} from 'niro-health';
import { AppController } from './app.controller';
import { AppService } from './app.service';

@Module({
  controllers: [AppController],
  providers: [
    AppService,
    {
      provide: 'ISimilarityFilterService',
      useClass: SimilarityFilterService,
    },
  ],
})
export class AppModule {}
```

{% endcode %}

Injecting the module into our service.

```typescript
import { Inject, Injectable } from '@nestjs/common';
import type { ISimilarityFilterService } from 'niro-health';

@Injectable()
export class AppService {
  constructor(
    @Inject('ISimilarityFilterService')
    private readonly similarityFilterService: ISimilarityFilterService,
  ) {}

  public async execute() {
    return this.similarityFilterService.execute(
      {
        name: 'John Doe',
      },
      {
        name: 'John Doe',
        age: 24,
        address: {
          street: 'test',
          number: 10,
        },
      },
      '50%',
    )
  }
}
```

### Without dependencies

You won't need to connect the pieces with any other module.

### Methods

<table><thead><tr><th width="125.33333333333331">Method</th><th width="103" align="center">Scope</th><th>Description</th></tr></thead><tbody><tr><td><code>execute</code></td><td align="center"><code>public</code></td><td><code>Filter objects by similarity (full, 50%, any-one).</code></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guilhermesantos.gitbook.io/niro-health/modules/similarity-filter.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
