static int feedbackScore(S s) {
s = dropWords(s, "bot");
s = dropPunctuation(s);
L<S> tok = nlTok(s);
if (l(tok) != 3) ret 0;
S word = tok.get(1).toLowerCase();
word = collapseWord(word);
if (litlist("nice", "god" /* matches both "god" and "good" :) */, "ok", "corect", "right", "true", "yes", "col" /* cool */).contains(word))
ret 1;
if (litlist("no", "wrong", "bad").contains(word))
ret -1;
ret 0;
}download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment