Debian Codegraph @

doc/source/reference/operations/prefix_rk_search.rst

raw
1 .. -*- rst -*-
2
3 .. groonga-command
4 .. database: operations_prefix_rk_search
5
6 Prefix RK search
7 ================
8
9 Summary
10 -------
11
12 Groonga supports prefix RK search. RK means Romaji and Kana (reading).
13 Prefix RK search can find registered text in katakana by query in
14 romaji, hiragana or katakana. Found registered texts are started with
15 query.
16
17 Prefix RK search is useful for completing Japanese text. Because
18 romaji is widely used to input Japanese on computer. See also
19 `Japanese input methods on Wikipedia
20 <https://en.wikipedia.org/wiki/Japanese_input_methods>`_.
21
22 If users can search Japanese text in romaji, users doesn't need to
23 convert romaji to hiragana, katakana or kanji by themselves. For
24 example, if you register a reading for "日本" as "ニホン", users can
25 find "日本" by "ni", "に" or "二".
26
27 The feature is helpful because it reduces one or more operations of
28 users.
29
30 This feature is used in :doc:`/reference/suggest/completion`.
31
32 You can use this feature in :ref:`select-filter` by
33 :doc:`/reference/functions/prefix_rk_search`.
34
35 Usage
36 -----
37
38 You need :ref:`table-pat-key` table for using prefix RK search.
39
40 You need to put reading in katakana to ``TABLE_PAT_KEY`` as key:
41
42 .. groonga-command
43 .. include:: ../../example/reference/operations/prefix_rk_search/usage_register_kana.log
44 .. table_create Readings TABLE_PAT_KEY ShortText --normalizer NormalizerAuto
45 .. load --table Readings
46 .. [
47 .. {"_key": "ニホン"},
48 .. {"_key": "ニッポン"},
49 .. {"_key": "ローマジ"}
50 .. ]
51
52 You can finds ``ニホン`` and ``ニッポン`` by prefix RK search with
53 ``ni`` as query from the ``Readings`` table.
54
55 You can finds ``ローマジ`` by prefix RK search with ``r`` as query
56 from the ``Readings`` table.
57
58 How to convert romaji to reading
59 --------------------------------
60
61 Prefix RK search is based on JIS X 4063:2000 specification.
62
63 The specification was obsoleted. See `ローマ字入力 on Japanese
64 Wikipedia
65 <https://ja.wikipedia.org/wiki/%E3%83%AD%E3%83%BC%E3%83%9E%E5%AD%97%E5%85%A5%E5%8A%9B>`_
66 for JIS X 4063:2000.
67
68 Normally, you can get converted results as expected.
69
70 See also
71 --------
72
73 * :doc:`/reference/suggest/completion`
74 * :doc:`/reference/functions/prefix_rk_search`