2017-01-18 3 views
1

to_tsvector,to_tsqueryなどの全文検索操作を実行しようとしており、約80+言語でdictionariesが必要です。Postgres 9.6.1多くの音声言語の全文検索辞書

Postgresは16言語構成になっているようですが、私は中国語(jiebacfgtestzhcg別名ZHParse)をテストしています。私はドキュメンテーションやこれら以外の言語のリポジトリを探しています。

mydatabase=# \dF 

       List of text search configurations 
    Schema | Name |    Description    
------------+------------+--------------------------------------- 
pg_catalog | danish  | configuration for danish language 
pg_catalog | dutch  | configuration for dutch language 
pg_catalog | english | configuration for english language 
pg_catalog | finnish | configuration for finnish language 
pg_catalog | french  | configuration for french language 
pg_catalog | german  | configuration for german language 
pg_catalog | hungarian | configuration for hungarian language 
pg_catalog | italian | configuration for italian language 
pg_catalog | norwegian | configuration for norwegian language 
pg_catalog | portuguese | configuration for portuguese language 
pg_catalog | romanian | configuration for romanian language 
pg_catalog | russian | configuration for russian language 
pg_catalog | simple  | simple configuration 
pg_catalog | spanish | configuration for spanish language 
pg_catalog | swedish | configuration for swedish language 
pg_catalog | turkish | configuration for turkish language 
public  | jiebacfg | configuration for jieba 
public  | testzhcfg | 
(18 rows) 
+0

@a_horse_with_no_nameのタイプミス - 9.6.1 – Growler

+1

あなたはhttps://www.postgresql.org/docs/current/static/textsearch-dictionaries(OpenOfiiceの[Ispellの(のmyspell /のhunspell)辞書]のいくつかを見てみたいことがあります。 html#TEXTSEARCH-ISPELL-DICTIONARY)(PostgreSQLのドキュメントには、インポート方法に関する*いくつかの指示がありますが、これまでにやったことはありません)。 – pozs

+0

@pozs yikes、さらに1つの言語辞書(https://lasr.cs.ucla.edu/geoff/ispell-dictionaries.html)をインストールするのは難しい – Growler

答えて

2

としてpozsあなたはOpenOffice(またはLibreOffice)の拡張子から辞書ファイルを取得することができますコメントしました。 documentationから:

Ispellの辞書を作成するには、これらの手順を実行します。

  • ダウンロード辞書設定ファイルを。 OpenOffice拡張ファイルの拡張子は.oxtです。 .affと.dicファイルを抽出し、拡張子を.affixと.dictに変更する必要があります。

のiconv -f -t ISO_8859-1 UTF-8 -o nn_no:いくつかの辞書ファイルの場合、また、(例えば、ノルウェーの言語辞書用)コマンドでUTF-8エンコーディングに文字を変換するために必要とされます$ SHAREDIR/tsearch_dataディレクトリに.affix nn_NO.aff
のiconv -f -t ISO_8859-1 UTF-8 -o nn_no.dict nn_NO.dic

  • コピーファイル

  • ロードファイルにPostgreSQLに次のコマンドを入力します。

は、テキスト検索辞書english_hunspell(
TEMPLATE = ispellを、
DictFile = en_USの、
AffFile = en_USの、
ストップワード=英語)を作成します。

また、辞書インストールの簡単な方法を提供する拡張機能のリストがあります。 githubからダウンロードできます。