> For the complete documentation index, see [llms.txt](https://esbook.kimjmin.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://esbook.kimjmin.net/06-text-analysis/6.5-tokenizer/6.5.2-uax-url-email.md).

# 6.5.2 UAX URL Email

&#x20; 주로 사용되는 Standard 토크나이저도 `@`, `/` 같은 특수문자는 공백과 마찬가지로 제거하고 분리합니다. 그런데 요즘의 블로그 포스트나 신문기사 같은 텍스트 들에는 이메일 주소 또는 웹 URL 경로 등이 삽입되어 있는 경우가 상당히 많습니다. 이 경우 Standard 토크나이저를 사용하면 이메일 주소등이 정상적으로 인식되지 않아 문제가 될 수 있는데, 이를 방지하기 위해 사용 가능한 것이 **UAX URL Email** 토크나이저 입니다.

&#x20; **UAX URL Email** 토크나이저는 이메일 주소와 웹 URL 경로는 분리하지 않고 그대로 하나의 텀으로 저장을 합니다. 다음은 **"email address is <my-name@email.com> and website is <https://www.elastic.co>"** 문장을 각각 Standard 그리고 UAX URL Email 토크나이저로 분리 한 결과입니다.

{% tabs %}
{% tab title="request" %}
{% code title="standard 토크나이저로 문장 분석" %}

```javascript
GET _analyze
{
  "tokenizer": "standard",
  "text": "email address is my-name@email.com and website is https://www.elastic.co"
}
```

{% endcode %}
{% endtab %}

{% tab title="response" %}
{% code title="standard 토크나이저로 문장 분석 결과" %}

```javascript
{
  "tokens" : [
    {
      "token" : "email",
      "start_offset" : 0,
      "end_offset" : 5,
      "type" : "<ALPHANUM>",
      "position" : 0
    },
    {
      "token" : "address",
      "start_offset" : 6,
      "end_offset" : 13,
      "type" : "<ALPHANUM>",
      "position" : 1
    },
    {
      "token" : "is",
      "start_offset" : 14,
      "end_offset" : 16,
      "type" : "<ALPHANUM>",
      "position" : 2
    },
    {
      "token" : "my",
      "start_offset" : 17,
      "end_offset" : 19,
      "type" : "<ALPHANUM>",
      "position" : 3
    },
    {
      "token" : "name",
      "start_offset" : 20,
      "end_offset" : 24,
      "type" : "<ALPHANUM>",
      "position" : 4
    },
    {
      "token" : "email.com",
      "start_offset" : 25,
      "end_offset" : 34,
      "type" : "<ALPHANUM>",
      "position" : 5
    },
    {
      "token" : "and",
      "start_offset" : 35,
      "end_offset" : 38,
      "type" : "<ALPHANUM>",
      "position" : 6
    },
    {
      "token" : "website",
      "start_offset" : 39,
      "end_offset" : 46,
      "type" : "<ALPHANUM>",
      "position" : 7
    },
    {
      "token" : "is",
      "start_offset" : 47,
      "end_offset" : 49,
      "type" : "<ALPHANUM>",
      "position" : 8
    },
    {
      "token" : "https",
      "start_offset" : 50,
      "end_offset" : 55,
      "type" : "<ALPHANUM>",
      "position" : 9
    },
    {
      "token" : "www.elastic.co",
      "start_offset" : 58,
      "end_offset" : 72,
      "type" : "<ALPHANUM>",
      "position" : 10
    }
  ]
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="request" %}
{% code title="uax\_url\_email 토크나이저로 문장 분석" %}

```javascript
GET _analyze
{
  "tokenizer": "uax_url_email",
  "text": "email address is my-name@email.com and website is https://www.elastic.co"
}
```

{% endcode %}
{% endtab %}

{% tab title="response" %}
{% code title="letter 토크나이저로 문장 분석 결과" %}

```javascript
{
  "tokens" : [
    {
      "token" : "email",
      "start_offset" : 0,
      "end_offset" : 5,
      "type" : "<ALPHANUM>",
      "position" : 0
    },
    {
      "token" : "address",
      "start_offset" : 6,
      "end_offset" : 13,
      "type" : "<ALPHANUM>",
      "position" : 1
    },
    {
      "token" : "is",
      "start_offset" : 14,
      "end_offset" : 16,
      "type" : "<ALPHANUM>",
      "position" : 2
    },
    {
      "token" : "my-name@email.com",
      "start_offset" : 17,
      "end_offset" : 34,
      "type" : "<EMAIL>",
      "position" : 3
    },
    {
      "token" : "and",
      "start_offset" : 35,
      "end_offset" : 38,
      "type" : "<ALPHANUM>",
      "position" : 4
    },
    {
      "token" : "website",
      "start_offset" : 39,
      "end_offset" : 46,
      "type" : "<ALPHANUM>",
      "position" : 5
    },
    {
      "token" : "is",
      "start_offset" : 47,
      "end_offset" : 49,
      "type" : "<ALPHANUM>",
      "position" : 6
    },
    {
      "token" : "https://www.elastic.co",
      "start_offset" : 50,
      "end_offset" : 72,
      "type" : "<URL>",
      "position" : 7
    }
  ]
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

&#x20;  `"tokenizer": "uax_url_email"` 로 설정하여 텍스트를 분석하면 이메일 주소와 웹 URL은 그대로 남아있는 것을 확인할 수 있습니다.
