Brandon_Ang
(B Extension Developer)
March 15, 2023, 8:03pm
#1
TextCorrection is an App Inventor extension that enables automatic spelling and grammar correction in text inputs for mobile applications.
Version 1:
com.brandon.textcorrection (2).aix (5.2 KB)
Version 2:
com.brandon.textcorrectionv2.aix (7.2 KB)
This Is My First Extension Developed
Release Date: 3-15-2023
7 Likes
Hey,
Thank you for the great extension. Can you add one more block that identifies if it is a valid word or not. Like if we provide text tree then it returns true and rbsixj then it returns false.
Also what method did you used to autocorrect text?
Thanks…
1 Like
Groza
(95)
March 20, 2023, 1:59pm
#4
What languages does the extension support? English only? although T9 itself corrects errors
Taifun
March 21, 2023, 2:51am
#5
Please provide some example blocks including Do it results so everyone is able to see how this works…
Taifun
Taifun
March 23, 2023, 8:44pm
#6
as we did not get an answer up to now, I examined the source code of the extension
@SimpleFunction(description = "Automatically correct any spelling errors in the input text.")
public String AutoCorrectText(String paramString) {
HashMap<Object, Object> hashMap = new HashMap<>();
hashMap.put("teh", "the");
hashMap.put("wierd", "weird");
hashMap.put("recieve", "receive");
String[] arrayOfString = paramString.split("\\s+");
StringBuilder stringBuilder = new StringBuilder();
for (String str1 : arrayOfString) {
String str2 = (String)hashMap.getOrDefault(str1.toLowerCase(), str1);
stringBuilder.append(str2).append(" ");
}
return stringBuilder.toString().trim();
}
which means, only the 3 misspelled words teh , wierd and recieve will be autocorrected to the , weird or receive …
Taifun
3 Likes
yusufcihan
(Yusuf Cihan)
March 23, 2023, 9:04pm
#7
Taifun:
which means, only the 3 misspelled words teh , wierd and recieve will be autocorrected to the , weird or receive …
Oh, so another misleading extension under the name of “automatic”…