Skip to content

fix: update Chinese location rule patterns#364

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
Johnson-zs:master
Jul 21, 2026
Merged

fix: update Chinese location rule patterns#364
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
Johnson-zs:master

Conversation

@Johnson-zs

@Johnson-zs Johnson-zs commented Jul 21, 2026

Copy link
Copy Markdown
Contributor
  1. Added "文档库" (document library) to documents directory patterns
  2. Added "相册里" (in the album) and "图片库" (picture library) to
    pictures directory patterns
  3. These changes expand the search matching for common Chinese user
    expressions regarding document and picture locations

Influence:

  1. Test Chinese language searches containing new pattern terms
  2. Verify search results for document and picture locations match
    expectations
  3. Check behavior with mixed old and new pattern terms

fix: 更新中文位置规则匹配模式

  1. 在文档目录模式中增加了"文档库"
  2. 在图片目录模式中增加了"相册里"和"图片库"
  3. 这些变更扩展了对中文用户常见文档和图片位置表达式的搜索匹配

Influence:

  1. 测试包含新模式术语的中文搜索
  2. 验证文档和图片位置的搜索结果是否符合预期
  3. 检查新旧模式术语混合使用时的行为

Fixes: #370933 #370937

Summary by Sourcery

Expand Chinese location rule patterns for document and picture directories to cover more common user expressions.

New Features:

  • Broaden semantic matching for Chinese document locations by including additional directory terms.
  • Broaden semantic matching for Chinese picture locations by including additional directory terms.

Tests:

  • Ensure Chinese search queries using new and existing location phrases for documents and pictures return correct results.

1. Added "文档库" (document library) to documents directory patterns
2. Added "相册里" (in the album) and "图片库" (picture library) to
pictures directory patterns
3. These changes expand the search matching for common Chinese user
expressions regarding document and picture locations

Influence:
1. Test Chinese language searches containing new pattern terms
2. Verify search results for document and picture locations match
expectations
3. Check behavior with mixed old and new pattern terms

fix: 更新中文位置规则匹配模式

1. 在文档目录模式中增加了"文档库"
2. 在图片目录模式中增加了"相册里"和"图片库"
3. 这些变更扩展了对中文用户常见文档和图片位置表达式的搜索匹配

Influence:
1. 测试包含新模式术语的中文搜索
2. 验证文档和图片位置的搜索结果是否符合预期
3. 检查新旧模式术语混合使用时的行为

Fixes: #370933 #370937
@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Johnson-zs

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sourcery-ai

sourcery-ai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates Chinese location rule patterns to broaden matching of common user expressions for document and picture directories by extending the relevant pattern lists in the zh_CN semantic rules JSON.

File-Level Changes

Change Details Files
Broaden Chinese document and picture directory matching by adding new colloquial patterns to the zh_CN location rules.
  • Extend document directory patterns to include the term for document library ("文档库").
  • Extend picture directory patterns to include colloquial album reference ("相册里").
  • Extend picture directory patterns to include the term for picture library ("图片库").
  • Ensure new terms integrate consistently with existing location rule structure for zh_CN queries.
src/dfm-search/dfm-search-lib/semantic/rules/zh_CN/location_rules.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • For the new Chinese patterns like "文档库", "相册里" and "图片库", please double-check they’re classified under the correct intent/slot so they don’t inadvertently match non-directory contexts (e.g., generic text mentioning a library or album).
  • Consider whether these added patterns should also include common variants (e.g., with/without spaces or punctuation, simplified colloquial forms) to avoid partial coverage that might lead to inconsistent matching for similar queries.
  • If the location rules use any priority or weighting, verify the insertion point of the new patterns so they don’t overshadow more specific rules or change the ranking behavior for existing queries.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- For the new Chinese patterns like "文档库", "相册里" and "图片库", please double-check they’re classified under the correct intent/slot so they don’t inadvertently match non-directory contexts (e.g., generic text mentioning a library or album).
- Consider whether these added patterns should also include common variants (e.g., with/without spaces or punctuation, simplified colloquial forms) to avoid partial coverage that might lead to inconsistent matching for similar queries.
- If the location rules use any priority or weighting, verify the insertion point of the new patterns so they don’t overshadow more specific rules or change the ranking behavior for existing queries.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@Johnson-zs

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot

deepin-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown

This pr force merged! (status: blocked)

@deepin-bot
deepin-bot Bot merged commit 4fbe838 into linuxdeepin:master Jul 21, 2026
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants