# ExactMatchStringEvaluator

> **Class** in `langchain_classic`

📖 [View in docs](https://reference.langchain.com/python/langchain-classic/evaluation/exact_match/base/ExactMatchStringEvaluator)

Compute an exact match between the prediction and the reference.

Examples:
----------
>>> evaluator = ExactMatchChain()
>>> evaluator.evaluate_strings(
        prediction="Mindy is the CTO",
        reference="Mindy is the CTO",
    )  # This will return {'score': 1.0}

>>> evaluator.evaluate_strings(
        prediction="Mindy is the CTO",
        reference="Mindy is the CEO",
    )  # This will return {'score': 0.0}

## Signature

```python
ExactMatchStringEvaluator(
    self,
    *,
    ignore_case: bool = False,
    ignore_punctuation: bool = False,
    ignore_numbers: bool = False,
    **_: Any = {},
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `ignore_case` | `bool` | No | Whether to ignore case when comparing strings. (default: `False`) |
| `ignore_punctuation` | `bool` | No | Whether to ignore punctuation when comparing strings. (default: `False`) |
| `ignore_numbers` | `bool` | No | Whether to ignore numbers when comparing strings. (default: `False`) |

## Extends

- `StringEvaluator`

## Constructors

```python
__init__(
    self,
    *,
    ignore_case: bool = False,
    ignore_punctuation: bool = False,
    ignore_numbers: bool = False,
    **_: Any = {},
)
```

| Name | Type |
|------|------|
| `ignore_case` | `bool` |
| `ignore_punctuation` | `bool` |
| `ignore_numbers` | `bool` |


## Properties

- `ignore_case`
- `ignore_punctuation`
- `ignore_numbers`
- `requires_input`
- `requires_reference`
- `input_keys`
- `evaluation_name`

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/02991cb4cf2063d51a07268edafb05fe53de1826/libs/langchain/langchain_classic/evaluation/exact_match/base.py#L9)