mirror of
https://github.com/Eyre-S/Coeur-Morny-Cono.git
synced 2024-11-22 19:24:53 +08:00
添加 nbnhhsh 模型对 [inputting]"可能的" 支持
This commit is contained in:
parent
c6c9f2b0e9
commit
07f111a6e7
@ -1,6 +1,6 @@
|
|||||||
## Core
|
## Core
|
||||||
|
|
||||||
VERSION = 0.4.3.4
|
VERSION = 0.4.3.5
|
||||||
|
|
||||||
# dependencies
|
# dependencies
|
||||||
|
|
||||||
|
@ -4,6 +4,6 @@ package cc.sukazyo.cono.morny;
|
|||||||
* the final field that will be updated by gradle automatically.
|
* the final field that will be updated by gradle automatically.
|
||||||
*/
|
*/
|
||||||
public class GradleProjectConfigures {
|
public class GradleProjectConfigures {
|
||||||
public static final String VERSION = "0.4.3.4";
|
public static final String VERSION = "0.4.3.5";
|
||||||
public static final long COMPILE_TIMESTAMP = 1642273245554L;
|
public static final long COMPILE_TIMESTAMP = 1642297552612L;
|
||||||
}
|
}
|
||||||
|
@ -28,11 +28,20 @@ public class Nbnhhsh {
|
|||||||
StringBuilder message = new StringBuilder("<a href=\"https://lab.magiconch.com/nbnhhsh/\">## Result of nbnhhsh query :</a>");
|
StringBuilder message = new StringBuilder("<a href=\"https://lab.magiconch.com/nbnhhsh/\">## Result of nbnhhsh query :</a>");
|
||||||
|
|
||||||
for (NbnhhshQuery.Word word : response.words) {
|
for (NbnhhshQuery.Word word : response.words) {
|
||||||
if (word.trans == null) continue;
|
if (word.trans != null && word.trans.length == 0) word.trans = null;
|
||||||
|
if (word.inputting != null && word.inputting.length == 0) word.inputting = null;
|
||||||
|
if (word.trans == null && word.inputting == null) continue;
|
||||||
message.append("\n\n<b>[[ ").append(escapeHtml(word.name)).append(" ]]</b>");
|
message.append("\n\n<b>[[ ").append(escapeHtml(word.name)).append(" ]]</b>");
|
||||||
for (String trans : word.trans) {
|
if (word.trans != null) for (String trans : word.trans) {
|
||||||
message.append("\n* <i>").append(escapeHtml(trans)).append("</i>");
|
message.append("\n* <i>").append(escapeHtml(trans)).append("</i>");
|
||||||
}
|
}
|
||||||
|
if (word.inputting != null) {
|
||||||
|
if (word.trans != null) message.append("\n");
|
||||||
|
message.append(" maybe:");
|
||||||
|
for (String trans : word.inputting) {
|
||||||
|
message.append("\n` <i>").append(escapeHtml(trans)).append("</i>");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MornyCoeur.extra().exec(new SendMessage(
|
MornyCoeur.extra().exec(new SendMessage(
|
||||||
|
@ -16,6 +16,7 @@ public class NbnhhshQuery {
|
|||||||
public static class Word {
|
public static class Word {
|
||||||
public String name;
|
public String name;
|
||||||
public String[] trans;
|
public String[] trans;
|
||||||
|
public String[] inputting;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class GuessResult {
|
public static class GuessResult {
|
||||||
|
Loading…
Reference in New Issue
Block a user