Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cjk width token filter #7917

Merged

Conversation

AntonEliatra
Copy link
Contributor

Description

Add Cjk width token filter

Issues Resolved

Closes #7875

Version

all

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

github-actions bot commented Aug 6, 2024

Thank you for submitting your PR. The PR states are In progress (or Draft) -> Tech review -> Doc review -> Editorial review -> Merged.

Before you submit your PR for doc review, make sure the content is technically accurate. If you need help finding a tech reviewer, tag a maintainer.

When you're ready for doc review, tag the assignee of this PR. The doc reviewer may push edits to the PR directly or leave comments and editorial suggestions for you to address (let us know in a comment if you have a preference). The doc reviewer will arrange for an editorial review.

@hdhalter hdhalter added 3 - Tech review PR: Tech review in progress analyzers labels Aug 6, 2024
@kolchfa-aws
Copy link
Collaborator

@udabhas Could you review this PR for technical accuracy?

@vagimeli
Copy link
Collaborator

@varun-lodaya The documentation is awaiting tech review and approval, which is delaying progress. Could you please suggest alternative reviewers who can assist with this task in a timely manner? We're eager to move this forward. Thank you.

@vagimeli vagimeli added the Needs SME Waiting on input from subject matter expert label Aug 29, 2024
Copy link

@udabhas udabhas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doc look good to me

@vagimeli vagimeli added 4 - Doc review PR: Doc review in progress and removed 3 - Tech review PR: Tech review in progress Needs SME Waiting on input from subject matter expert labels Aug 30, 2024
@vagimeli
Copy link
Collaborator

Doc look good to me

Thank you for the review. Moving forward. @kolchfa-aws This PR is ready for doc review at your availability.

Signed-off-by: AntonEliatra <[email protected]>
Copy link
Collaborator

@kolchfa-aws kolchfa-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @AntonEliatra! Just a couple of suggestions.

_analyzers/token-filters/cjk-width.md Outdated Show resolved Hide resolved

The CJK Width token filter in OpenSearch normalizes Chinese, Japanese, and Korean (CJK) tokens by converting full-width ASCII Character to their standard (half-width) ASCII equivalents and half-width Katakana characters to their full-width.

- **Converting full-width ASCII Character**: In CJK texts, ASCII characters (such as letters and numbers) can appear in full-width form, which occupies the space of two half-width characters. Full-width ASCII characters are typically used in East Asian typography to align with the width of CJK characters. However, for the purpose of indexing and searching, these full-width characters need to be normalized to their standard (half-width) ASCII equivalents.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you make these headings level 3?

_analyzers/token-filters/cjk-width.md Outdated Show resolved Hide resolved

See following example:

Full-Width: ABCDE 12345
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these are better formatted as a code block and aligned so the letter A is approximately at the same column in both lines (lines 16 and 17)

_analyzers/token-filters/cjk-width.md Outdated Show resolved Hide resolved
_analyzers/token-filters/cjk-width.md Outdated Show resolved Hide resolved
_analyzers/token-filters/cjk-width.md Outdated Show resolved Hide resolved
_analyzers/token-filters/cjk-width.md Outdated Show resolved Hide resolved
_analyzers/token-filters/cjk-width.md Outdated Show resolved Hide resolved
@AntonEliatra
Copy link
Contributor Author

@kolchfa-aws thank you for the suggestions, its been updated now

Signed-off-by: AntonEliatra <[email protected]>
Copy link
Collaborator

@kolchfa-aws kolchfa-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks much nicer aligned. In the future, could you pad code blocks with blank lines? I added those to this PR.

Copy link
Collaborator

@natebower natebower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AntonEliatra @kolchfa-aws Please see my changes and let me know if you have any questions. Thanks!

_analyzers/token-filters/cjk-width.md Outdated Show resolved Hide resolved
_analyzers/token-filters/cjk-width.md Outdated Show resolved Hide resolved
_analyzers/token-filters/cjk-width.md Outdated Show resolved Hide resolved
_analyzers/token-filters/cjk-width.md Outdated Show resolved Hide resolved
_analyzers/token-filters/index.md Outdated Show resolved Hide resolved
_analyzers/token-filters/cjk-width.md Outdated Show resolved Hide resolved
@kolchfa-aws kolchfa-aws merged commit 41b1b06 into opensearch-project:main Sep 13, 2024
5 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 13, 2024
* adding token filter page for cjk width #7875

Signed-off-by: AntonEliatra <[email protected]>

* adding details to the page

Signed-off-by: AntonEliatra <[email protected]>

* adding details to the page

Signed-off-by: AntonEliatra <[email protected]>

* Updating details as per comments

Signed-off-by: AntonEliatra <[email protected]>

* Update cjk-width.md

Signed-off-by: AntonEliatra <[email protected]>

* Apply suggestions from code review

Co-authored-by: kolchfa-aws <[email protected]>
Signed-off-by: AntonEliatra <[email protected]>

* Update cjk-width.md

Signed-off-by: AntonEliatra <[email protected]>

* Update cjk-width.md

Signed-off-by: AntonEliatra <[email protected]>

* Apply suggestions from code review

Signed-off-by: kolchfa-aws <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: AntonEliatra <[email protected]>

---------

Signed-off-by: AntonEliatra <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>
Co-authored-by: kolchfa-aws <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
(cherry picked from commit 41b1b06)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
github-actions bot pushed a commit that referenced this pull request Sep 13, 2024
@AntonEliatra AntonEliatra deleted the cjk-width-token-filter branch September 13, 2024 13:31
noahstaveley pushed a commit to noahstaveley/documentation-website that referenced this pull request Sep 23, 2024
* adding token filter page for cjk width opensearch-project#7875

Signed-off-by: AntonEliatra <[email protected]>

* adding details to the page

Signed-off-by: AntonEliatra <[email protected]>

* adding details to the page

Signed-off-by: AntonEliatra <[email protected]>

* Updating details as per comments

Signed-off-by: AntonEliatra <[email protected]>

* Update cjk-width.md

Signed-off-by: AntonEliatra <[email protected]>

* Apply suggestions from code review

Co-authored-by: kolchfa-aws <[email protected]>
Signed-off-by: AntonEliatra <[email protected]>

* Update cjk-width.md

Signed-off-by: AntonEliatra <[email protected]>

* Update cjk-width.md

Signed-off-by: AntonEliatra <[email protected]>

* Apply suggestions from code review

Signed-off-by: kolchfa-aws <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: AntonEliatra <[email protected]>

---------

Signed-off-by: AntonEliatra <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>
Co-authored-by: kolchfa-aws <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Noah Staveley <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DOC] Token filters - cjk_width
6 participants