fix(all): Spelled now received first letter in uppercase.
This commit is contained in:
parent
41f04965d4
commit
b1359bbf09
3 changed files with 5 additions and 1 deletions
|
@ -770,6 +770,7 @@ export class GBMinService {
|
|||
|
||||
const key = min.instance.spellcheckerKey ? min.instance.spellcheckerKey : min.instance.spellcheckerKey;
|
||||
if (key) {
|
||||
text = text.charAt(0).toUpperCase() + text.slice(1);
|
||||
const data = await AzureText.getSpelledText(min.instance.spellcheckerKey, text);
|
||||
if (data !== text) {
|
||||
GBLog.info(`Spelling corrected: ${data}`);
|
||||
|
|
|
@ -132,9 +132,10 @@ export class AskDialog extends IGBDialog {
|
|||
const member = step.context.activity.from;
|
||||
|
||||
// Spells check the input text before translating.
|
||||
|
||||
text = text.charAt(0).toUpperCase() + text.slice(1);
|
||||
const key = min.instance.spellcheckerKey ? min.instance.spellcheckerKey : min.instance.spellcheckerKey;
|
||||
if (key) {
|
||||
|
||||
const data = await AzureText.getSpelledText(min.instance.spellcheckerKey, text);
|
||||
if (data !== text) {
|
||||
GBLog.info(`Spelling corrected (3): ${data}`);
|
||||
|
@ -199,6 +200,7 @@ export class AskDialog extends IGBDialog {
|
|||
|
||||
const key = min.instance.spellcheckerKey ? minBoot.instance.spellcheckerKey : min.instance.spellcheckerKey;
|
||||
if (key) {
|
||||
text = text.charAt(0).toUpperCase() + text.slice(1);
|
||||
const data = await AzureText.getSpelledText(min.instance.spellcheckerKey, text);
|
||||
if (data !== text) {
|
||||
GBLog.info(`Spelling corrected: ${data}`);
|
||||
|
|
|
@ -183,6 +183,7 @@ export class KBService implements IGBKBService {
|
|||
query = query.replace('.', ' ');
|
||||
query = query.replace('/', ' ');
|
||||
query = query.replace('\\', ' ');
|
||||
query = query.replace('\r\n', ' ');
|
||||
|
||||
if (subjects !== null) {
|
||||
const text = KBService.getSubjectItemsSeparatedBySpaces(subjects);
|
||||
|
|
Loading…
Add table
Reference in a new issue