Skip to content

Commit

Permalink
redownload API mappings, reimport project, fix wheel count extractor …
Browse files Browse the repository at this point in the history
…for (n) format
  • Loading branch information
Dmitriusan committed Dec 4, 2023
1 parent 479d274 commit 377be1f
Show file tree
Hide file tree
Showing 11 changed files with 3,677 additions and 4,250 deletions.
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/modules/io.irw.Hawk.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/modules/io.irw.Hawk.main.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/modules/io.irw.Hawk.test.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4,080 changes: 535 additions & 3,545 deletions hawk/specs/ebay/buy_browse_v1_oas3.yaml

Large diffs are not rendered by default.

3,793 changes: 3,098 additions & 695 deletions hawk/specs/ebay/buy_feed_v1_oas3.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ protected static Optional<Integer> extractNumberOfWheelsFromText(String titleWit
String shortDescription = lowerCase(shortDescriptionWithMixedCase);
// Try to match an exact number
String[] multipleWheelPatterns = {
"\\b(\\d+)\\s*\\-?\\s*(?:pieces|pcs|pack|set|wheels)\\b",
"\\b(?:lot|set|pack)\\s+of\\s+(\\d+)",
"\\b(\\d+)\\s*\\-?\\s*(?:pieces|pcs|pack|set|wheels)",
"\\b(?:lot|set|pack|pak|pac)\\s+of\\s+(\\d+)",
"\\((\\d+)\\s*(?:\\)|wheel|wheels)",
};
String mergedTitleAndDescription = mergedTexts(title, shortDescription);
for (String patternStr : multipleWheelPatterns) {
Expand Down
11 changes: 11 additions & 0 deletions hawk/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
hawk:
ai: true
sampling:
enabled: false
rate: 0.1
subset:
enabled: true
products:
variants:
- LABEDA_80_MM_WHEELS

spring:
banner:
location: classpath:ehawk-banner.txt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,6 @@ public void testExtractNumberOfWheelsFromText() {
""
));

assertEquals(Optional.empty(), extractNumberOfWheelsFromText(
"Labeda Shooters inline skate 80mm wheels (4)",
""
));

assertEquals(Optional.empty(), extractNumberOfWheelsFromText(
"4 Labeda Lite Soft Gripper Inline Roller Hockey Wheels 80mm w/Bearings +1",
""
Expand All @@ -206,6 +201,11 @@ public void testExtractNumberOfWheelsFromText() {
""
));

assertEquals(Optional.of(4), extractNumberOfWheelsFromText(
"Labeda Shooters inline skate 80mm wheels (4)",
""
));

assertEquals(Optional.empty(), extractNumberOfWheelsFromText(
"Labeda Millennium Gripper Roller Hockey Inline Wheels - Choose Color / Size",
""
Expand Down

0 comments on commit 377be1f

Please sign in to comment.