File: normalizer_nfkc.md

package info (click to toggle)
groonga 15.0.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 163,080 kB
  • sloc: ansic: 770,564; cpp: 48,925; ruby: 40,447; javascript: 10,250; yacc: 7,045; sh: 5,602; python: 2,821; makefile: 1,672
file content (812 lines) | stat: -rw-r--r-- 28,153 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
<!-- groonga-command -->
<!-- database: normalisers -->

(normalizer-nfkc)=

# `NormalizerNFKC`

## Summary

```{versionadded} 14.1.3

```

`NormalizerNFKC` normalizes text by Unicode NFKC (Normalization Form Compatibility Composition).

The Unicode version can be specified by option.

In addition to Unicode version, this normalizer has ohter options that can change behavior.

## Syntax

`NormalizerNFKC` has optional parameter.

No options:

```
NormalizerNFKC
```

`NormalizerNFKC` normalizes text by Unicode NFKC (Normalization Form Compatibility Composition).

Specify option:

```
NormalizerNFKC("version", "16.0.0")

NormalizerNFKC("unify_kana", true)

NormalizerNFKC("unify_kana_case", true)

NormalizerNFKC("unify_kana_voiced_sound_mark", true)

NormalizerNFKC("unify_hyphen", true)

NormalizerNFKC("unify_prolonged_sound_mark", true)

NormalizerNFKC("unify_hyphen_and_prolonged_sound_mark", true)

NormalizerNFKC("unify_middle_dot", true)

NormalizerNFKC("unify_katakana_v_sounds", true)

NormalizerNFKC("unify_katakana_bu_sound", true)

NormalizerNFKC("unify_to_katakana", true)

NormalizerNFKC("unify_to_romaji", true)

NormalizerNFKC("remove_symbol", true)

NormalizerNFKC("unify_katakana_gu_small_sounds", true)

NormalizerNFKC("unify_katakana_di_sound", true)

NormalizerNFKC("unify_katakana_wo_sound", true)

NormalizerNFKC("unify_katakana_zu_small_sounds", true)

NormalizerNFKC("unify_katakana_du_sound", true)

NormalizerNFKC("unify_katakana_trailing_o", true)

NormalizerNFKC("unify_katakana_du_small_sounds", true)

NormalizerNFKC("unify_kana_prolonged_sound_mark", true)

NormalizerNFKC("unify_kana_hyphen", true)

NormalizerNFKC("unify_latin_alphabet_with", true)
```

Specify multiple options:

```
NormalizerNFKC("version", "16.0.0", "unify_to_romaji", true, "unify_kana_case", true, "unify_hyphen_and_prolonged_sound_mark", true)
```

`NormalizerNFKC` also specify multiple options as above. You can also specify mingle multiple options except above example.

## Usage

### Simple usage

Here is an example of `NormalizerNFKC`. `NormalizerNFKC` normalizes text by Unicode NFKC (Normalization Form Compatibility Composition).

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc.md
normalize NormalizerNFKC "©" WITH_TYPES
```

Here is an example of {ref}`normalizer-nfkc-version` option.
You can specify the Unicode version for this option.

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc-version.md
normalize 'NormalizerNFKC("version", "16.0.0")' "©" WITH_TYPES
```

Here is an example of {ref}`normalizer-nfkc-unify-kana` option.

This option enables that same pronounced characters in all of full-width Hiragana, full-width Katakana and half-width Katakana are regarded as the same character as below.

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc-unify-kana.md
normalize 'NormalizerNFKC("unify_kana", true)' "あイウェおヽヾ" WITH_TYPES
```

Here is an example of {ref}`normalizer-nfkc-unify-kana-case` option.

This option enables that large and small versions of same letters in all of full-width Hiragana, full-width Katakana and half-width Katakana are regarded as the same character as below.

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc-unify-kana-case-hiragana.md
normalize \
  'NormalizerNFKC("unify_kana_case", true)' \
  "ぁあぃいぅうぇえぉおゃやゅゆょよゎわゕかゖけ" \
  WITH_TYPES
```

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc-unify-kana-case-katakana.md
normalize \
  'NormalizerNFKC("unify_kana_case", true)' \
  "ァアィイゥウェエォオャヤュユョヨヮワヵカヶケ" \
  WITH_TYPES
```

Here is an example of {ref}`normalizer-nfkc-unify-kana-voiced-sound-mark` option.

This option enables that letters with/without voiced sound mark and semi voiced sound mark in all of full-width Hiragana, full-width Katakana and half-width Katakana are regarded as the same character as below.

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc-unify-voiced-sound-mark-hiragana.md
normalize \
  'NormalizerNFKC("unify_kana_voiced_sound_mark", true)' \
  "かがきぎくぐけげこごさざしじすずせぜそぞただちぢつづてでとどはばぱひびぴふぶぷへべぺほぼぽ" \
  WITH_TYPES
```

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc-unify-voiced-sound-mark-katakana.md
normalize \
  'NormalizerNFKC("unify_kana_voiced_sound_mark", true)' \
  "カガキギクグケゲコゴサザシジスズセゼソゾタダチヂツヅテデトドハバパヒビピフブプヘベペホボポ" \
  WITH_TYPES
```

Here is an example of {ref}`normalizer-nfkc-unify-hyphen` option.
This option enables normalize hyphen to "-" (U+002D HYPHEN-MINUS) as below.

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc-unify-hyphen.md
normalize \
  'NormalizerNFKC("unify_hyphen", true)' \
  "-˗֊‐‑‒–⁃⁻₋−" \
  WITH_TYPES
```

Here is an example of {ref}`normalizer-nfkc-unify-prolonged-sound-mark` option.
This option enables normalize prolonged sound to "-" (U+30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK) as below.

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc-unify-prolonged-sound-mark.md
normalize \
  'NormalizerNFKC("unify_prolonged_sound_mark", true)' \
  "ー—―─━ー" \
  WITH_TYPES
```

Here is an example of {ref}`normalizer-nfkc-unify-hyphen-and-prolonged-sound-mark` option.
This option enables normalize hyphen and prolonged sound to "-" (U+002D HYPHEN-MINUS) as below.

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc-unify-hyphen-and-prolonged-sound-mark.md
normalize \
  'NormalizerNFKC("unify_hyphen_and_prolonged_sound_mark", true)' \
  "-˗֊‐‑‒–⁃⁻₋− ﹣- ー—―─━ー" \
  WITH_TYPES
```

Here is an example of {ref}`normalizer-nfkc-unify-middle-dot` option.
This option enables normalize middle dot to "·" (U+00B7 MIDDLE DOT) as below.

You can use it with {ref}`normalizer-nfkc-remove-symbol` to remove all characters like middle dot.

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc-unify-middle-dot.md
normalize \
  'NormalizerNFKC("unify_middle_dot", true)' \
  "·ᐧ•∙⋅⸱・・" \
  WITH_TYPES
```

Here is an example of {ref}`normalizer-nfkc-unify-katakana-v-sounds` option.
This option enables normalize "ヴァヴィヴヴェヴォ" to "バビブベボ" as below.

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc-unify-katakana-v-sounds.md
normalize \
  'NormalizerNFKC("unify_katakana_v_sounds", true)' \
  "ヴァヴィヴヴェヴォヴ" \
  WITH_TYPES
```

Here is an example of {ref}`normalizer-nfkc-unify-katakana-bu-sounds` option.
This option enables normalize "ヴァヴィヴゥヴェヴォ" to "ブ" as below.

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc-unify-katakana-bu-sounds.md
normalize \
  'NormalizerNFKC("unify_katakana_bu_sound", true)' \
  "ヴァヴィヴヴェヴォヴ" \
  WITH_TYPES
```

Here is an example of {ref}`normalizer-nfkc-unify-to-katakana` option.
This option normalizes hiragana to katakana.

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc-unify-to-katakana.md
normalize \
  'NormalizerNFKC("unify_to_katakana", true)' \
  "ゔぁゔぃゔゔぇゔぉ" \
  WITH_TYPES
```

Here is an example of {ref}`normalizer-nfkc-unify-to-romaji` option.
This option enables normalize hiragana and katakana to romaji as below.

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc-unify-to-romaji.md
normalize \
  'NormalizerNFKC("unify_to_romaji", true)' \
  "アァイィウゥエェオォ" \
  WITH_TYPES
```

Here is an example of {ref}`normalizer-nfkc-remove-symbol` option.
This option removes symbols (e.g. #, !, ", &, %, ...) as below.

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc-remove-symbol.md
normalize \
  'NormalizerNFKC("remove_symbol", true)' \
  "#This & is %% a pen." \
  WITH_TYPES
```

Here is an example of {ref}`normalizer-nfkc-unify-katakana-gu-small-sounds` option.
This option enables to normalize "グァグィグェグォ" to "ガギゲゴ" as below.

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc-katakana-gu-small-sounds.md
normalize \
  'NormalizerNFKC("unify_katakana_gu_small_sounds", true)' \
  "グァグィグェグォ" \
  WITH_TYPES
```

Here is an example of {ref}`normalizer-nfkc-unify-katakana-di-sound` option.
This option enables to normalize "ヂ" to "ジ" as below.

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc-unify-katakana-di-sound.md
normalize \
  'NormalizerNFKC("unify_katakana_di_sound", true)' \
  "ヂ" \
  WITH_TYPES
```

Here is an example of {ref}`normalizer-nfkc-unify-katakana-wo-sound` option.
This option enables to normalize "ヲ" to "オ" as below.

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc-unify-katakana-wo-sound.md
normalize \
  'NormalizerNFKC("unify_katakana_wo_sound", true)' \
  "ヲ" \
  WITH_TYPES
```

Here is an example of {ref}`normalizer-nfkc-unify-katakana-zu-small-sounds` option.
This option enables to normalize "ズァズィズェズォ" to "ザジゼゾ" as below.

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc-unify-katakana-zu-small-sounds.md
normalize \
  'NormalizerNFKC("unify_katakana_zu_small_sounds", true)' \
  "ズァズィズェズォ" \
  WITH_TYPES
```

Here is an example of {ref}`normalizer-nfkc-unify-katakana-du-sound` option.
This option enables to normalize "ヅ" to "ズ" as below.

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc-unify-katakana-du-sound.md
normalize \
  'NormalizerNFKC("unify_katakana_du_sound", true)' \
  "ヅ" \
  WITH_TYPES
```

Here is an example of {ref}`normalizer-nfkc-unify-katakana-trailing-o` option.
This option enables to normalize "オ" to "ウ" when the vowel in the previous letter is "オ" as below.

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc-unify-katakana-trailing-o.md
normalize \
  'NormalizerNFKC("unify_katakana_trailing_o", true)' \
  "オオコオソオトオノオ" \
  WITH_TYPES
```

Here is an example of {ref}`normalizer-nfkc-unify-katakana-du-small-sounds` option.
This option enables to normalize "ヅァヅィヅェヅォ" to "ザジゼゾ".

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc-unify-katakana-du-small-sounds.md
normalize \
  'NormalizerNFKC("unify_katakana_du_small_sounds", true)' \
  "ヅァヅィヅェヅォ" \
  WITH_TYPES
```

Here is an example of {ref}`normalizer-nfkc-unify-kana-prolonged-sound-mark` option.
This option enables to normalize "ー" (U+30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK)
to a vowel of a previous kana letter.

If a previous kana letter is "ん" , "ー" is normalized to "ん",
And a previous kana letter is "ン" , "ー" is normalized to "ン".

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc-unify-kana-prolonged-sound-mark.md
normalize \
  'NormalizerNFKC("unify_kana_prolonged_sound_mark", true)' \
  "カーキークーケーコー" \
  WITH_TYPES
```

Here is an example of {ref}`normalizer-nfkc-unify-kana-hyphen` option.
This option enables to normalize "-" (U+002D HYPHEN-MINUS) to a vowel of a previous kana letter.

If a previous kana letter is "ん" , "-" is normalized to "ん",
And a previous kana letter is "ン" , "-" is normalized to "ン".

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc-unify-kana-hyphen.md
normalize \
  'NormalizerNFKC("unify_kana_hyphen", true)' \
  "カ-キ-ク-ケ-コ-" \
  WITH_TYPES
```

Here is an example of {ref}`normalizer-nfkc-unify-latin-alphabet-with` option.
This option enables that alphabets with diacritical mark and alphabets without diacritical mark regarded as the same character as below.

However, this feature focus on only LATIN (SMALL|CAPITAL) LETTER X WITH XXX. It doesn't support LATIN (SMALL|CAPITAL) LETTER X + COMBINING XXX characters.

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc-unify-latin-alphabet-with.md
normalize \
  'NormalizerNFKC("unify_latin_alphabet_with", true)' \
  "ngoằn" \
  WITH_TYPES
```

### Advanced usage

#### With `TokenMecab`

You can output romaji of specific a part of speech with using to combine
`TokenMecab` and `NormalizerNFKC` as below.

First of all, you extract reading of a noun with excluding non-independent word and suffix of person name with `target_class` option and `include_reading` option.

Next, you normalize reading of the noun that extracted with `unify_to_romaji` option of `NormalizerNFKC`.

<!-- groonga-command -->

```{include} ../../example/reference/normalizers/normalizer-nfkc-unify-to-romaji-complex.md
tokenize \
  'TokenMecab("target_class", "-名詞/非自立", "target_class", "-名詞/接尾/人名", "target_class", "名詞", "include_reading", true)' \
  '彼の名前は山田さんのはずです。'
normalize \
  'NormalizerNFKC("unify_to_romaji", true)' \
  "カレ" \
  WITH_TYPES
normalize \
  'NormalizerNFKC("unify_to_romaji", true)' \
  "ナマエ" \
  WITH_TYPES
normalize \
  'NormalizerNFKC("unify_to_romaji", true)' \
  "ヤマダ" \
  WITH_TYPES
```

#### Use `unify_to_katakana` with other options

{ref}`normalizer-nfkc-unify-to-katakana` can be combined with the following options to equate special katakana with general katakana.

- {ref}`normalizer-nfkc-unify-katakana-v-sounds`

  - Equivalent: "ゔぁゔぃゔゔぇゔぉ", "ばびぶべぼ", "ヴァヴィヴヴェヴォ" and "バビブベボ"

- {ref}`normalizer-nfkc-unify-katakana-gu-small-sounds`

  - Equivalent: "ぐぁぐぃぐぇぐぉ", "がぎげご", "グァグィグェグォ" and "ガギゲゴ"

- {ref}`normalizer-nfkc-unify-katakana-zu-small-sounds`

  - Equivalent: "ずぁずぃずぇずぉ", "ざじぜぞ", "ズァズィズェズォ" and "ザジゼゾ"

- {ref}`normalizer-nfkc-unify-katakana-wo-sound`

  - Equivalent: "お", "を", "オ" and "ヲ"

- {ref}`normalizer-nfkc-unify-katakana-di-sound`

  - Equivalent: "じ", "ぢ", "ジ" and "ヂ"

- {ref}`normalizer-nfkc-unify-katakana-du-sound`

  - Equivalent: "ず", "づ", "ズ" and "ヅ"

For example, using `unify_to_katakana` and `unify_katakana_v_sounds` together, you can search "バイオリン", "ヴァイオリン", "ばいおりん" and "ゔぁいおりん" with "ばいおりん".

(normalizer-nfkc-parameters)=

## Parameters

### Optional parameter

There are optional parameters as below.

(normalizer-nfkc-version)=

#### `version`

This option specifies the Unicode version.

Here are the available versions.

```{eval-rst}
.. list-table::
   :header-rows: 1

   * - Unicode version
     - Value
     - Note
   * - 16.0.0
     - ``"16.0.0"``
     - This is the default value.
   * - 15.0.0
     - ``"15.0.0"``
     - Same as :doc:`./normalizer_nfkc150`
   * - 13.0.0
     - ``"13.0.0"``
     - Same as :doc:`./normalizer_nfkc130`
   * - 12.1.0
     - ``"12.1.0"``
     - Same as :doc:`./normalizer_nfkc121`
   * - 10.0.0
     - ``"10.0.0"``
     - Same as :doc:`./normalizer_nfkc100`
   * - 5.0.0
     - ``"5.0.0"``
     - Same as :doc:`./normalizer_nfkc51` (It is called ``NormalizerNFKC51``, but it is for Unicode version 5.0)
```

(normalizer-nfkc-unify-kana)=

#### `unify_kana`

This option enables that same pronounced characters in all of full-width Hiragana, full-width Katakana and half-width Katakana are regarded as the same character.

(normalizer-nfkc-unify-kana-case)=

#### `unify_kana_case`

This option enables that large and small versions of same letters in all of full-width Hiragana, full-width Katakana and half-width Katakana are regarded as the same character.

(normalizer-nfkc-unify-kana-voiced-sound-mark)=

#### `unify_kana_voiced_sound_mark`

This option enables that letters with/without voiced sound mark and semi voiced sound mark in all of full-width Hiragana, full-width Katakana and half-width Katakana are regarded as the same character.

(normalizer-nfkc-unify-hyphen)=

#### `unify_hyphen`

This option enables normalize hyphen to "-" (U+002D HYPHEN-MINUS).

Hyphen of the target of normalizing is as below.

- "-" (U+002D HYPHEN-MINUS)
- "֊" (U+058A ARMENIAN HYPHEN)
- "˗" (U+02D7 MODIFIER LETTER MINUS SIGN)
- "‐" (U+2010 HYPHEN)
- "—" (U+2014 EM DASH)
- "⁃" (U+2043 HYPHEN BULLET)
- "⁻" (U+207B SUPERSCRIPT MINUS)
- "₋" (U+208B SUBSCRIPT MINUS)
- "−" (U+2212 MINUS SIGN)

(normalizer-nfkc-unify-prolonged-sound-mark)=

#### `unify_prolonged_sound_mark`

This option enables normalize prolonged sound to "-" (U+30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK).

Prolonged sound of the target of normalizing is as below.

- "—" (U+2014 EM DASH)
- "―" (U+2015 HORIZONTAL BAR)
- "─" (U+2500 BOX DRAWINGS LIGHT HORIZONTAL)
- "━" (U+2501 BOX DRAWINGS HEAVY HORIZONTAL)
- "ー" (U+30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK)
- "ー" (U+FF70 HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK)

(normalizer-nfkc-unify-hyphen-and-prolonged-sound-mark)=

#### `unify_hyphen_and_prolonged_sound_mark`

This option enables normalize hyphen and prolonged sound to "-" (U+002D HYPHEN-MINUS).

Hyphen and prolonged sound of the target normalizing is below.

- "-" (U+002D HYPHEN-MINUS)
- "֊" (U+058A ARMENIAN HYPHEN)
- "˗" (U+02D7 MODIFIER LETTER MINUS SIGN)
- "‐" (U+2010 HYPHEN)
- "—" (U+2014 EM DASH)
- "⁃" (U+2043 HYPHEN BULLET)
- "⁻" (U+207B SUPERSCRIPT MINUS)
- "₋" (U+208B SUBSCRIPT MINUS)
- "−" (U+2212 MINUS SIGN)
- "—" (U+2014 EM DASH)
- "―" (U+2015 HORIZONTAL BAR)
- "─" (U+2500 BOX DRAWINGS LIGHT HORIZONTAL)
- "━" (U+2501 BOX DRAWINGS HEAVY HORIZONTAL)
- "ー" (U+30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK)
- "ー" (U+FF70 HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK)

(normalizer-nfkc-unify-middle-dot)=

#### `unify_middle_dot`

This option enables normalize middle dot to "·" (U+00B7 MIDDLE DOT).

Middle dot of the target of normalizing is as below.

- "·" (U+00B7 MIDDLE DOT)
- "ᐧ" (U+1427 CANADIAN SYLLABICS FINAL MIDDLE DOT)
- "•" (U+2022 BULLET)
- "∙" (U+2219 BULLET OPERATOR)
- "⋅" (U+22C5 DOT OPERATOR)
- "⸱" (U+2E31 WORD SEPARATOR MIDDLE DOT)
- "・" (U+30FB KATAKANA MIDDLE DOT)
- "・" (U+FF65 HALFWIDTH KATAKANA MIDDLE DOT)

You can use it with {ref}`normalizer-nfkc-remove-symbol` to remove all characters like middle dot.

(normalizer-nfkc-unify-katakana-v-sounds)=

#### `unify_katakana_v_sounds`

This option enables normalize "ヴァヴィヴヴェヴォ" to "バビブベボ".

(normalizer-nfkc-unify-katakana-bu-sounds)=

#### `unify_katakana_bu_sound`

This option enables normalize "ヴァヴィヴゥヴェヴォ" to "ブ".

(normalizer-nfkc-unify-to-katakana)=

#### `unify_to_katakana`

This option normalizes hiragana to katakana.

(normalizer-nfkc-unify-to-romaji)=

#### `unify_to_romaji`

This option enables normalize hiragana and katakana to romaji.

(normalizer-nfkc-remove-symbol)=

#### `remove_symbol`

This option removes symbols (e.g. #, !, ", &, %, ...) from the string that the target of normalizing.

(normalizer-nfkc-unify-katakana-gu-small-sounds)=

#### `unify_katakana_gu_small_sounds`

This option enables to normalize "グァグィグェグォ" to "ガギゲゴ".

(normalizer-nfkc-unify-katakana-di-sound)=

#### `unify_katakana_di_sound`

This option enables to normalize "ヂ" to "ジ".

(normalizer-nfkc-unify-katakana-wo-sound)=

#### `unify_katakana_wo_sound`

This option enables to normalize "ヲ" to "オ".

(normalizer-nfkc-unify-katakana-zu-small-sounds)=

#### `unify_katakana_zu_small_sounds`

This option enables to normalize "ズァズィズェズォ" to "ザジゼゾ".

(normalizer-nfkc-unify-katakana-du-sound)=

#### `unify_katakana_du_sound`

This option enables to normalize "ヅ" to "ズ".

(normalizer-nfkc-unify-katakana-trailing-o)=

#### `unify_katakana_trailing_o`

This option enables to normalize "オ" to "ウ"
when the vowel in the previous letter is "オ".

- "ォオ" -> "ォウ"
- "オオ" -> "オウ"
- "コオ" -> "コウ"
- "ソオ" -> "ソウ"
- "トオ" -> "トウ"
- "ノオ" -> "ノウ"
- "ホオ" -> "ホウ"
- "モオ" -> "モウ"
- "ョオ" -> "ョオ"
- "ヨオ" -> "ヨウ"
- "ロオ" -> "ロウ"
- "ゴオ" -> "ゴウ"
- "ゾオ" -> "ゾウ"
- "ドオ" -> "ドウ"
- "ボオ" -> "ボウ"
- "ポオ" -> "ポウ"
- "ヺオ" -> "ヺウ"

(normalizer-nfkc-unify-katakana-du-small-sounds)=

#### `unify_katakana_du_small_sounds`

This option enables to normalize "ヅァヅィヅェヅォ" to "ザジゼゾ".

(normalizer-nfkc-unify-kana-prolonged-sound-mark)=

#### `unify_kana_prolonged_sound_mark`

This option enables to normalize "ー" (U+30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK)
to a vowel of a previous kana letter.

If a previous kana letter is "ん" , "ー" is normalized to "ん",
And a previous kana letter is "ン" , "ー" is normalized to "ン".

```
ァー -> ァア, アー -> アア, ヵー -> ヵア, カー -> カア, ガー -> ガア, サー -> サア, ザー -> ザア,
ター -> タア, ダー -> ダア, ナー -> ナア, ハー -> ハア, バー -> バア, パー -> パア, マー -> マア,
ャー -> ャア, ヤー -> ヤア, ラー -> ラア, ヮー -> ヮア, ワー -> ワア, ヷー -> ヷア,
ィー -> ィイ, イー -> イイ, キー -> キイ, ギー -> ギイ, シー -> シイ, ジー -> ジイ, チー -> チイ,
ヂー -> ヂイ, ニー -> ニイ, ヒー -> ヒイ, ビー -> ビイ, ピー -> ピイ, ミー -> ミイ, リー -> リイ,
ヰー -> ヰイ, ヸー -> ヸイ,

ゥー -> ゥウ, ウー -> ウウ, クー -> クウ, グー -> グウ, スー -> スウ, ズー -> ズウ, ツー -> ツウ,
ヅー -> ヅウ, ヌー -> ヌウ, フー -> フウ, ブー -> ブウ, プー -> プウ, ムー -> ムウ, ュー -> ュウ,
ユー -> ユウ, ルー -> ルウ, ヱー -> ヱウ, ヴー -> ヴウ,

ェー -> ェエ, エー -> エエ, ヶー -> ヶエ, ケー -> ケエ, ゲー -> ゲエ, セー -> セエ, ゼー -> ゼエ,
テー -> テエ, デー -> デエ, ネー -> ネエ, ヘー -> ヘエ, ベー -> ベエ, ペー -> ペエ, メー -> メエ,
レー -> レエ, ヹー -> ヹエ,

ォー -> ォオ, オー -> オオ, コー -> コオ, ゴー -> ゴオ, ソー -> ソオ, ゾー -> ゾオ, トー -> トオ,
ドー -> ドオ, ノー -> ノオ, ホー -> ホオ, ボー -> ボオ, ポー -> ポオ, モー -> モオ, ョー -> ョオ,
ヨー -> ヨオ, ロー -> ロオ, ヲー -> ヲオ, ヺー -> ヺオ,

ンー -> ンン

ぁー -> ぁあ, あー -> ああ, ゕー -> ゕあ, かー -> かあ, がー -> があ, さー -> さあ, ざー -> ざあ,
たー -> たあ, だー -> だあ, なー -> なあ, はー -> はあ, ばー -> ばあ, ぱー -> ぱあ, まー -> まあ,
ゃー -> ゃあ, やー -> やあ, らー -> らあ, ゎー -> ゎあ, わー -> わあ

ぃー -> ぃい, いー -> いい, きー -> きい, ぎー -> ぎい, しー -> しい, じー -> じい, ちー -> ちい,
ぢー -> ぢい, にー -> にい, ひー -> ひい, びー -> びい, ぴー -> ぴい, みー -> みい, りー -> りい,
ゐー -> ゐい

ぅー -> ぅう, うー -> うう, くー -> くう, ぐー -> ぐう, すー -> すう, ずー -> ずう, つー -> つう,
づー -> づう, ぬー -> ぬう, ふー -> ふう, ぶー -> ぶう, ぷー -> ぷう, むー -> むう, ゅー -> ゅう,
ゆー -> ゆう, るー -> るう, ゑー -> ゑう, ゔー -> ゔう

ぇー -> ぇえ, えー -> ええ, ゖー -> ゖえ, けー -> けえ, げー -> げえ, せー -> せえ, ぜー -> ぜえ,
てー -> てえ, でー -> でえ, ねー -> ねえ, へー -> へえ, べー -> べえ, ぺー -> ぺえ, めー -> めえ,
れー -> れえ

ぉー -> ぉお, おー -> おお, こー -> こお, ごー -> ごお, そー -> そお, ぞー -> ぞお, とー -> とお,
どー -> どお, のー -> のお, ほー -> ほお, ぼー -> ぼお, ぽー -> ぽお, もー -> もお, ょー -> ょお,
よー -> よお, ろー -> ろお, をー -> をお

んー -> んん
```

(normalizer-nfkc-unify-kana-hyphen)=

#### `unify_kana_hyphen`

This option enables to normalize "-" (U+002D HYPHEN-MINUS) to a vowel of a previous kana letter.

If a previous kana letter is "ん" , "-" is normalized to "ん",
And a previous kana letter is "ン" , "-" is normalized to "ン".

```
ァ- -> ァア, ア- -> アア, ヵ- -> ヵア, カ- -> カア, ガ- -> ガア, サ- -> サア, ザ- -> ザア,
タ- -> タア, ダ- -> ダア, ナ- -> ナア, ハ- -> ハア, バ- -> バア, パ- -> パア, マ- -> マア,
ャ- -> ャア, ヤ- -> ヤア, ラ- -> ラア, ヮ- -> ヮア, ワ- -> ワア, ヷ- -> ヷア,
ィ- -> ィイ, イ- -> イイ, キ- -> キイ, ギ- -> ギイ, シ- -> シイ, ジ- -> ジイ, チ- -> チイ,
ヂ- -> ヂイ, ニ- -> ニイ, ヒ- -> ヒイ, ビ- -> ビイ, ピ- -> ピイ, ミ- -> ミイ, リ- -> リイ,
ヰ- -> ヰイ, ヸ- -> ヸイ,

ゥ- -> ゥウ, ウ- -> ウウ, ク- -> クウ, グ- -> グウ, ス- -> スウ, ズ- -> ズウ, ツ- -> ツウ,
ヅ- -> ヅウ, ヌ- -> ヌウ, フ- -> フウ, ブ- -> ブウ, プ- -> プウ, ム- -> ムウ, ュ- -> ュウ,
ユ- -> ユウ, ル- -> ルウ, ヱ- -> ヱウ, ヴ- -> ヴウ,

ェ- -> ェエ, エ- -> エエ, ヶ- -> ヶエ, ケ- -> ケエ, ゲ- -> ゲエ, セ- -> セエ, ゼ- -> ゼエ,
テ- -> テエ, デ- -> デエ, ネ- -> ネエ, ヘ- -> ヘエ, ベ- -> ベエ, ペ- -> ペエ, メ- -> メエ,
レ- -> レエ, ヹ- -> ヹエ,

ォ- -> ォオ, オ- -> オオ, コ- -> コオ, ゴ- -> ゴオ, ソ- -> ソオ, ゾ- -> ゾオ, ト- -> トオ,
ド- -> ドオ, ノ- -> ノオ, ホ- -> ホオ, ボ- -> ボオ, ポ- -> ポオ, モ- -> モオ, ョ- -> ョオ,
ヨ- -> ヨオ, ロ- -> ロオ, ヲ- -> ヲオ, ヺ- -> ヺオ,

ン- -> ンン

ぁ- -> ぁあ, あ- -> ああ, ゕ- -> ゕあ, か- -> かあ, が- -> があ, さ- -> さあ, ざ- -> ざあ,
た- -> たあ, だ- -> だあ, な- -> なあ, は- -> はあ, ば- -> ばあ, ぱ- -> ぱあ, ま- -> まあ,
ゃ- -> ゃあ, や- -> やあ, ら- -> らあ, ゎ- -> ゎあ, わ- -> わあ

ぃ- -> ぃい, い- -> いい, き- -> きい, ぎ- -> ぎい, し- -> しい, じ- -> じい, ち- -> ちい,
ぢ- -> ぢい, に- -> にい, ひ- -> ひい, び- -> びい, ぴ- -> ぴい, み- -> みい, り- -> りい,
ゐ- -> ゐい

ぅ- -> ぅう, う- -> うう, く- -> くう, ぐ- -> ぐう, す- -> すう, ず- -> ずう, つ- -> つう,
づ- -> づう, ぬ- -> ぬう, ふ- -> ふう, ぶ- -> ぶう, ぷ- -> ぷう, む- -> むう, ゅ- -> ゅう,
ゆ- -> ゆう, る- -> るう, ゑ- -> ゑう, ゔ- -> ゔう

ぇ- -> ぇえ, え- -> ええ, ゖ- -> ゖえ, け- -> けえ, げ- -> げえ, せ- -> せえ, ぜ- -> ぜえ,
て- -> てえ, で- -> でえ, ね- -> ねえ, へ- -> へえ, べ- -> べえ, ぺ- -> ぺえ, め- -> めえ,
れ- -> れえ

ぉ- -> ぉお, お- -> おお, こ- -> こお, ご- -> ごお, そ- -> そお, ぞ- -> ぞお, と- -> とお,
ど- -> どお, の- -> のお, ほ- -> ほお, ぼ- -> ぼお, ぽ- -> ぽお, も- -> もお, ょ- -> ょお,
よ- -> よお, ろ- -> ろお, を- -> をお

ん- -> んん
```

(normalizer-nfkc-unify-latin-alphabet-with)=

#### `unify_latin_alphabet_with`

This option enables that alphabets with diacritical mark and alphabets without diacritical mark regarded as the same character as below.

However, this feature focus on only LATIN (SMALL|CAPITAL) LETTER X WITH XXX. It doesn't support LATIN (SMALL|CAPITAL) LETTER X + COMBINING XXX characters.

## See also

- {doc}`../commands/normalize`