0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Azure: azure-search-openai-demo を日本語利用するなら、日本語化して使おう

Last updated at Posted at 2024-08-02

拝啓

以下のSampleをベースに開発してたら、Index の Analyzer が英語版になっていることに気付いた。

ということで、その対処法の備忘録

結論

日本語化をする為、以下の環境変数を設定してから、

  1. AZURE_SEARCH_QUERY_LANGUAGE = ja-JP
  2. AZURE_SEARCH_QUERY_SPELLER = ja-JP
  3. AZURE_SEARCH_ANALYZER_NAME = ja.microsoft
  • Query Speller は、まだ日本語版は未対応。今後に期待 spell check
  • Analyzer は、ja.lucene も選べるが、実際に使ってみると、PDF 認識で微妙だったのでパス

詳しくは deploy_existing.md に書いてあった。

You can also customize the search service (new or existing) for non-English searches:

  1. To configure the language of the search query to a value other than "en-US", run azd env set AZURE_SEARCH_QUERY_LANGUAGE {Name of query language}. (See other possible values)
  2. To turn off the spell checker, run azd env set AZURE_SEARCH_QUERY_SPELLER none. Consult this table to determine if spell checker is supported for your query language.
  3. To configure the name of the analyzer to use for a searchable text field to a value other than "en.microsoft", run azd env set AZURE_SEARCH_ANALYZER_NAME {Name of analyzer name}. (See other possible values)

参考

  • default変えたい時とか

  • search について

あとがき

deploy_existing.md に気付くまでは、ソース直接編集しちゃってましたよ :sweat:

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?