-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from SEPIA-Framework/dev
Update to support SEPIA-Home v2.5.1
- Loading branch information
Showing
15 changed files
with
165 additions
and
26 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/main/java/net/b07z/sepia/sdk/substitutes/AnswerLoaderEmpty.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package net.b07z.sepia.sdk.substitutes; | ||
|
||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import net.b07z.sepia.server.assist.answers.AnswerLoader; | ||
import net.b07z.sepia.server.assist.interpreters.NluResult; | ||
import net.b07z.sepia.server.core.data.Answer; | ||
|
||
/** | ||
* Substitution for a proper {@link AnswerLoader} that simply returns the answer key (or direct answer). | ||
*/ | ||
public class AnswerLoaderEmpty implements AnswerLoader { | ||
|
||
//stores the references to all answers in different languages | ||
Map<String, Map<String, List<Answer>>> answers = new HashMap<>(); | ||
|
||
@Override | ||
public void setupAnswers(){} | ||
|
||
@Override | ||
public void updateAnswerPool(Map<String, Map<String, List<Answer>>> answersPool){ | ||
this.answers = answersPool; | ||
} | ||
|
||
@Override | ||
public String getAnswer(NluResult nluResult, String key){ | ||
return key; | ||
} | ||
@Override | ||
public String getAnswer(NluResult nluResult, String key, Object... wildcards){ | ||
return key; | ||
} | ||
@Override | ||
public String getAnswer(Map<String, List<Answer>> memory, NluResult nluResult, String key){ | ||
return key; | ||
} | ||
@Override | ||
public String getAnswer(Map<String, List<Answer>> memory, NluResult nluResult, String key, Object... wildcards){ | ||
return key; | ||
} | ||
} |