# README
## Name
groonga-normalizer-mysql
## Description
Groonga-normalizer-mysql is a Groonga plugin. It provides MySQL
compatible normalizers and a custom normalizers to Groonga.
Here are MySQL compatible normalizers:
* `NormalizerMySQLGeneralCI` for `utf8mb4_general_ci`
* `NormalizerMySQLUnicodeCI` for `utf8mb4_unicode_ci`
* `NormalizerMySQLUnicode520CI` for `utf8mb4_unicode_520_ci`
Here are custom normalizers:
* `NormalizerMySQLUnicodeCIExceptKanaCIKanaWithVoicedSoundMark`
* It's based on `NormalizerMySQLUnicodeCI`
* `NormalizerMySQLUnicode520CIExceptKanaCIKanaWithVoicedSoundMark`
* It's based on `NormalizerMySQLUnicode520CI`
They are self-descriptive name but long. They are variant normalizers
of `NormalizerMySQLUnicodeCI` and `NormalizerMySQLUnicode520CI`. They
have different behaviors. The followings are the different
behaviors. They describes with
`NormalizerMySQLUnicodeCIExceptKanaCIKanaWithVoicedSoundMark` but they
are true for
`NormalizerMySQLUnicode520CIExceptKanaCIKanaWithVoicedSoundMark`.
* `NormalizerMySQLUnicodeCI` normalizes all small Hiragana such as `ぁ`,
`っ` to Hiragana such as `あ`, `つ`.
`NormalizerMySQLUnicodeCIExceptKanaCIKanaWithVoicedSoundMark`
doesn't normalize `ぁ` to `あ` nor `っ` to `つ`. `ぁ` and `あ` are
different characters. `っ` and `つ` are also different characters.
This behavior is described by `ExceptKanaCI` in the long name. This
following behaviors ared described by
`ExceptKanaWithVoicedSoundMark` in the long name.
* `NormalizerMySQLUnicode` normalizes all Hiragana with voiced sound
mark such as `が` to Hiragana without voiced sound mark such as `か`.
`NormalizerMySQLUnicodeCIExceptKanaCIKanaWithVoicedSoundMark` doesn't
normalize `が` to `か`. `が` and `か` are different characters.
* `NormalizerMySQLUnicode` normalizes all Hiragana with semi-voiced sound
mark such as `ぱ` to Hiragana without semi-voiced sound mark such as `は`.
`NormalizerMySQLUnicodeCIExceptKanaCIKanaWithVoicedSoundMark` doesn't
normalize `ぱ` to `は`. `ぱ` and `は` are different characters.
* `NormalizerMySQLUnicode` normalizes all Katakana with voiced sound
mark such as `ガ` to Katakana without voiced sound mark such as `カ`.
`NormalizerMySQLUnicodeCIExceptKanaCIKanaWithVoicedSoundMark` doesn't
normalize `ガ` to `カ`. `ガ` and `カ` are different characters.
* `NormalizerMySQLUnicode` normalizes all Katakana with semi-voiced sound
mark such as `パ` to Hiragana without semi-voiced sound mark such as `ハ`.
`NormalizerMySQLUnicodeCIExceptKanaCIKanaWithVoicedSoundMark` doesn't
normalize `パ` to `ハ`. `パ` and `ハ` are different characters.
* `NormalizerMySQLUnicode` normalizes all halfwidth Katakana with
voiced sound mark such as `ガ` to halfwidth Katakana without voiced
sound mark such as `カ`.
`NormalizerMySQLUnicodeCIExceptKanaCIKanaWithVoicedSoundMark`
normalizes all halfwidth Katakana with voided sound mark such as `ガ`
to fullwidth Katakana with voiced sound mark such as `ガ`.
`NormalizerMySQLUnicodeCIExceptKanaCIKanaWithVoicedSoundMark` and
`NormalizerMySQLUnicode520CIExceptKanaCIKanaWithVoicedSoundMark` and
are MySQL incompatible normalizers but they are useful for Japanese
text. For example, `ふらつく` and `ブラック` has different
means. `NormalizerMySQLUnicodeCI` identifies `ふらつく` with `ブラック`
but `NormalizerMySQLUnicodeCIExceptKanaCIKanaWithVoicedSoundMark`
doesn't identify them.
## Install
### Debian GNU/Linux
[Add apt-line for the Groonga deb package repository](http://groonga.org/docs/install/debian.html)
and install `groonga-normalizer-mysql` package:
% sudo apt-get -y install groonga-normalizer-mysql
### Ubuntu
[Add apt-line for the Groonga deb package repository](http://groonga.org/docs/install/ubuntu.html)
and install `groonga-normalizer-mysql` package:
% sudo apt-get -y install groonga-normalizer-mysql
### CentOS
Install `groonga-repository` package:
% sudo rpm -ivh http://packages.groonga.org/centos/groonga-release-1.1.0-1.noarch.rpm
% sudo yum makecache
Then install `groonga-normalizer-mysql` package:
% sudo yum install -y groonga-normalizer-mysql
### Fedora
Install `groonga-repository` package:
% sudo rpm -ivh http://packages.groonga.org/fedora/groonga-release-1.1.0-1.noarch.rpm
% sudo yum makecache
Then install `groonga-normalizer-mysql` package:
% sudo yum install -y groonga-normalizer-mysql
### OS X - Homebrew
Install `groonga-normalizer-mysql` package:
% brew install groonga-normalizer-mysql
### Windows
You need to build from source. Here are build instructions.
#### Build system
Install the following build tools:
* [Microsoft Visual Studio 2010 Express](http://www.microsoft.com/japan/msdn/vstudio/express/): 2012 isn't tested yet.
* [CMake](http://www.cmake.org/)
#### Build Groonga
Download the latest Groonga source from [packages.groonga.org](http://packages.groonga.org/source/groonga/). Source file name is formatted as `groonga-X.Y.Z.zip`.
Extract the source and move to the source folder:
> cd ...\groonga-X.Y.Z
groonga-X.Y.Z>
Run CMake. Here is a command line to install Groonga to `C:\groonga` folder:
groonga-X.Y.Z> cmake . -G "Visual Studio 12 Win64" -DCMAKE_INSTALL_PREFIX=C:\groonga
Build:
groonga-X.Y.Z> cmake --build . --config Release
Install:
groonga-X.Y.Z> cmake --build . --config Release --target Install
#### Build groonga-normalizer-mysql
Download the latest groonga-normalizer-mysql source from [packages.groonga.org](http://packages.groonga.org/source/groonga-normalizer-mysql/). Source file name is formatted as `groonga-normalizer-X.Y.Z.zip`.
Extract the source and move to the source folder:
> cd ...\groonga-normalizer-mysql-X.Y.Z
groonga-normalizer-mysql-X.Y.Z>
IMPORTANT!!!: Set `PKG_CONFIG_PATH` environment variable:
groonga-normalizer-mysql-X.Y.Z> set PKG_CONFIG_PATH=C:\groongalocal\lib\pkgconfig
Run CMake. Here is a command line to install Groonga to `C:\groonga` folder:
groonga-normalizer-mysql-X.Y.Z> cmake . -G "Visual Studio 12 Win64" -DCMAKE_INSTALL_PREFIX=C:\groonga
Build:
groonga-normalizer-mysql-X.Y.Z> cmake --build . --config Release
Install:
groonga-normalizer-mysql-X.Y.Z> cmake --build . --config Release --target Install
## Usage
First, you need to register `normalizers/mysql` plugin:
groonga> register normalizers/mysql
Then, you can use `NormalizerMySQLGeneralCI` and
`NormalizerMySQLUnicodeCI` as normalizers:
groonga> table_create Lexicon TABLE_PAT_KEY --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI
## Dependencies
* Groonga >= 3.0.3
## Mailing list
* English: [groonga-talk@lists.sourceforge.net](https://lists.sourceforge.net/lists/listinfo/groonga-talk)
* Japanese: [groonga-dev@lists.sourceforge.jp](http://lists.sourceforge.jp/mailman/listinfo/groonga-dev)
## Thanks
* Alexander Barkov \<bar@udm.net\>: The author of
`MYSQL_SOURCE/strings/ctype-utf8.c`.
* ...
## Authors
* Kouhei Sutou \<kou@clear-code.com\>
## License
LGPLv2 only. See doc/text/lgpl-2.0.txt for details.
This program uses normalization table defined in MySQL source code. So
this program is derived work of
`MYSQL_SOURCE/strings/ctype-utf8.c`. This program is the same license
as `MYSQL_SOURCE/strings/ctype-utf8.c` and it is licensed under LGPLv2
only.
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
mariadb-10.10.3-linux-systemd-x86-64.tar.gz (2000个子文件)
ed1f42db.0 7KB
mdev6020-mysql-bin.000001 504KB
binlog_old_version_4_1.000001 146KB
bug11747416_32228_binlog.000001 8KB
bug33029-slave-relay-bin.000001 4KB
binlog_transaction.000001 2KB
mariadb-5.5-binlog.000001 1KB
binlog_savepoint.000001 1014B
mdev29078-mysql-bin.000001 920B
mysql-8.0.13-stm-temporal-round-binlog.000001 892B
bug16266.000001 532B
mysql-5.7.11-stm-temporal-round-binlog.000001 514B
bug47142_master-bin.000001 386B
trunc_binlog.000001 174B
bug40482-bin.000001 172B
master-bin.000001 98B
corrupt-relay-bin.000624 89KB
ver_trunk_row_v2.001 148KB
ver_5_1_23.001 147KB
ver_5_1-telco.001 147KB
ver_5_1_17.001 147KB
bug32407.001 368B
mysql.1 61KB
mysqldump.1 60KB
myisamchk.1 50KB
mysql-test-run.pl.1 49KB
mysqlbinlog.1 47KB
mysqladmin.1 26KB
mysqlcheck.1 23KB
mysqlslap.1 23KB
mysqltest.1 20KB
myisampack.1 19KB
mysqlimport.1 18KB
mysqld_safe.1 18KB
mysqld_multi.1 16KB
mysql_upgrade.1 15KB
mysqlshow.1 14KB
mysql-stress-test.pl.1 11KB
mysqlhotcopy.1 10KB
mysql_plugin.1 9KB
mysql_install_db.1 9KB
mysqlaccess.1 9KB
mysql_client_test.1 8KB
aria_chk.1 7KB
mysql_config.1 6KB
mysqldumpslow.1 6KB
my_print_defaults.1 6KB
myisam_ftdump.1 5KB
mysql_convert_table_format.1 5KB
innochecksum.1 5KB
mysql.server.1 5KB
mysql_setpermission.1 4KB
myisamlog.1 4KB
mysql_find_rows.1 4KB
replace.1 4KB
mysql_tzinfo_to_sql.1 4KB
mysql_secure_installation.1 4KB
perror.1 4KB
myrocks_hotbackup.1 4KB
resolve_stack_dump.1 4KB
mysql_waitpid.1 3KB
aria_read_log.1 3KB
resolveip.1 3KB
mariadb-conv.1 3KB
msql2mysql.1 3KB
mysql_fix_extensions.1 2KB
aria_pack.1 2KB
aria_s3_copy.1 1KB
aria_dump_log.1 1KB
galera_new_cluster.1 994B
mariadb-service-convert.1 949B
aria_ftdump.1 732B
my_safe_process.1 691B
wsrep_sst_common.1 654B
wsrep_sst_rsync_wan.1 647B
mysqld_safe_helper.1 628B
wsrep_sst_mariabackup.1 625B
mysql_ldb.1 623B
wsrep_sst_mysqldump.1 617B
mbstream.1 609B
galera_recovery.1 600B
wsrep_sst_rsync.1 600B
mariabackup.1 581B
mytop.1 323B
mariadb-client-test-embedded.1 37B
mariadb-convert-table-format.1 37B
mariadb-secure-installation.1 36B
mariadb-fix-extensions.1 31B
mariadb-tzinfo-to-sql.1 30B
mariadb-setpermission.1 30B
mysql_client_test_embedded.1 29B
mariadb-test-embedded.1 29B
mariadbd-safe-helper.1 29B
mariadb-client-test.1 28B
mariadb-install-db.1 27B
mariadb-find-rows.1 26B
mariadb-embedded.1 25B
mariadb-upgrade.1 24B
mariadb-dumpslow.1 24B
mariadb-waitpid.1 24B
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
qxmjava
- 粉丝: 22
- 资源: 603
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功