Skip to content

Commit

Permalink
query adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
howardt12345 committed Sep 19, 2024
1 parent f74b974 commit 913cd50
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
8 changes: 5 additions & 3 deletions resources/reacts/tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@
{
"match_whole_word": true,
"keywords": [
"Taiwan(?:[\\s-]+(?:is|be|are|=|:|\\bis\\b|\\bare\\b))?[\\s-]+(?:(?:number|#|n[o°]\\.?|n°\\.?)\\s*(?:1|one|①)|(?:first|1st|best|top|greatest))(?!\\s*\\d)",
"(?:台|臺)灣(?:[\\s-]+(?:是|=|:)?)?[\\s-]+(?:(?:第|#|No\\.?)\\s*(?:1|一|壹|①)|(?:最(?:棒|強|好)|冠軍))(?!\\s*\\d)",
"tâi-uân(?:[\\s-]*(?:tē-it))"
"Taiwan(?:[\\s-]*(?:is|be|are|=|:|\\bis\\b|\\bare\\b))?[\\s-]*(?:(?:number|#|no?\\.?|n°\\.?)\\s*(?:1|one|won|①|壹)|(?:first|1st|best|top|greatest|the\\s+best))(?![\\s-]*\\d)",
"(?:台|臺)灣(?:[\\s-]*(?:是|=|:)?)?[\\s-]*(?:(?:第|#|No\\.?)\\s*(?:1|一|壹|①)|(?:最(?:棒|強|好)|冠軍|第一名))(?![\\s-]*\\d)",
"tâi-uân[\\s-]*tē-it",
"Taiwan[\\s-]*(?:第一|最棒|最強|最好)",
"(?:台|臺)灣[\\s-]*(?:number[\\s-]*one|is[\\s-]*number[\\s-]*one)"
],
"criteria_link": "tw_no_1"
}
Expand Down
16 changes: 11 additions & 5 deletions tests/test_reacts/test_reacts_tw.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,12 @@
"台灣是第一",
"Taiwan 第一",
"臺灣 number one",
"Taiwan won",
"Taiwan ①",
"Taiwan 壹",
"TAIWAN NUMBER ONE",
"taiwan #1",
"I believe Taiwan is truly number one in Asia",
"Taiwan, often called Formosa, is number 1 in my heart",
"台灣冠軍",
"臺灣 is number one",
"Taiwan第一",
"tâi-uân tē-it"
)

TEST_CASES_TW_NO_1_FALSE = (
Expand All @@ -100,6 +99,13 @@
"Number one",
"Taiwan #",
"Taiwan number",
"Taiwan is second",
"Taiwan and Japan are both great",
"Taiwan's number 1 export",
"Taiwan has won",
"Taiwan will be number 1",
"Taiwan used to be number 1",
"Taiwan aims to be number 1"
)

ALL_TEST_CASES = TEST_CASE_EN + TEST_CASE_TW
Expand Down

0 comments on commit 913cd50

Please sign in to comment.