java - Custom Spellcheck generating errors -


I am loading a file that contains approximately 80,000 words. This will be used as a primary spell check dictionary, the sequence of words has been randomized. There is another file I am loading which has misspelled words that I have to check. In addition, it provides suggestions for misspelled words.

  Public invalid spelling check document (Arrayist & lt; string & gt; dictionary) {start long timeCrack = System.currentTimeMillis (); (String word: archive for paragraphs) (String word: Edit words. ("[^ A-zA-Z_0- 9 '] +")) {int index = collections.binarySearch (dictionary, word.toLowerCase ()); If (index & lt; 0 & amp; amp; amp; length;) (gt)  

From the documentation of:

Otherwise, (- (entry point) - 1) . The insertion point is defined as the point on which the key will be put in the list: index of element before key, or list.size () if all the elements in the list are specified by the key Less.

This means that you sometimes get an indicator that is before the final element in the list. You need to add special handling for this matter (which probably means that you do not know which words may be correct).


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -