Questions
Use HashSet and TreeSet to implement a spell checker. Specifically, please read the file words.txt, which contains a list of English words, and store them in a set. Then, check the words in a file provided by the user, and provide a list of possible correct spellings.
1. Codes and Files
Codes
1 | import javax.swing.*; |
Files
Please click here to download the dictionary: words.txt
Please click here to download the test file: testPage.txt
2. Outputs
1 | s: a, as, cs, es, gs, is, ks, ls, ms, os, rs, sb, sc, se, sh, si, sm, sn, so, sq, sr, st, ts, us, vs |