TextCorrection - Corrects Any Text Mistakes

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

What languages does the extension support? English only? although T9 itself corrects errors

Please provide some example blocks including Do it results so everyone is able to see how this works…
Taifun

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

Oh, so another misleading extension under the name of “automatic”…