Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
qwgame
Project
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
赵国君
qwgame
Commits
7e243681
Commit
7e243681
authored
Apr 10, 2019
by
hxw2303632
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
在提交完整condition文本时把用到的语义关系名重新检索一遍
parent
190d5d48
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
ActionUtils.java
...qiwu/chatbotbackend/actiongenerate/utils/ActionUtils.java
+10
-0
No files found.
src/main/java/com/qiwu/chatbotbackend/actiongenerate/utils/ActionUtils.java
View file @
7e243681
...
@@ -341,12 +341,14 @@ public class ActionUtils {
...
@@ -341,12 +341,14 @@ public class ActionUtils {
public
void
query4post
(
JSONObject
parameters
){
public
void
query4post
(
JSONObject
parameters
){
Integer
activedConditionId
=
-
1
;
Integer
activedConditionId
=
-
1
;
JSONArray
conditionIdElem
=
null
;
String
finalText
=
""
;
String
finalText
=
""
;
JSONObject
conditionJson
=
null
;
JSONObject
conditionJson
=
null
;
int
botId
=
parameters
.
getInteger
(
"botId"
);
int
botId
=
parameters
.
getInteger
(
"botId"
);
List
<
Condition
>
conditionList
=
helper
.
queryConditionAll
(
botId
);
List
<
Condition
>
conditionList
=
helper
.
queryConditionAll
(
botId
);
List
<
String
>
conditionTextList
=
new
ArrayList
<
String
>();
List
<
String
>
conditionTextList
=
new
ArrayList
<
String
>();
ape
.
setConditionIdPair
(
new
JSONArray
());
for
(
Condition
condition:
conditionList
){
for
(
Condition
condition:
conditionList
){
...
@@ -354,6 +356,13 @@ public class ActionUtils {
...
@@ -354,6 +356,13 @@ public class ActionUtils {
activedConditionId
=
condition
.
getConditionId
();
activedConditionId
=
condition
.
getConditionId
();
conditionTextList
.
add
(
condition
.
getActionText
());
conditionTextList
.
add
(
condition
.
getActionText
());
//添加condition模板id和语义关系名,用于生成关键词单元
conditionJson
=
JSONObject
.
parseObject
(
condition
.
getConditionJsonText
());
conditionIdElem
=
new
JSONArray
();
conditionIdElem
.
add
(
conditionJson
.
get
(
"originConditionId"
));
conditionIdElem
.
add
(
conditionJson
.
getString
(
"relationName"
).
replace
(
"-"
,
"b0"
).
replace
(
"0"
,
"a0"
));
ape
.
getConditionIdPair
().
add
(
conditionIdElem
);
}
}
if
(
activedConditionId
==
-
1
&&
conditionList
.
size
()
>=
1
){
if
(
activedConditionId
==
-
1
&&
conditionList
.
size
()
>=
1
){
...
@@ -1163,3 +1172,4 @@ public class ActionUtils {
...
@@ -1163,3 +1172,4 @@ public class ActionUtils {
}
}
}
}
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