Skip to content

Commit

Permalink
Issue #940: fixed BaseAutoCompleteAnnotator and added rule for Autoco…
Browse files Browse the repository at this point in the history
…mplete case
  • Loading branch information
danielecalda committed May 17, 2024
1 parent 27bf65d commit 3808ae2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -544,20 +544,10 @@ public Uni<QueryAnalysisResponse> queryAnalysis(QueryAnalysisRequest request) {
for (SemanticType maps : semanticTypeList) {
for (Map<String, Object> map : maps) {
Object tokenType = map.get("tokenType");
String value = (String) map.get("value");
int startPos = maps.getPos().get(0);
int endPos = maps.getPos().get(1);
logger.info(startPos);
// if (!value.startsWith(searchText)
// && (tokenType.equals("TEXT"))) {
// continue;
// }

if (startPos > 0 && searchText.contains(value)) {
continue;
}
Object keywordKey = map.get("keywordKey");

if (endPos > 8) {
if (startPos > 0 || keywordKey != null) {
continue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ private boolean _arrayContains(

@Override
public int getLastTokenCount() {
return 5;
return 6;
}

}

0 comments on commit 3808ae2

Please sign in to comment.