7.8.17. TokenTrigram

7.8.17.1. Summary

TokenTrigram is similar to TokenBigram. The differences between them is token unit.

7.8.17.2. Syntax

TokenTrigram hasn’t parameter:

TokenTrigram

7.8.17.3. Usage

If normalizer is used, TokenTrigram uses white-space-separate like tokenize method for ASCII characters. TokenTrigram uses trigram tokenize method for non-ASCII characters.

If TokenTrigram tokenize non-ASCII charactors, TokenTrigram uses 3 character per token as below example.

Execution example:

tokenize TokenTrigram "日本語の勉強" NormalizerAuto
# [
#   [
#     0,
#     1546586185.123834,
#     0.0003123283386230469
#   ],
#   [
#     {
#       "value": "日本語",
#       "position": 0,
#       "force_prefix": false,
#       "force_prefix_search": false
#     },
#     {
#       "value": "本語の",
#       "position": 1,
#       "force_prefix": false,
#       "force_prefix_search": false
#     },
#     {
#       "value": "語の勉",
#       "position": 2,
#       "force_prefix": false,
#       "force_prefix_search": false
#     },
#     {
#       "value": "の勉強",
#       "position": 3,
#       "force_prefix": false,
#       "force_prefix_search": false
#     },
#     {
#       "value": "勉強",
#       "position": 4,
#       "force_prefix": false,
#       "force_prefix_search": false
#     },
#     {
#       "value": "強",
#       "position": 5,
#       "force_prefix": false,
#       "force_prefix_search": false
#     }
#   ]
# ]