{"id":19287059,"url":"https://github.com/infinilabs/analysis-stconvert","last_synced_at":"2025-05-16T00:07:28.317Z","repository":{"id":5250403,"uuid":"6428072","full_name":"infinilabs/analysis-stconvert","owner":"infinilabs","description":"🚲 STConvert is analyzer that convert chinese characters between traditional and simplified.中文简繁體互相转换.","archived":false,"fork":false,"pushed_at":"2025-04-25T03:31:41.000Z","size":370,"stargazers_count":370,"open_issues_count":10,"forks_count":76,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-04-25T04:30:18.870Z","etag":null,"topics":["analyzer","convert-chinese-characters","elasticsearch","traditional"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"jsocol/django-adminplus","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/infinilabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-10-28T14:08:10.000Z","updated_at":"2025-04-25T03:31:45.000Z","dependencies_parsed_at":"2023-02-10T01:00:31.918Z","dependency_job_id":"4a0b0778-3d8b-43fb-8925-67009cd52a1d","html_url":"https://github.com/infinilabs/analysis-stconvert","commit_stats":{"total_commits":92,"total_committers":6,"mean_commits":"15.333333333333334","dds":0.09782608695652173,"last_synced_commit":"b76a0424e8c2de9ee9af4ec228fcee4e0f8ccae1"},"previous_names":["infinilabs/analysis-stconvert"],"tags_count":205,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinilabs%2Fanalysis-stconvert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinilabs%2Fanalysis-stconvert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinilabs%2Fanalysis-stconvert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinilabs%2Fanalysis-stconvert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/infinilabs","download_url":"https://codeload.github.com/infinilabs/analysis-stconvert/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254442854,"owners_count":22071878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analyzer","convert-chinese-characters","elasticsearch","traditional"],"created_at":"2024-11-09T22:05:10.527Z","updated_at":"2025-05-16T00:07:23.287Z","avatar_url":"https://github.com/infinilabs.png","language":"Java","funding_links":[],"categories":["人工智能"],"sub_categories":[],"readme":"STConvert Analysis for Elasticsearch and OpenSearch\n==================================\n\n![](./assets/banner.png)\n\n\nSTConvert is analyzer that convert Chinese characters between Traditional and Simplified. It supports major versions of Elasticsearch and OpenSearch. Maintained and supported with ❤️ by [INFINI Labs](https://infinilabs.com).\n\n\nThe plugin includes  analyzer: `stconvert`,\n tokenizer: `stconvert`,\n token-filter:  `stconvert`,\n and char-filter: `stconvert`\n\n# Optional Parameters\n\nSupported config:\n\n- `convert_type`: default `s2t` ,optional option:\n    1. `s2t` ,convert characters from Simple Chinese to Traditional Chinese\n    2. `t2s` ,convert characters from Traditional Chinese to Simple Chinese\n\n- `keep_both`:default `false` ,\n\n- `delimiter`:default `,`\n\n\n# How to Install\n\nYou can download the packaged plugins from here: `https://release.infinilabs.com/`, \n\nor you can use the `plugin` cli to install the plugin like this:\n\nFor Elasticsearch\n\n```\nbin/elasticsearch-plugin install https://get.infini.cloud/elasticsearch/analysis-stconvert/8.4.1\n```\n\nFor OpenSearch\n\n```\nbin/opensearch-plugin install https://get.infini.cloud/opensearch/analysis-stconvert/2.12.0\n```\n\nTips: replace your own version number related to your elasticsearch or opensearch.\n\n\n# Getting Started\n\nMapping example:\n\n```\nPUT /stconvert/\n{\n    \"settings\" : {\n        \"analysis\" : {\n            \"analyzer\" : {\n                \"tsconvert\" : {\n                    \"tokenizer\" : \"tsconvert\"\n                    }\n            },\n            \"tokenizer\" : {\n                \"tsconvert\" : {\n                    \"type\" : \"stconvert\",\n                    \"delimiter\" : \"#\",\n                    \"keep_both\" : false,\n                    \"convert_type\" : \"t2s\"\n                }\n            },   \n             \"filter\": {\n               \"tsconvert\" : {\n                     \"type\" : \"stconvert\",\n                     \"delimiter\" : \"#\",\n                     \"keep_both\" : false,\n                     \"convert_type\" : \"t2s\"\n                 }\n             },\n            \"char_filter\" : {\n                \"tsconvert\" : {\n                    \"type\" : \"stconvert\",\n                    \"convert_type\" : \"t2s\"\n                }\n            }\n        }\n    }\n}\n```\n\n\nAnalyze tests\n\n```\nGET stconvert/_analyze\n{\n  \"tokenizer\" : \"keyword\",\n  \"filter\" : [\"lowercase\"],\n  \"char_filter\" : [\"tsconvert\"],\n  \"text\" : \"国际國際\"\n}\n\nOutput：\n{\n  \"tokens\": [\n    {\n      \"token\": \"国际国际\",\n      \"start_offset\": 0,\n      \"end_offset\": 4,\n      \"type\": \"word\",\n      \"position\": 0\n    }\n  ]\n}\n```\n\nNormalizer usage\n\n```\nDELETE index\nPUT index\n{\n  \"settings\": {\n    \"analysis\": {\n      \"char_filter\": {\n        \"tsconvert\": {\n          \"type\": \"stconvert\",\n          \"convert_type\": \"t2s\"\n        }\n      },\n      \"normalizer\": {\n        \"my_normalizer\": {\n          \"type\": \"custom\",\n          \"char_filter\": [\n            \"tsconvert\"\n          ],\n          \"filter\": [\n            \"lowercase\"\n          ]\n        }\n      }\n    }\n  },\n  \"mappings\": {\n    \"properties\": {\n      \"foo\": {\n        \"type\": \"keyword\",\n        \"normalizer\": \"my_normalizer\"\n      }\n    }\n  }\n}\n\nPUT index/_doc/1\n{\n  \"foo\": \"國際\"\n}\n\nPUT index/_doc/2\n{\n  \"foo\": \"国际\"\n}\n\nGET index/_search\n{\n  \"query\": {\n    \"term\": {\n      \"foo\": \"国际\"\n    }\n  }\n}\n\nGET index/_search\n{\n  \"query\": {\n    \"term\": {\n      \"foo\": \"國際\"\n    }\n  }\n}\n```\n\n\n# Community\n\nFell free to join the Discord server to discuss anything around this project: \n\n[https://discord.gg/4tKTMkkvVX](https://discord.gg/4tKTMkkvVX)\n\n# License\n\nCopyright ©️ INFINI Labs.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfinilabs%2Fanalysis-stconvert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfinilabs%2Fanalysis-stconvert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfinilabs%2Fanalysis-stconvert/lists"}