Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
suggest-task
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
田川
suggest-task
Commits
d835274b
Commit
d835274b
authored
Aug 03, 2022
by
王明范
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pass word with tag
parent
b675b357
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
+8
-1
SuggestTask.java
suggest-task/src/main/java/com/secoo/so/suggest/task/SuggestTask.java
+8
-1
No files found.
suggest-task/src/main/java/com/secoo/so/suggest/task/SuggestTask.java
View file @
d835274b
...
...
@@ -37,7 +37,10 @@ public class SuggestTask {
private
static
int
maxTagSize
=
5
;
private
static
long
startTime
=
System
.
currentTimeMillis
();
private
static
Set
<
String
>
spWordSet
=
new
HashSet
<>(
Arrays
.
asList
(
"靴子"
,
"鞋子"
,
"裤子"
,
"袜子"
,
"裙子"
,
"帽子"
,
"杯子"
,
"箱子"
,
"包包"
,
"包袋"
,
"包带"
,
"表带"
));
private
static
Set
<
String
>
spWordSet
=
new
HashSet
<>(
Arrays
.
asList
(
"靴子"
,
"鞋子"
,
"裤子"
,
"袜子"
,
"裙子"
,
"帽子"
,
"杯子"
,
"箱子"
,
"包包"
,
"包袋"
,
"包带"
,
"表带"
,
"大号"
,
"中号"
,
"小号"
,
"衣服"
,
"t恤"
,
"衣服"
,
"男款"
,
"男士"
,
"男式"
,
"男性"
,
"男童"
,
"女款"
,
"女士"
,
"女式"
,
"女性"
,
"女童"
,
"大象"
));
private
static
List
<
Set
<
String
>>
synonymList
=
new
ArrayList
<>();
public
static
void
main
(
String
[]
args
)
{
...
...
@@ -425,6 +428,10 @@ public class SuggestTask {
// 左边是英文和右边词语也是英文开头,认为是同一个英文词,但是T恤除外
return
true
;
}
if
(
StringUtils
.
isNumber
(
leftSubChar
+
rightSubChar
))
{
// 左右连接处都是数字时,不做tag
return
true
;
}
if
(
rightWord
.
startsWith
(
"色"
))
{
// 通常前面带有颜色词,分开的不做标签
return
true
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment