Sophie

Sophie

distrib > Fedora > 18 > x86_64 > media > updates > by-pkgid > e450e7f3d6075c4a54de19e68d38177f > files > 425

groonga-doc-3.0.5-1.fc18.x86_64.rpm

.. -*- rst -*-

.. highlightlang:: none

.. groonga-command
.. database: commands_normalize

``normalize``
=============

.. Caution::

  ``normalize`` command is the experimental feature.
  This command may be changed in the future.

Summary
-------

``normalize`` command normalizes text by the specified normalizer.

There is no need to create table to use ``normalize`` command.
It is usefull for you to check the results of normalizer.

Syntax
--------

``normalize`` commands takes two parameters - ``normalizer`` and ``string``.
Both of them are required.

::

 normalize normalizer string


Usage
-----

Here is a simple example of ``normalize`` command.

.. groonga-command
.. include:: ../../example/reference/commands/normalize/normalizer_auto_ascii.log
.. normalize NormalizerAuto "aBcDe 123"

Parameters
----------

This section describes parameters of ``normalizer``.

Required parameter
^^^^^^^^^^^^^^^^^^

There are required parameters, ``normalizer`` and ``string``.

``normalizer``
""""""""""""""

It specifies the name of normalizer.
Currently, ``normalize`` command accepts ``NormalizerAuto`` or ``NormalizerNFKC51`` as built-in normalizer.
If you want to try another normalizer, you need to register additional normalizer plugin by ``register`` command.

``string``
""""""""""

It specifies any string which you want to normalize.

Return value
------------

::

 [HEADER, normalized]

``HEADER``

  The format of HEADER is [0, UNIX_TIME_WHEN_COMMAND_IS_STARTED, ELAPSED_TIME].
  See :doc:`/reference/command/output_format` about HEADER.

``normalized``

  normalized is the normalized text by the specified normalizer.

See also
--------

* :doc:`/reference/normalizers`