> 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.1-standard-letter-whitespace.md).

# 6.5.1 Standard, Letter, Whitespace

&#x20; 일반적으로 가장 많이 사용되고 기능이 유사하지만 분명히 다른 특징이 있는 **Standard**, **Letter**, **Whitespace** 3가지 토크나이저를 먼저 살펴보도록 하겠습니다. 각자 따로 설명하는 것 보다 동일한 문장이 위의 세 토큰 필터에서 어떻게 다르게 분리가 되는지를 살펴보면서 설명을 하겠습니다. 분석할 문장은 **"THE quick.brown\_FOx jumped! @ 3.5 meters."** 입니다.

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

```javascript
GET _analyze
{
  "tokenizer": "standard",
  "text": "THE quick.brown_FOx jumped! @ 3.5 meters."
}
```

{% endcode %}
{% endtab %}

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

```javascript
{
  "tokens" : [
    {
      "token" : "THE",
      "start_offset" : 0,
      "end_offset" : 3,
      "type" : "<ALPHANUM>",
      "position" : 0
    },
    {
      "token" : "quick.brown_FOx",
      "start_offset" : 4,
      "end_offset" : 19,
      "type" : "<ALPHANUM>",
      "position" : 1
    },
    {
      "token" : "jumped",
      "start_offset" : 20,
      "end_offset" : 26,
      "type" : "<ALPHANUM>",
      "position" : 2
    },
    {
      "token" : "3.5",
      "start_offset" : 30,
      "end_offset" : 33,
      "type" : "<NUM>",
      "position" : 3
    },
    {
      "token" : "meters",
      "start_offset" : 34,
      "end_offset" : 40,
      "type" : "<ALPHANUM>",
      "position" : 4
    }
  ]
}
```

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

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

```javascript
GET _analyze
{
  "tokenizer": "letter",
  "text": "THE quick.brown_FOx jumped! @ 3.5 meters."
}
```

{% endcode %}
{% endtab %}

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

```javascript
{
  "tokens" : [
    {
      "token" : "THE",
      "start_offset" : 0,
      "end_offset" : 3,
      "type" : "word",
      "position" : 0
    },
    {
      "token" : "quick",
      "start_offset" : 4,
      "end_offset" : 9,
      "type" : "word",
      "position" : 1
    },
    {
      "token" : "brown",
      "start_offset" : 10,
      "end_offset" : 15,
      "type" : "word",
      "position" : 2
    },
    {
      "token" : "FOx",
      "start_offset" : 16,
      "end_offset" : 19,
      "type" : "word",
      "position" : 3
    },
    {
      "token" : "jumped",
      "start_offset" : 20,
      "end_offset" : 26,
      "type" : "word",
      "position" : 4
    },
    {
      "token" : "meters",
      "start_offset" : 34,
      "end_offset" : 40,
      "type" : "word",
      "position" : 5
    }
  ]
}
```

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

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

```javascript
GET _analyze
{
  "tokenizer": "whitespace",
  "text": "THE quick.brown_FOx jumped! @ 3.5 meters."
}
```

{% endcode %}
{% endtab %}

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

```javascript
{
  "tokens" : [
    {
      "token" : "THE",
      "start_offset" : 0,
      "end_offset" : 3,
      "type" : "word",
      "position" : 0
    },
    {
      "token" : "quick.brown_FOx",
      "start_offset" : 4,
      "end_offset" : 19,
      "type" : "word",
      "position" : 1
    },
    {
      "token" : "jumped!",
      "start_offset" : 20,
      "end_offset" : 27,
      "type" : "word",
      "position" : 2
    },
    {
      "token" : "@",
      "start_offset" : 28,
      "end_offset" : 29,
      "type" : "word",
      "position" : 3
    },
    {
      "token" : "3.5",
      "start_offset" : 30,
      "end_offset" : 33,
      "type" : "word",
      "position" : 4
    },
    {
      "token" : "meters.",
      "start_offset" : 34,
      "end_offset" : 41,
      "type" : "word",
      "position" : 5
    }
  ]
}
```

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

&#x20; 앞 예제들의 response 탭을 열어 각각의 결과를 확인 해 보면 다음과 같습니다.

&#x20; 먼저 **Standard** 토크나이저는 공백으로 텀을 구분하면서 "@"과 같은 일부 특수문자를 제거합니다. "jumped!"의 느낌표, "meters."의 마침표 처럼 단어 끝에 있는 특수문자는 제거되지만 "quick.brown\_FOx" 또는 "3.5" 처럼 중간에 있는 마침표나 밑줄 등은 제거되거나 분리되지 않는 것을 확인할 수 있습니다.

&#x20; **Letter** 토크나이저는 알파벳을 제외한 모든 공백, 숫자, 기호들을 기준으로 텀을 분리합니다. "quick.brown\_FOx" 같은 단어도 "quick", "brown", "FOx" 처럼 모두 분리된 것을 확인할 수 있습니다.

&#x20; **Whitespace** 토크나이저는 스페이스, 탭, 그리고 줄바꿈 같은 공백만을 기준으로 텀을 분리합니다. 특수문자 "@" 그리고 "meters." 의 마지막에 있는 마침표도 사라지지 않고 그대로 남아있는 것을 확인할 수 있습니다.

&#x20; 3개의 토크나이저 중에 **Letter** 토크나이저의 경우 검색 범위가 넓어져서 원하지 않는 결과가 많이 나올 수 있고, 반대로 **Whitespace**의 경우 특수문자를 거르지 않기 때문에 정확하게 검색을 하지 않으면 검색 결과가 나오지 않을 수 있습니다. 따라서 보통은 **Standard** 토크나이저를 많이 사용합니다.


---

# 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://esbook.kimjmin.net/06-text-analysis/6.5-tokenizer/6.5.1-standard-letter-whitespace.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.
