2 * Purple - Replace certain misspelled words with their correct form.
4 * Signification changes were made by Benjamin Kahn ("xkahn") and
5 * Richard Laager ("rlaager") in April 2005--you may want to contact
6 * them if you have questions.
8 * Pidgin is the legal property of its developers, whose names are too numerous
9 * to list here. Please refer to the COPYRIGHT file distributed with this
10 * source distribution.
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
29 * A lot of this code (especially the config code) was taken directly
30 * or nearly directly from xchat, version 1.4.2 by Peter Zelezny and others.
42 #include "gtk3compat.h"
43 #include "gtkplugin.h"
49 #include <sys/types.h>
51 #define SPELLCHECK_PLUGIN_ID "gtk-spellcheck"
52 #define SPELLCHK_OBJECT_KEY "spellchk"
58 CASE_SENSITIVE_COLUMN
,
64 GtkTextMark
*mark_insert_start
;
65 GtkTextMark
*mark_insert_end
;
69 gboolean ignore_correction
;
70 gboolean ignore_correction_on_send
;
74 typedef struct _spellchk spellchk
;
76 static GtkListStore
*model
;
79 is_word_uppercase(const gchar
*word
)
81 for (; word
[0] != '\0'; word
= g_utf8_find_next_char (word
, NULL
)) {
82 gunichar c
= g_utf8_get_char(word
);
84 if (!(g_unichar_isupper(c
) ||
85 g_unichar_ispunct(c
) ||
86 g_unichar_isspace(c
)))
94 is_word_lowercase(const gchar
*word
)
96 for (; word
[0] != '\0'; word
= g_utf8_find_next_char(word
, NULL
)) {
97 gunichar c
= g_utf8_get_char(word
);
99 if (!(g_unichar_islower(c
) ||
100 g_unichar_ispunct(c
) ||
101 g_unichar_isspace(c
)))
109 is_word_proper(const gchar
*word
)
114 if (!g_unichar_isupper(g_utf8_get_char_validated(word
, -1)))
117 return is_word_lowercase(g_utf8_offset_to_pointer(word
, 1));
121 make_word_proper(const gchar
*word
)
124 gchar
*lower
= g_utf8_strdown(word
, -1);
128 bytes
= g_unichar_to_utf8(g_unichar_toupper(g_utf8_get_char(word
)), buf
);
129 g_assert(bytes
>= 0);
130 buf
[MIN((gsize
)bytes
, sizeof(buf
) - 1)] = '\0';
132 ret
= g_strconcat(buf
, g_utf8_offset_to_pointer(lower
, 1), NULL
);
139 substitute_simple_buffer(GtkTextBuffer
*buffer
)
143 GtkTreeIter treeiter
;
146 gtk_text_buffer_get_iter_at_offset(buffer
, &start
, 0);
147 gtk_text_buffer_get_iter_at_offset(buffer
, &end
, 0);
148 gtk_text_iter_forward_to_end(&end
);
150 text
= gtk_text_buffer_get_text(buffer
, &start
, &end
, FALSE
);
152 if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(model
), &treeiter
) && text
) {
160 gtk_tree_model_get_value(GTK_TREE_MODEL(model
), &treeiter
, WORD_ONLY_COLUMN
, &val1
);
161 if (g_value_get_boolean(&val1
))
163 g_value_unset(&val1
);
166 g_value_unset(&val1
);
168 gtk_tree_model_get_value(GTK_TREE_MODEL(model
), &treeiter
, BAD_COLUMN
, &val1
);
169 bad
= g_value_get_string(&val1
);
171 /* using g_utf8_* to get /character/ offsets instead of byte offsets for buffer */
172 if ((cursor
= g_strrstr(text
, bad
)))
178 gtk_tree_model_get_value(GTK_TREE_MODEL(model
), &treeiter
, GOOD_COLUMN
, &val2
);
179 good
= g_value_get_string(&val2
);
181 char_pos
= g_utf8_pointer_to_offset(text
, cursor
);
182 gtk_text_buffer_get_iter_at_offset(buffer
, &start
, char_pos
);
183 gtk_text_buffer_get_iter_at_offset(buffer
, &end
, char_pos
+ g_utf8_strlen(bad
, -1));
184 gtk_text_buffer_delete(buffer
, &start
, &end
);
186 gtk_text_buffer_get_iter_at_offset(buffer
, &start
, char_pos
);
187 gtk_text_buffer_insert(buffer
, &start
, good
, -1);
189 g_value_unset(&val2
);
192 g_value_unset(&val1
);
196 g_value_unset(&val1
);
197 } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(model
), &treeiter
));
205 substitute_word(gchar
*word
)
215 lowerword
= g_utf8_strdown(word
, -1);
216 foldedword
= g_utf8_casefold(word
, -1);
218 if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(model
), &iter
)) {
221 gboolean case_sensitive
;
223 gchar
*tmpbad
= NULL
;
226 gtk_tree_model_get_value(GTK_TREE_MODEL(model
), &iter
, WORD_ONLY_COLUMN
, &val1
);
227 if (!g_value_get_boolean(&val1
)) {
228 g_value_unset(&val1
);
231 g_value_unset(&val1
);
233 gtk_tree_model_get_value(GTK_TREE_MODEL(model
), &iter
, CASE_SENSITIVE_COLUMN
, &val1
);
234 case_sensitive
= g_value_get_boolean(&val1
);
235 g_value_unset(&val1
);
237 gtk_tree_model_get_value(GTK_TREE_MODEL(model
), &iter
, BAD_COLUMN
, &val1
);
238 bad
= g_value_get_string(&val1
);
240 if ((case_sensitive
&& !strcmp(bad
, word
)) ||
241 (!case_sensitive
&& (!strcmp(bad
, lowerword
) ||
242 (!is_word_lowercase(bad
) &&
243 !strcmp((tmpbad
= g_utf8_casefold(bad
, -1)), foldedword
)))))
251 gtk_tree_model_get_value(GTK_TREE_MODEL(model
), &iter
, GOOD_COLUMN
, &val2
);
252 good
= g_value_get_string(&val2
);
254 if (!case_sensitive
&& is_word_lowercase(bad
) && is_word_lowercase(good
))
256 if (is_word_uppercase(word
))
257 outword
= g_utf8_strup(good
, -1);
258 else if (is_word_proper(word
))
259 outword
= make_word_proper(good
);
261 outword
= g_strdup(good
);
264 outword
= g_strdup(good
);
266 g_value_unset(&val1
);
267 g_value_unset(&val2
);
274 g_value_unset(&val1
);
277 } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(model
), &iter
));
286 spellchk_free(spellchk
*spell
)
288 GtkTextBuffer
*buffer
;
290 g_return_if_fail(spell
!= NULL
);
292 buffer
= gtk_text_view_get_buffer(spell
->view
);
294 g_signal_handlers_disconnect_matched(buffer
,
302 /* Pango doesn't know about the "'" character. Let's fix that. */
304 spellchk_inside_word(GtkTextIter
*iter
)
306 gunichar ucs4_char
= gtk_text_iter_get_char(iter
);
310 utf8_str
= g_ucs4_to_utf8(&ucs4_char
, 1, NULL
, NULL
, NULL
);
311 if (utf8_str
!= NULL
)
317 /* Hack because otherwise typing things like U.S. gets difficult
318 * if you have 'u' -> 'you' set as a correction...
320 * Part 1 of 2: This marks . as being an inside-word character. */
328 /* Avoid problems with \r, for example (SF #1289031). */
332 if (gtk_text_iter_inside_word (iter
) == TRUE
)
336 gboolean result
= gtk_text_iter_backward_char(iter
);
337 gboolean output
= gtk_text_iter_inside_word(iter
);
342 * Hack so that "u'll" will correct correctly.
344 ucs4_char
= gtk_text_iter_get_char(iter
);
345 utf8_str
= g_ucs4_to_utf8(&ucs4_char
, 1, NULL
, NULL
, NULL
);
346 if (utf8_str
!= NULL
)
351 if (c
== 'u' || c
== 'U')
353 gtk_text_iter_forward_char(iter
);
358 gtk_text_iter_forward_char(iter
);
370 spellchk_backward_word_start(GtkTextIter
*iter
)
375 output
= gtk_text_iter_backward_word_start(iter
);
377 /* It didn't work... */
381 while (spellchk_inside_word(iter
)) {
382 result
= gtk_text_iter_backward_char(iter
);
384 /* We can't go backwards anymore? We're at the beginning of the word. */
388 if (!spellchk_inside_word(iter
)) {
389 gtk_text_iter_forward_char(iter
);
393 output
= gtk_text_iter_backward_word_start(iter
);
402 check_range(spellchk
*spell
, GtkTextBuffer
*buffer
,
403 GtkTextIter start
, GtkTextIter end
, gboolean sending
)
408 int period_count
= 0;
413 if ((replaced
= substitute_simple_buffer(buffer
)))
415 mark
= gtk_text_buffer_get_insert(buffer
);
416 gtk_text_buffer_get_iter_at_mark(buffer
, &pos
, mark
);
417 spell
->pos
= gtk_text_iter_get_offset(&pos
);
419 gtk_text_buffer_get_iter_at_mark(buffer
, &start
, mark
);
420 gtk_text_buffer_get_iter_at_mark(buffer
, &end
, mark
);
425 /* We need to go backwords to find out if we are inside a word or not. */
426 gtk_text_iter_backward_char(&end
);
428 if (spellchk_inside_word(&end
))
430 gtk_text_iter_forward_char(&end
);
431 return replaced
; /* We only pay attention to whole words. */
435 /* We could be in the middle of a whitespace block. Check for that. */
436 result
= gtk_text_iter_backward_char(&end
);
438 if (!spellchk_inside_word(&end
))
441 gtk_text_iter_forward_char(&end
);
446 gtk_text_iter_forward_char(&end
);
448 /* Move backwards to the beginning of the word. */
449 spellchk_backward_word_start(&start
);
452 spell
->word
= gtk_text_iter_get_text(&start
, &end
);
454 /* Hack because otherwise typing things like U.S. gets difficult
455 * if you have 'u' -> 'you' set as a correction...
457 * Part 2 of 2: This chops periods off the end of the word so
458 * the right substitution entry is found. */
459 tmp
= g_strdup(spell
->word
);
460 if (tmp
!= NULL
&& *tmp
!= '\0') {
462 for (c
= tmp
+ strlen(tmp
) - 1 ; c
!= tmp
; c
--) {
471 if ((word
= substitute_word(tmp
))) {
477 for (i
= 1 ; i
<= period_count
; i
++) {
478 tmp2
= g_strconcat(word
, ".", NULL
);
483 gtk_text_buffer_delete(buffer
, &start
, &end
);
484 gtk_text_buffer_insert(buffer
, &start
, word
, -1);
486 mark
= gtk_text_buffer_get_insert(buffer
);
487 gtk_text_buffer_get_iter_at_mark(buffer
, &pos
, mark
);
488 spell
->pos
= gtk_text_iter_get_offset(&pos
);
502 /* insertion works like this:
503 * - before the text is inserted, we mark the position in the buffer.
504 * - after the text is inserted, we see where our mark is and use that and
505 * the current position to check the entire range of inserted text.
507 * this may be overkill for the common case (inserting one character). */
509 insert_text_before(GtkTextBuffer
*buffer
, GtkTextIter
*iter
,
510 gchar
*text
, gint len
, spellchk
*spell
)
512 if (spell
->inserting
== TRUE
)
515 spell
->inserting
= TRUE
;
520 gtk_text_buffer_move_mark(buffer
, spell
->mark_insert_start
, iter
);
524 insert_text_after(GtkTextBuffer
*buffer
, GtkTextIter
*iter
,
525 gchar
*text
, gint len
, spellchk
*spell
)
527 GtkTextIter start
, end
;
530 spell
->ignore_correction_on_send
= FALSE
;
532 if (spell
->ignore_correction
) {
533 spell
->ignore_correction
= FALSE
;
537 /* we need to check a range of text. */
538 gtk_text_buffer_get_iter_at_mark(buffer
, &start
, spell
->mark_insert_start
);
541 check_range(spell
, buffer
, start
, *iter
, FALSE
);
543 /* if check_range modified the buffer, iter has been invalidated */
544 mark
= gtk_text_buffer_get_insert(buffer
);
545 gtk_text_buffer_get_iter_at_mark(buffer
, &end
, mark
);
546 gtk_text_buffer_move_mark(buffer
, spell
->mark_insert_end
, &end
);
548 spell
->inserting
= FALSE
;
552 delete_range_after(GtkTextBuffer
*buffer
,
553 GtkTextIter
*start
, GtkTextIter
*end
, spellchk
*spell
)
555 GtkTextIter start2
, end2
;
560 spell
->ignore_correction_on_send
= FALSE
;
565 if (spell
->inserting
== TRUE
)
568 spell
->inserting
= TRUE
;
570 mark
= gtk_text_buffer_get_insert(buffer
);
571 gtk_text_buffer_get_iter_at_mark(buffer
, &pos
, mark
);
572 place
= gtk_text_iter_get_offset(&pos
);
574 if ((place
+ 1) != spell
->pos
) {
580 gtk_text_buffer_get_iter_at_mark(buffer
, &start2
, spell
->mark_insert_start
);
581 gtk_text_buffer_get_iter_at_mark(buffer
, &end2
, spell
->mark_insert_end
);
583 gtk_text_buffer_delete(buffer
, &start2
, &end2
);
584 gtk_text_buffer_insert(buffer
, &start2
, spell
->word
, -1);
585 spell
->ignore_correction
= TRUE
;
586 spell
->ignore_correction_on_send
= TRUE
;
588 spell
->inserting
= FALSE
;
594 message_send_cb(GtkWidget
*widget
, spellchk
*spell
)
596 GtkTextBuffer
*buffer
;
597 GtkTextIter start
, end
;
601 if (spell
->ignore_correction_on_send
)
603 spell
->ignore_correction_on_send
= FALSE
;
608 if (!purple_prefs_get_bool("/plugins/gtk/spellchk/last_word_replace"))
612 buffer
= gtk_text_view_get_buffer(spell
->view
);
614 gtk_text_buffer_get_end_iter(buffer
, &start
);
615 gtk_text_buffer_get_end_iter(buffer
, &end
);
616 spell
->inserting
= TRUE
;
617 replaced
= check_range(spell
, buffer
, start
, end
, TRUE
);
618 spell
->inserting
= FALSE
;
620 /* if check_range modified the buffer, iter has been invalidated */
621 mark
= gtk_text_buffer_get_insert(buffer
);
622 gtk_text_buffer_get_iter_at_mark(buffer
, &end
, mark
);
623 gtk_text_buffer_move_mark(buffer
, spell
->mark_insert_end
, &end
);
627 g_signal_stop_emission_by_name(widget
, "message_send");
628 spell
->ignore_correction_on_send
= TRUE
;
633 spellchk_new_attach(PurpleConversation
*conv
)
636 GtkTextBuffer
*buffer
;
637 GtkTextIter start
, end
;
638 PidginConversation
*gtkconv
;
641 gtkconv
= PIDGIN_CONVERSATION(conv
);
643 view
= GTK_TEXT_VIEW(gtkconv
->entry
);
645 spell
= g_object_get_data(G_OBJECT(view
), SPELLCHK_OBJECT_KEY
);
649 /* attach to the widget */
650 spell
= g_new0(spellchk
, 1);
653 g_object_set_data_full(G_OBJECT(view
), SPELLCHK_OBJECT_KEY
, spell
,
654 (GDestroyNotify
)spellchk_free
);
656 buffer
= gtk_text_view_get_buffer(view
);
658 /* we create the mark here, but we don't use it until text is
659 * inserted, so we don't really care where iter points. */
660 gtk_text_buffer_get_bounds(buffer
, &start
, &end
);
661 spell
->mark_insert_start
= gtk_text_buffer_create_mark(buffer
,
662 "spellchk-insert-start",
664 spell
->mark_insert_end
= gtk_text_buffer_create_mark(buffer
,
665 "spellchk-insert-end",
668 g_signal_connect_after(G_OBJECT(buffer
),
670 G_CALLBACK(delete_range_after
), spell
);
671 g_signal_connect(G_OBJECT(buffer
),
673 G_CALLBACK(insert_text_before
), spell
);
674 g_signal_connect_after(G_OBJECT(buffer
),
676 G_CALLBACK(insert_text_after
), spell
);
678 g_signal_connect(G_OBJECT(gtkconv
->entry
), "message_send",
679 G_CALLBACK(message_send_cb
), spell
);
683 static int buf_get_line(char *ibuf
, char **buf
, gsize
*position
, gsize len
)
685 gsize pos
= *position
;
691 while (!(ibuf
[pos
] == '\n' ||
692 (ibuf
[pos
] == '\r' && ibuf
[pos
+ 1] != '\n')))
699 if (pos
!= 0 && ibuf
[pos
] == '\n' && ibuf
[pos
- 1] == '\r')
700 ibuf
[pos
- 1] = '\0';
711 static void load_conf(void)
713 /* Corrections to change "...", "(c)", "(r)", and "(tm)" to their
714 * Unicode character equivalents were not added here even though
715 * they existed in the source list(s). I think these corrections
716 * would be more trouble than they're worth.
718 const char * const defaultconf
=
719 "BAD abbout\nGOOD about\n"
720 "BAD abotu\nGOOD about\n"
721 "BAD abouta\nGOOD about a\n"
722 "BAD aboutit\nGOOD about it\n"
723 "BAD aboutthe\nGOOD about the\n"
724 "BAD abscence\nGOOD absence\n"
725 "BAD accesories\nGOOD accessories\n"
726 "BAD accidant\nGOOD accident\n"
727 "BAD accomodate\nGOOD accommodate\n"
728 "BAD accordingto\nGOOD according to\n"
729 "BAD accross\nGOOD across\n"
730 "BAD acheive\nGOOD achieve\n"
731 "BAD acheived\nGOOD achieved\n"
732 "BAD acheiving\nGOOD achieving\n"
733 "BAD acn\nGOOD can\n"
734 "BAD acommodate\nGOOD accommodate\n"
735 "BAD acomodate\nGOOD accommodate\n"
736 "BAD actualyl\nGOOD actually\n"
737 "BAD additinal\nGOOD additional\n"
738 "BAD addtional\nGOOD additional\n"
739 "BAD adequit\nGOOD adequate\n"
740 "BAD adequite\nGOOD adequate\n"
741 "BAD adn\nGOOD and\n"
742 "BAD advanage\nGOOD advantage\n"
743 "BAD affraid\nGOOD afraid\n"
744 "BAD afterthe\nGOOD after the\n"
745 "COMPLETE 0\nBAD againstt he \nGOOD against the \n"
746 "BAD aganist\nGOOD against\n"
747 "BAD aggresive\nGOOD aggressive\n"
748 "BAD agian\nGOOD again\n"
749 "BAD agreemeent\nGOOD agreement\n"
750 "BAD agreemeents\nGOOD agreements\n"
751 "BAD agreemnet\nGOOD agreement\n"
752 "BAD agreemnets\nGOOD agreements\n"
753 "BAD agressive\nGOOD aggressive\n"
754 "BAD agressiveness\nGOOD aggressiveness\n"
755 "BAD ahd\nGOOD had\n"
756 "BAD ahold\nGOOD a hold\n"
757 "BAD ahppen\nGOOD happen\n"
758 "BAD ahve\nGOOD have\n"
759 "BAD allready\nGOOD already\n"
760 "BAD allwasy\nGOOD always\n"
761 "BAD allwyas\nGOOD always\n"
762 "BAD almots\nGOOD almost\n"
763 "BAD almsot\nGOOD almost\n"
764 "BAD alomst\nGOOD almost\n"
765 "BAD alot\nGOOD a lot\n"
766 "BAD alraedy\nGOOD already\n"
767 "BAD alreayd\nGOOD already\n"
768 "BAD alreday\nGOOD already\n"
769 "BAD alwasy\nGOOD always\n"
770 "BAD alwats\nGOOD always\n"
771 "BAD alway\nGOOD always\n"
772 "BAD alwyas\nGOOD always\n"
773 "BAD amde\nGOOD made\n"
774 "BAD Ameria\nGOOD America\n"
775 "BAD amke\nGOOD make\n"
776 "BAD amkes\nGOOD makes\n"
777 "BAD anbd\nGOOD and\n"
778 "BAD andone\nGOOD and one\n"
779 "BAD andteh\nGOOD and the\n"
780 "BAD andthe\nGOOD and the\n"
781 "COMPLETE 0\nBAD andt he \nGOOD and the \n"
782 "BAD anothe\nGOOD another\n"
783 "BAD anual\nGOOD annual\n"
784 "BAD any1\nGOOD anyone\n"
785 "BAD apparant\nGOOD apparent\n"
786 "BAD apparrent\nGOOD apparent\n"
787 "BAD appearence\nGOOD appearance\n"
788 "BAD appeares\nGOOD appears\n"
789 "BAD applicaiton\nGOOD application\n"
790 "BAD applicaitons\nGOOD applications\n"
791 "BAD applyed\nGOOD applied\n"
792 "BAD appointiment\nGOOD appointment\n"
793 "BAD approrpiate\nGOOD appropriate\n"
794 "BAD approrpriate\nGOOD appropriate\n"
795 "BAD aquisition\nGOOD acquisition\n"
796 "BAD aquisitions\nGOOD acquisitions\n"
797 "BAD arent\nGOOD aren't\n"
798 "COMPLETE 0\nBAD aren;t \nGOOD aren't \n"
799 "BAD arguement\nGOOD argument\n"
800 "BAD arguements\nGOOD arguments\n"
801 "COMPLETE 0\nBAD arn't \nGOOD aren't \n"
802 "BAD arond\nGOOD around\n"
803 "BAD artical\nGOOD article\n"
804 "BAD articel\nGOOD article\n"
805 "BAD asdvertising\nGOOD advertising\n"
806 "COMPLETE 0\nBAD askt he \nGOOD ask the \n"
807 "BAD assistent\nGOOD assistant\n"
808 "BAD asthe\nGOOD as the\n"
809 "BAD atention\nGOOD attention\n"
810 "BAD atmospher\nGOOD atmosphere\n"
811 "BAD attentioin\nGOOD attention\n"
812 "BAD atthe\nGOOD at the\n"
813 "BAD audeince\nGOOD audience\n"
814 "BAD audiance\nGOOD audience\n"
815 "BAD authentification\nGOOD authentication\n"
816 "BAD availalbe\nGOOD available\n"
817 "BAD awya\nGOOD away\n"
818 "BAD aywa\nGOOD away\n"
819 "BAD b4\nGOOD before\n"
820 "BAD bakc\nGOOD back\n"
821 "BAD balence\nGOOD balance\n"
822 "BAD ballance\nGOOD balance\n"
823 "BAD baout\nGOOD about\n"
824 "BAD bcak\nGOOD back\n"
825 "BAD bcuz\nGOOD because\n"
826 "BAD beacuse\nGOOD because\n"
827 "BAD becasue\nGOOD because\n"
828 "BAD becaus\nGOOD because\n"
829 "BAD becausea\nGOOD because a\n"
830 "BAD becauseof\nGOOD because of\n"
831 "BAD becausethe\nGOOD because the\n"
832 "BAD becauseyou\nGOOD because you\n"
833 "COMPLETE 0\nBAD beckon call\nGOOD beck and call\n"
834 "BAD becomeing\nGOOD becoming\n"
835 "BAD becomming\nGOOD becoming\n"
836 "BAD becuase\nGOOD because\n"
837 "BAD becuse\nGOOD because\n"
838 "BAD befoer\nGOOD before\n"
839 "BAD beggining\nGOOD beginning\n"
840 "BAD begining\nGOOD beginning\n"
841 "BAD beginining\nGOOD beginning\n"
842 "BAD beleiev\nGOOD believe\n"
843 "BAD beleieve\nGOOD believe\n"
844 "BAD beleif\nGOOD belief\n"
845 "BAD beleive\nGOOD believe\n"
846 "BAD beleived\nGOOD believed\n"
847 "BAD beleives\nGOOD believes\n"
848 "BAD belive\nGOOD believe\n"
849 "BAD belived\nGOOD believed\n"
850 "BAD belives\nGOOD believes\n"
851 "BAD benifit\nGOOD benefit\n"
852 "BAD benifits\nGOOD benefits\n"
853 "BAD betwen\nGOOD between\n"
854 "BAD beutiful\nGOOD beautiful\n"
855 "BAD blase\nGOOD blas\303\251\n"
856 "BAD boxs\nGOOD boxes\n"
857 "BAD brodcast\nGOOD broadcast\n"
858 "BAD butthe\nGOOD but the\n"
860 "COMPLETE 0\nBAD byt he \nGOOD by the \n"
861 "BAD cafe\nGOOD caf\303\251\n"
862 "BAD caharcter\nGOOD character\n"
863 "BAD calcullated\nGOOD calculated\n"
864 "BAD calulated\nGOOD calculated\n"
865 "BAD candidtae\nGOOD candidate\n"
866 "BAD candidtaes\nGOOD candidates\n"
867 "COMPLETE 0\nBAD case and point\nGOOD case in point\n"
868 "BAD cant\nGOOD can't\n"
869 "COMPLETE 0\nBAD can;t \nGOOD can't \n"
870 "COMPLETE 0\nBAD can't of been\nGOOD can't have been\n"
871 "BAD catagory\nGOOD category\n"
872 "BAD categiory\nGOOD category\n"
873 "BAD certian\nGOOD certain\n"
874 "BAD challange\nGOOD challenge\n"
875 "BAD challanges\nGOOD challenges\n"
876 "BAD chaneg\nGOOD change\n"
877 "BAD chanegs\nGOOD changes\n"
878 "BAD changable\nGOOD changeable\n"
879 "BAD changeing\nGOOD changing\n"
880 "BAD changng\nGOOD changing\n"
881 "BAD charachter\nGOOD character\n"
882 "BAD charachters\nGOOD characters\n"
883 "BAD charactor\nGOOD character\n"
884 "BAD charecter\nGOOD character\n"
885 "BAD charector\nGOOD character\n"
886 "BAD cheif\nGOOD chief\n"
887 "BAD chekc\nGOOD check\n"
888 "BAD chnage\nGOOD change\n"
889 "BAD cieling\nGOOD ceiling\n"
890 "BAD circut\nGOOD circuit\n"
891 "BAD claer\nGOOD clear\n"
892 "BAD claered\nGOOD cleared\n"
893 "BAD claerly\nGOOD clearly\n"
894 "BAD cliant\nGOOD client\n"
895 "BAD cliche\nGOOD clich\303\251\n"
896 "BAD cna\nGOOD can\n"
897 "BAD colection\nGOOD collection\n"
898 "BAD comanies\nGOOD companies\n"
899 "BAD comany\nGOOD company\n"
900 "BAD comapnies\nGOOD companies\n"
901 "BAD comapny\nGOOD company\n"
902 "BAD combintation\nGOOD combination\n"
903 "BAD comited\nGOOD committed\n"
904 "BAD comittee\nGOOD committee\n"
905 "BAD commadn\nGOOD command\n"
906 "BAD comming\nGOOD coming\n"
907 "BAD commitee\nGOOD committee\n"
908 "BAD committe\nGOOD committee\n"
909 "BAD committment\nGOOD commitment\n"
910 "BAD committments\nGOOD commitments\n"
911 "BAD committy\nGOOD committee\n"
912 "BAD comntain\nGOOD contain\n"
913 "BAD comntains\nGOOD contains\n"
914 "BAD compair\nGOOD compare\n"
915 "COMPLETE 0\nBAD company;s \nGOOD company's \n"
916 "BAD competetive\nGOOD competitive\n"
917 "BAD compleated\nGOOD completed\n"
918 "BAD compleatly\nGOOD completely\n"
919 "BAD compleatness\nGOOD completeness\n"
920 "BAD completly\nGOOD completely\n"
921 "BAD completness\nGOOD completeness\n"
922 "BAD composate\nGOOD composite\n"
923 "BAD comtain\nGOOD contain\n"
924 "BAD comtains\nGOOD contains\n"
925 "BAD comunicate\nGOOD communicate\n"
926 "BAD comunity\nGOOD community\n"
927 "BAD condolances\nGOOD condolences\n"
928 "BAD conected\nGOOD connected\n"
929 "BAD conferance\nGOOD conference\n"
930 "BAD confirmmation\nGOOD confirmation\n"
931 "BAD congradulations\nGOOD congratulations\n"
932 "BAD considerit\nGOOD considerate\n"
933 "BAD considerite\nGOOD considerate\n"
934 "BAD consonent\nGOOD consonant\n"
935 "BAD conspiricy\nGOOD conspiracy\n"
936 "BAD consultent\nGOOD consultant\n"
937 "BAD convertable\nGOOD convertible\n"
938 "BAD cooparate\nGOOD cooperate\n"
939 "BAD cooporate\nGOOD cooperate\n"
940 "BAD corproation\nGOOD corporation\n"
941 "BAD corproations\nGOOD corporations\n"
942 "BAD corruptable\nGOOD corruptible\n"
943 "BAD cotten\nGOOD cotton\n"
944 "BAD coudl\nGOOD could\n"
945 "COMPLETE 0\nBAD coudln't \nGOOD couldn't \n"
946 "COMPLETE 0\nBAD coudn't \nGOOD couldn't \n"
947 "BAD couldnt\nGOOD couldn't\n"
948 "COMPLETE 0\nBAD couldn;t \nGOOD couldn't \n"
949 "COMPLETE 0\nBAD could of been\nGOOD could have been\n"
950 "COMPLETE 0\nBAD could of had\nGOOD could have had\n"
951 "BAD couldthe\nGOOD could the\n"
952 "BAD couldve\nGOOD could've\n"
953 "BAD cpoy\nGOOD copy\n"
954 "BAD creme\nGOOD cr\303\250me\n"
955 "BAD ctaegory\nGOOD category\n"
956 "BAD cu\nGOOD see you\n"
957 "BAD cusotmer\nGOOD customer\n"
958 "BAD cusotmers\nGOOD customers\n"
959 "BAD cutsomer\nGOOD customer\n"
960 "BAD cutsomers\nGOOD customer\n"
961 "BAD cuz\nGOOD because\n"
962 "BAD cxan\nGOOD can\n"
963 "BAD danceing\nGOOD dancing\n"
964 "BAD dcument\nGOOD document\n"
965 "BAD deatils\nGOOD details\n"
966 "BAD decison\nGOOD decision\n"
967 "BAD decisons\nGOOD decisions\n"
968 "BAD decor\nGOOD d\303\251cor\n"
969 "BAD defendent\nGOOD defendant\n"
970 "BAD definately\nGOOD definitely\n"
971 "COMPLETE 0\nBAD deja vu\nGOOD d\303\251j\303\240 vu\n"
972 "BAD deptartment\nGOOD department\n"
973 "BAD desicion\nGOOD decision\n"
974 "BAD desicions\nGOOD decisions\n"
975 "BAD desision\nGOOD decision\n"
976 "BAD desisions\nGOOD decisions\n"
977 "BAD detente\nGOOD d\303\251tente\n"
978 "BAD develeoprs\nGOOD developers\n"
979 "BAD devellop\nGOOD develop\n"
980 "BAD develloped\nGOOD developed\n"
981 "BAD develloper\nGOOD developer\n"
982 "BAD devellopers\nGOOD developers\n"
983 "BAD develloping\nGOOD developing\n"
984 "BAD devellopment\nGOOD development\n"
985 "BAD devellopments\nGOOD developments\n"
986 "BAD devellops\nGOOD develop\n"
987 "BAD develope\nGOOD develop\n"
988 "BAD developement\nGOOD development\n"
989 "BAD developements\nGOOD developments\n"
990 "BAD developor\nGOOD developer\n"
991 "BAD developors\nGOOD developers\n"
992 "BAD develpment\nGOOD development\n"
993 "BAD diaplay\nGOOD display\n"
994 "BAD didint\nGOOD didn't\n"
995 "BAD didnot\nGOOD did not\n"
996 "BAD didnt\nGOOD didn't\n"
997 "COMPLETE 0\nBAD didn;t \nGOOD didn't \n"
998 "BAD difefrent\nGOOD different\n"
999 "BAD diferences\nGOOD differences\n"
1000 "BAD differance\nGOOD difference\n"
1001 "BAD differances\nGOOD differences\n"
1002 "BAD differant\nGOOD different\n"
1003 "BAD differemt\nGOOD different\n"
1004 "BAD differnt\nGOOD different\n"
1005 "BAD diffrent\nGOOD different\n"
1006 "BAD directer\nGOOD director\n"
1007 "BAD directers\nGOOD directors\n"
1008 "BAD directiosn\nGOOD direction\n"
1009 "BAD disatisfied\nGOOD dissatisfied\n"
1010 "BAD discoverd\nGOOD discovered\n"
1011 "BAD disign\nGOOD design\n"
1012 "BAD dispaly\nGOOD display\n"
1013 "BAD dissonent\nGOOD dissonant\n"
1014 "BAD distribusion\nGOOD distribution\n"
1015 "BAD divsion\nGOOD division\n"
1016 "BAD docuement\nGOOD documents\n"
1017 "BAD docuemnt\nGOOD document\n"
1018 "BAD documetn\nGOOD document\n"
1019 "BAD documnet\nGOOD document\n"
1020 "BAD documnets\nGOOD documents\n"
1021 "COMPLETE 0\nBAD doens't \nGOOD doesn't \n"
1022 "BAD doese\nGOOD does\n"
1023 "COMPLETE 0\nBAD doe snot \nGOOD does not \n"
1024 "BAD doesnt\nGOOD doesn't\n"
1025 "COMPLETE 0\nBAD doesn;t \nGOOD doesn't \n"
1026 "BAD doign\nGOOD doing\n"
1027 "BAD doimg\nGOOD doing\n"
1028 "BAD doind\nGOOD doing\n"
1029 "BAD dollers\nGOOD dollars\n"
1030 "BAD donig\nGOOD doing\n"
1031 "BAD donno\nGOOD don't know\n"
1032 "BAD dont\nGOOD don't\n"
1033 "COMPLETE 0\nBAD do'nt \nGOOD don't \n"
1034 "COMPLETE 0\nBAD don;t \nGOOD don't \n"
1035 "COMPLETE 0\nBAD don't no \nGOOD don't know \n"
1036 "COMPLETE 0\nBAD dosn't \nGOOD doesn't \n"
1037 "BAD driveing\nGOOD driving\n"
1038 "BAD drnik\nGOOD drink\n"
1039 "BAD dunno\nGOOD don't know\n"
1040 "BAD eclair\nGOOD \303\251clair\n"
1041 "BAD efel\nGOOD feel\n"
1042 "BAD effecient\nGOOD efficient\n"
1043 "BAD efort\nGOOD effort\n"
1044 "BAD eforts\nGOOD efforts\n"
1045 "BAD ehr\nGOOD her\n"
1046 "BAD eligable\nGOOD eligible\n"
1047 "BAD embarass\nGOOD embarrass\n"
1048 "BAD emigre\nGOOD \303\251migr\303\251\n"
1049 "BAD enought\nGOOD enough\n"
1050 "BAD entree\nGOOD entr\303\251e\n"
1051 "BAD enuf\nGOOD enough\n"
1052 "BAD equippment\nGOOD equipment\n"
1053 "BAD equivalant\nGOOD equivalent\n"
1054 "BAD esle\nGOOD else\n"
1055 "BAD especally\nGOOD especially\n"
1056 "BAD especialyl\nGOOD especially\n"
1057 "BAD espesially\nGOOD especially\n"
1058 "BAD essense\nGOOD essence\n"
1059 "BAD excellance\nGOOD excellence\n"
1060 "BAD excellant\nGOOD excellent\n"
1061 "BAD excercise\nGOOD exercise\n"
1062 "BAD exchagne\nGOOD exchange\n"
1063 "BAD exchagnes\nGOOD exchanges\n"
1064 "BAD excitment\nGOOD excitement\n"
1065 "BAD exhcange\nGOOD exchange\n"
1066 "BAD exhcanges\nGOOD exchanges\n"
1067 "BAD experiance\nGOOD experience\n"
1068 "BAD experienc\nGOOD experience\n"
1069 "BAD exprience\nGOOD experience\n"
1070 "BAD exprienced\nGOOD experienced\n"
1071 "BAD eyt\nGOOD yet\n"
1072 "BAD facade\nGOOD fa\303\247ade\n"
1073 "BAD faeture\nGOOD feature\n"
1074 "BAD faetures\nGOOD feature\n"
1075 "BAD familair\nGOOD familiar\n"
1076 "BAD familar\nGOOD familiar\n"
1077 "BAD familliar\nGOOD familiar\n"
1078 "BAD fammiliar\nGOOD familiar\n"
1079 "BAD feild\nGOOD field\n"
1080 "BAD feilds\nGOOD fields\n"
1081 "BAD fianlly\nGOOD finally\n"
1082 "BAD fidn\nGOOD find\n"
1083 "BAD finalyl\nGOOD finally\n"
1084 "BAD firends\nGOOD friends\n"
1085 "BAD firts\nGOOD first\n"
1086 "BAD follwo\nGOOD follow\n"
1087 "BAD follwoing\nGOOD following\n"
1088 "BAD fora\nGOOD for a\n"
1089 "COMPLETE 0\nBAD for all intensive purposes\nfor all intents and purposes\n"
1090 "BAD foriegn\nGOOD foreign\n"
1091 "BAD forthe\nGOOD for the\n"
1092 "BAD forwrd\nGOOD forward\n"
1093 "BAD forwrds\nGOOD forwards\n"
1094 "BAD foudn\nGOOD found\n"
1095 "BAD foward\nGOOD forward\n"
1096 "BAD fowards\nGOOD forwards\n"
1097 "BAD freind\nGOOD friend\n"
1098 "BAD freindly\nGOOD friendly\n"
1099 "BAD freinds\nGOOD friends\n"
1100 "BAD friday\nGOOD Friday\n"
1101 "BAD frmo\nGOOD from\n"
1102 "BAD fromthe\nGOOD from the\n"
1103 "COMPLETE 0\nBAD fromt he \nGOOD from the \n"
1104 "BAD furneral\nGOOD funeral\n"
1105 "BAD fwe\nGOOD few\n"
1106 "BAD garantee\nGOOD guarantee\n"
1107 "BAD gaurd\nGOOD guard\n"
1108 "BAD gemeral\nGOOD general\n"
1109 "BAD gerat\nGOOD great\n"
1110 "BAD geting\nGOOD getting\n"
1111 "BAD gettin\nGOOD getting\n"
1112 "BAD gievn\nGOOD given\n"
1113 "BAD giveing\nGOOD giving\n"
1114 "BAD gloabl\nGOOD global\n"
1115 "BAD goign\nGOOD going\n"
1116 "BAD gonig\nGOOD going\n"
1117 "BAD govenment\nGOOD government\n"
1118 "BAD goverment\nGOOD government\n"
1119 "BAD gruop\nGOOD group\n"
1120 "BAD gruops\nGOOD groups\n"
1121 "BAD grwo\nGOOD grow\n"
1122 "BAD guidlines\nGOOD guidelines\n"
1123 "BAD hadbeen\nGOOD had been\n"
1124 "BAD hadnt\nGOOD hadn't\n"
1125 "COMPLETE 0\nBAD hadn;t \nGOOD hadn't \n"
1126 "BAD haev\nGOOD have\n"
1127 "BAD hapen\nGOOD happen\n"
1128 "BAD hapened\nGOOD happened\n"
1129 "BAD hapening\nGOOD happening\n"
1130 "BAD hapens\nGOOD happens\n"
1131 "BAD happend\nGOOD happened\n"
1132 "BAD hasbeen\nGOOD has been\n"
1133 "BAD hasnt\nGOOD hasn't\n"
1134 "COMPLETE 0\nBAD hasn;t \nGOOD hasn't \n"
1135 "BAD havebeen\nGOOD have been\n"
1136 "BAD haveing\nGOOD having\n"
1137 "BAD havent\nGOOD haven't\n"
1138 "COMPLETE 0\nBAD haven;t \nGOOD haven't \n"
1139 "BAD hda\nGOOD had\n"
1140 "BAD hearign\nGOOD hearing\n"
1141 "COMPLETE 0\nBAD he;d \nGOOD he'd \n"
1142 "BAD heirarchy\nGOOD hierarchy\n"
1143 "BAD hel\nGOOD he'll\n"
1144 "COMPLETE 0\nBAD he;ll \nGOOD he'll \n"
1145 "BAD helpfull\nGOOD helpful\n"
1146 "BAD herat\nGOOD heart\n"
1147 "BAD heres\nGOOD here's\n"
1148 "COMPLETE 0\nBAD here;s \nGOOD here's \n"
1149 "BAD hes\nGOOD he's\n"
1150 "COMPLETE 0\nBAD he;s \nGOOD he's \n"
1151 "BAD hesaid\nGOOD he said\n"
1152 "BAD hewas\nGOOD he was\n"
1153 "BAD hge\nGOOD he\n"
1154 "BAD hismelf\nGOOD himself\n"
1155 "BAD hlep\nGOOD help\n"
1156 "BAD hott\nGOOD hot\n"
1157 "BAD hows\nGOOD how's\n"
1158 "BAD hsa\nGOOD has\n"
1159 "BAD hse\nGOOD she\n"
1160 "BAD hsi\nGOOD his\n"
1161 "BAD hte\nGOOD the\n"
1162 "BAD htere\nGOOD there\n"
1163 "BAD htese\nGOOD these\n"
1164 "BAD htey\nGOOD they\n"
1165 "BAD hting\nGOOD thing\n"
1166 "BAD htink\nGOOD think\n"
1167 "BAD htis\nGOOD this\n"
1168 "COMPLETE 0\nBAD htp:\nGOOD http:\n"
1169 "COMPLETE 0\nBAD http:\\\\nGOOD http://\n"
1170 "BAD httpL\nGOOD http:\n"
1171 "BAD hvae\nGOOD have\n"
1172 "BAD hvaing\nGOOD having\n"
1173 "BAD hwich\nGOOD which\n"
1175 "COMPLETE 0\nBAD i c \nGOOD I see \n"
1176 "COMPLETE 0\nBAD i;d \nGOOD I'd \n"
1177 "COMPLETE 0\nBAD i'd \nGOOD I'd \n"
1178 "COMPLETE 0\nBAD I;d \nGOOD I'd \n"
1179 "BAD idae\nGOOD idea\n"
1180 "BAD idaes\nGOOD ideas\n"
1181 "BAD identofy\nGOOD identify\n"
1182 "BAD ihs\nGOOD his\n"
1183 "BAD iits the\nGOOD it's the\n"
1184 "COMPLETE 0\nBAD i'll \nGOOD I'll \n"
1185 "COMPLETE 0\nBAD I;ll \nGOOD I'll \n"
1186 "COMPLETE 0\nBAD i;m \nGOOD I'm \n"
1187 "COMPLETE 0\nBAD i'm \nGOOD I'm \n"
1188 "COMPLETE 0\nBAD I\"m \nGOOD I'm \n"
1189 "BAD imediate\nGOOD immediate\n"
1190 "BAD imediatly\nGOOD immediately\n"
1191 "BAD immediatly\nGOOD immediately\n"
1192 "BAD importent\nGOOD important\n"
1193 "BAD importnat\nGOOD important\n"
1194 "BAD impossable\nGOOD impossible\n"
1195 "BAD improvemnt\nGOOD improvement\n"
1196 "BAD improvment\nGOOD improvement\n"
1197 "BAD includ\nGOOD include\n"
1198 "BAD indecate\nGOOD indicate\n"
1199 "BAD indenpendence\nGOOD independence\n"
1200 "BAD indenpendent\nGOOD independent\n"
1201 "BAD indepedent\nGOOD independent\n"
1202 "BAD independance\nGOOD independence\n"
1203 "BAD independant\nGOOD independent\n"
1204 "BAD influance\nGOOD influence\n"
1205 "BAD infomation\nGOOD information\n"
1206 "BAD informatoin\nGOOD information\n"
1207 "BAD inital\nGOOD initial\n"
1208 "BAD instaleld\nGOOD installed\n"
1209 "BAD insted\nGOOD instead\n"
1210 "BAD insurence\nGOOD insurance\n"
1211 "BAD inteh\nGOOD in the\n"
1212 "BAD interum\nGOOD interim\n"
1213 "BAD inthe\nGOOD in the\n"
1214 "COMPLETE 0\nBAD int he \nGOOD in the \n"
1215 "BAD inturn\nGOOD intern\n"
1216 "BAD inwhich\nGOOD in which\n"
1217 "COMPLETE 0\nBAD i snot \nGOOD is not \n"
1218 "BAD isnt\nGOOD isn't\n"
1219 "COMPLETE 0\nBAD isn;t \nGOOD isn't \n"
1220 "BAD isthe\nGOOD is the\n"
1221 "BAD itd\nGOOD it'd\n"
1222 "COMPLETE 0\nBAD it;d \nGOOD it'd \n"
1223 "BAD itis\nGOOD it is\n"
1224 "BAD ititial\nGOOD initial\n"
1225 "BAD itll\nGOOD it'll\n"
1226 "COMPLETE 0\nBAD it;ll \nGOOD it'll \n"
1227 "BAD itnerest\nGOOD interest\n"
1228 "BAD itnerested\nGOOD interested\n"
1229 "BAD itneresting\nGOOD interesting\n"
1230 "BAD itnerests\nGOOD interests\n"
1231 "COMPLETE 0\nBAD it;s \nGOOD it's \n"
1232 "BAD itsa\nGOOD it's a\n"
1233 "COMPLETE 0\nBAD its a \nGOOD it's a \n"
1234 "COMPLETE 0\nBAD it snot \nGOOD it's not \n"
1235 "COMPLETE 0\nBAD it' snot \nGOOD it's not \n"
1236 "COMPLETE 0\nBAD its the \nGOOD it's the \n"
1237 "BAD itwas\nGOOD it was\n"
1238 "BAD ive\nGOOD I've\n"
1239 "COMPLETE 0\nBAD i;ve \nGOOD I've \n"
1240 "COMPLETE 0\nBAD i've \nGOOD I've \n"
1241 "BAD iwll\nGOOD will\n"
1242 "BAD iwth\nGOOD with\n"
1243 "BAD jsut\nGOOD just\n"
1244 "BAD jugment\nGOOD judgment\n"
1245 "BAD kno\nGOOD know\n"
1246 "BAD knowldge\nGOOD knowledge\n"
1247 "BAD knowlege\nGOOD knowledge\n"
1248 "BAD knwo\nGOOD know\n"
1249 "BAD knwon\nGOOD known\n"
1250 "BAD knwos\nGOOD knows\n"
1251 "BAD konw\nGOOD know\n"
1252 "BAD konwn\nGOOD known\n"
1253 "BAD konws\nGOOD knows\n"
1254 "BAD labratory\nGOOD laboratory\n"
1255 "BAD labtop\nGOOD laptop\n"
1256 "BAD lastyear\nGOOD last year\n"
1257 "BAD laterz\nGOOD later\n"
1258 "BAD learnign\nGOOD learning\n"
1259 "BAD lenght\nGOOD length\n"
1260 "COMPLETE 0\nBAD let;s \nGOOD let's \n"
1261 "COMPLETE 0\nBAD let's him \nGOOD lets him \n"
1262 "COMPLETE 0\nBAD let's it \nGOOD lets it \n"
1263 "BAD levle\nGOOD level\n"
1264 "BAD libary\nGOOD library\n"
1265 "BAD librarry\nGOOD library\n"
1266 "BAD librery\nGOOD library\n"
1267 "BAD liek\nGOOD like\n"
1268 "BAD liekd\nGOOD liked\n"
1269 "BAD lieutenent\nGOOD lieutenant\n"
1270 "BAD liev\nGOOD live\n"
1271 "BAD likly\nGOOD likely\n"
1272 "BAD lisense\nGOOD license\n"
1273 "BAD littel\nGOOD little\n"
1274 "BAD litttle\nGOOD little\n"
1275 "BAD liuke\nGOOD like\n"
1276 "BAD liveing\nGOOD living\n"
1277 "BAD loev\nGOOD love\n"
1278 "BAD lonly\nGOOD lonely\n"
1279 "BAD lookign\nGOOD looking\n"
1281 "BAD maintainence\nGOOD maintenance\n"
1282 "BAD maintenence\nGOOD maintenance\n"
1283 "BAD makeing\nGOOD making\n"
1284 "BAD managment\nGOOD management\n"
1285 "BAD mantain\nGOOD maintain\n"
1286 "BAD marraige\nGOOD marriage\n"
1287 "COMPLETE 0\nBAD may of been\nGOOD may have been\n"
1288 "COMPLETE 0\nBAD may of had\nGOOD may have had\n"
1289 "BAD memeber\nGOOD member\n"
1290 "BAD merchent\nGOOD merchant\n"
1291 "BAD mesage\nGOOD message\n"
1292 "BAD mesages\nGOOD messages\n"
1293 "COMPLETE 0\nBAD might of been\nGOOD might have been\n"
1294 "COMPLETE 0\nBAD might of had\nGOOD might have had\n"
1295 "BAD mispell\nGOOD misspell\n"
1296 "BAD mispelling\nGOOD misspelling\n"
1297 "BAD mispellings\nGOOD misspellings\n"
1298 "BAD mkae\nGOOD make\n"
1299 "BAD mkaes\nGOOD makes\n"
1300 "BAD mkaing\nGOOD making\n"
1301 "BAD moeny\nGOOD money\n"
1302 "BAD monday\nGOOD Monday\n"
1303 "BAD morgage\nGOOD mortgage\n"
1304 "BAD mroe\nGOOD more\n"
1305 "COMPLETE 0\nBAD must of been\nGOOD must have been\n"
1306 "COMPLETE 0\nBAD must of had\nGOOD must have had\n"
1307 "COMPLETE 0\nBAD mute point\nGOOD moot point\n"
1308 "BAD mysefl\nGOOD myself\n"
1309 "BAD myu\nGOOD my\n"
1310 "BAD naive\nGOOD naïve\n"
1311 "BAD ne1\nGOOD anyone\n"
1312 "BAD neway\nGOOD anyway\n"
1313 "BAD neways\nGOOD anyways\n"
1314 "BAD necassarily\nGOOD necessarily\n"
1315 "BAD necassary\nGOOD necessary\n"
1316 "BAD neccessarily\nGOOD necessarily\n"
1317 "BAD neccessary\nGOOD necessary\n"
1318 "BAD necesarily\nGOOD necessarily\n"
1319 "BAD necesary\nGOOD necessary\n"
1320 "BAD negotiaing\nGOOD negotiating\n"
1321 "BAD nkow\nGOOD know\n"
1322 "BAD nothign\nGOOD nothing\n"
1323 "BAD nto\nGOOD not\n"
1324 "BAD nver\nGOOD never\n"
1325 "BAD nwe\nGOOD new\n"
1326 "BAD nwo\nGOOD now\n"
1327 "BAD obediant\nGOOD obedient\n"
1328 "BAD ocasion\nGOOD occasion\n"
1329 "BAD occassion\nGOOD occasion\n"
1330 "BAD occurance\nGOOD occurrence\n"
1331 "BAD occured\nGOOD occurred\n"
1332 "BAD occurence\nGOOD occurrence\n"
1333 "BAD occurrance\nGOOD occurrence\n"
1334 "BAD oclock\nGOOD o'clock\n"
1335 "BAD oculd\nGOOD could\n"
1336 "BAD ocur\nGOOD occur\n"
1337 "BAD oeprator\nGOOD operator\n"
1338 "BAD ofits\nGOOD of its\n"
1339 "BAD ofthe\nGOOD of the\n"
1340 "BAD oft he\nGOOD of the\n"
1341 "BAD oging\nGOOD going\n"
1342 "BAD ohter\nGOOD other\n"
1343 "BAD omre\nGOOD more\n"
1344 "BAD oneof\nGOOD one of\n"
1345 "BAD onepoint\nGOOD one point\n"
1346 "BAD onthe\nGOOD on the\n"
1347 "COMPLETE 0\nBAD ont he \nGOOD on the \n"
1348 "BAD onyl\nGOOD only\n"
1349 "BAD oppasite\nGOOD opposite\n"
1350 "BAD opperation\nGOOD operation\n"
1351 "BAD oppertunity\nGOOD opportunity\n"
1352 "BAD opposate\nGOOD opposite\n"
1353 "BAD opposible\nGOOD opposable\n"
1354 "BAD opposit\nGOOD opposite\n"
1355 "BAD oppotunities\nGOOD opportunities\n"
1356 "BAD oppotunity\nGOOD opportunity\n"
1357 "BAD orginization\nGOOD organization\n"
1358 "BAD orginized\nGOOD organized\n"
1359 "BAD otehr\nGOOD other\n"
1360 "BAD otu\nGOOD out\n"
1361 "BAD outof\nGOOD out of\n"
1362 "BAD overthe\nGOOD over the\n"
1363 "BAD owrk\nGOOD work\n"
1364 "BAD owuld\nGOOD would\n"
1365 "BAD oxident\nGOOD oxidant\n"
1366 "BAD papaer\nGOOD paper\n"
1367 "BAD passe\nGOOD pass\303\251\n"
1368 "BAD parliment\nGOOD parliament\n"
1369 "BAD partof\nGOOD part of\n"
1370 "BAD paymetn\nGOOD payment\n"
1371 "BAD paymetns\nGOOD payments\n"
1372 "BAD pciture\nGOOD picture\n"
1373 "BAD peice\nGOOD piece\n"
1374 "BAD peices\nGOOD pieces\n"
1375 "BAD peolpe\nGOOD people\n"
1376 "BAD peopel\nGOOD people\n"
1377 "BAD percentof\nGOOD percent of\n"
1378 "BAD percentto\nGOOD percent to\n"
1379 "BAD performence\nGOOD performance\n"
1380 "BAD perhasp\nGOOD perhaps\n"
1381 "BAD perhpas\nGOOD perhaps\n"
1382 "BAD permanant\nGOOD permanent\n"
1383 "BAD perminent\nGOOD permanent\n"
1384 "BAD personalyl\nGOOD personally\n"
1385 "BAD pleasent\nGOOD pleasant\n"
1386 "BAD pls\nGOOD please\n"
1387 "BAD plz\nGOOD please\n"
1388 "BAD poeple\nGOOD people\n"
1389 "BAD porblem\nGOOD problem\n"
1390 "BAD porblems\nGOOD problems\n"
1391 "BAD porvide\nGOOD provide\n"
1392 "BAD possable\nGOOD possible\n"
1393 "BAD postition\nGOOD position\n"
1394 "BAD potatoe\nGOOD potato\n"
1395 "BAD potatos\nGOOD potatoes\n"
1396 "BAD potentialy\nGOOD potentially\n"
1397 "BAD ppl\nGOOD people\n"
1398 "BAD pregnent\nGOOD pregnant\n"
1399 "BAD presance\nGOOD presence\n"
1400 "BAD primative\nGOOD primitive\n"
1401 "BAD probally\nGOOD probably\n"
1402 "BAD probelm\nGOOD problem\n"
1403 "BAD probelms\nGOOD problems\n"
1404 "BAD probly\nGOOD probably\n"
1405 "BAD prolly\nGOOD probably\n"
1406 "BAD proly\nGOOD probably\n"
1407 "BAD prominant\nGOOD prominent\n"
1408 "BAD proposterous\nGOOD preposterous\n"
1409 "BAD protege\nGOOD prot\303\251g\303\251\n"
1410 "BAD protoge\nGOOD prot\303\251g\303\251\n"
1411 "BAD psoition\nGOOD position\n"
1412 "BAD ptogress\nGOOD progress\n"
1413 "BAD pursuade\nGOOD persuade\n"
1414 "BAD puting\nGOOD putting\n"
1415 "BAD pwoer\nGOOD power\n"
1416 "BAD quater\nGOOD quarter\n"
1417 "BAD quaters\nGOOD quarters\n"
1418 "BAD quesion\nGOOD question\n"
1419 "BAD quesions\nGOOD questions\n"
1420 "BAD questioms\nGOOD questions\n"
1421 "BAD questiosn\nGOOD questions\n"
1422 "BAD questoin\nGOOD question\n"
1423 "BAD quetion\nGOOD question\n"
1424 "BAD quetions\nGOOD questions\n"
1426 "BAD raeson\nGOOD reason\n"
1427 "BAD realyl\nGOOD really\n"
1428 "BAD reccomend\nGOOD recommend\n"
1429 "BAD reccommend\nGOOD recommend\n"
1430 "BAD receieve\nGOOD receive\n"
1431 "BAD recieve\nGOOD receive\n"
1432 "BAD recieved\nGOOD received\n"
1433 "BAD recieving\nGOOD receiving\n"
1434 "BAD recomend\nGOOD recommend\n"
1435 "BAD recomendation\nGOOD recommendation\n"
1436 "BAD recomendations\nGOOD recommendations\n"
1437 "BAD recomended\nGOOD recommended\n"
1438 "BAD reconize\nGOOD recognize\n"
1439 "BAD recrod\nGOOD record\n"
1440 "BAD rediculous\nGOOD ridiculous\n"
1441 "BAD rediculus\nGOOD ridiculous\n"
1442 "BAD reguard\nGOOD regard\n"
1443 "BAD religous\nGOOD religious\n"
1444 "BAD reluctent\nGOOD reluctant\n"
1445 "BAD remeber\nGOOD remember\n"
1446 "BAD reommend\nGOOD recommend\n"
1447 "BAD representativs\nGOOD representatives\n"
1448 "BAD representives\nGOOD representatives\n"
1449 "BAD represetned\nGOOD represented\n"
1450 "BAD represnt\nGOOD represent\n"
1451 "BAD reserach\nGOOD research\n"
1452 "BAD resollution\nGOOD resolution\n"
1453 "BAD resorces\nGOOD resources\n"
1454 "BAD respomd\nGOOD respond\n"
1455 "BAD respomse\nGOOD response\n"
1456 "BAD responce\nGOOD response\n"
1457 "BAD responsability\nGOOD responsibility\n"
1458 "BAD responsable\nGOOD responsible\n"
1459 "BAD responsibile\nGOOD responsible\n"
1460 "BAD responsiblity\nGOOD responsibility\n"
1461 "BAD restaraunt\nGOOD restaurant\n"
1462 "BAD restuarant\nGOOD restaurant\n"
1463 "BAD reult\nGOOD result\n"
1464 "BAD reveiw\nGOOD review\n"
1465 "BAD reveiwing\nGOOD reviewing\n"
1466 "BAD rumers\nGOOD rumors\n"
1467 "BAD rwite\nGOOD write\n"
1468 "BAD rythm\nGOOD rhythm\n"
1469 "BAD saidhe\nGOOD said he\n"
1470 "BAD saidit\nGOOD said it\n"
1471 "BAD saidthat\nGOOD said that\n"
1472 "BAD saidthe\nGOOD said the\n"
1473 "COMPLETE 0\nBAD saidt he \nGOOD said the \n"
1474 "BAD sandwhich\nGOOD sandwich\n"
1475 "BAD sandwitch\nGOOD sandwich\n"
1476 "BAD saturday\nGOOD Saturday\n"
1477 "BAD scedule\nGOOD schedule\n"
1478 "BAD sceduled\nGOOD scheduled\n"
1479 "BAD seance\nGOOD s\303\251ance\n"
1480 "BAD secratary\nGOOD secretary\n"
1481 "BAD sectino\nGOOD section\n"
1482 "BAD seh\nGOOD she\n"
1483 "BAD selectoin\nGOOD selection\n"
1484 "BAD sence\nGOOD sense\n"
1485 "BAD sentance\nGOOD sentence\n"
1486 "BAD separeate\nGOOD separate\n"
1487 "BAD seperate\nGOOD separate\n"
1488 "BAD sercumstances\nGOOD circumstances\n"
1489 "BAD shcool\nGOOD school\n"
1490 "COMPLETE 0\nBAD she;d \nGOOD she'd \n"
1491 "COMPLETE 0\nBAD she;ll \nGOOD she'll \n"
1492 "BAD shes\nGOOD she's\n"
1493 "COMPLETE 0\nBAD she;s \nGOOD she's \n"
1494 "BAD shesaid\nGOOD she said\n"
1495 "BAD shineing\nGOOD shining\n"
1496 "BAD shiped\nGOOD shipped\n"
1497 "BAD shoudl\nGOOD should\n"
1498 "COMPLETE 0\nBAD shoudln't \nGOOD shouldn't \n"
1499 "BAD shouldent\nGOOD shouldn't\n"
1500 "BAD shouldnt\nGOOD shouldn't\n"
1501 "COMPLETE 0\nBAD shouldn;t \nGOOD shouldn't \n"
1502 "COMPLETE 0\nBAD should of been\nGOOD should have been\n"
1503 "COMPLETE 0\nBAD should of had\nGOOD should have had\n"
1504 "BAD shouldve\nGOOD should've\n"
1505 "BAD showinf\nGOOD showing\n"
1506 "BAD signifacnt\nGOOD significant\n"
1507 "BAD simalar\nGOOD similar\n"
1508 "BAD similiar\nGOOD similar\n"
1509 "BAD simpyl\nGOOD simply\n"
1510 "BAD sincerly\nGOOD sincerely\n"
1511 "BAD sitll\nGOOD still\n"
1512 "BAD smae\nGOOD same\n"
1513 "BAD smoe\nGOOD some\n"
1514 "BAD soem\nGOOD some\n"
1515 "BAD sohw\nGOOD show\n"
1516 "BAD soical\nGOOD social\n"
1517 "BAD some1\nGOOD someone\n"
1518 "BAD somethign\nGOOD something\n"
1519 "BAD someting\nGOOD something\n"
1520 "BAD somewaht\nGOOD somewhat\n"
1521 "BAD somthing\nGOOD something\n"
1522 "BAD somtimes\nGOOD sometimes\n"
1523 "COMPLETE 0\nBAD sot hat \nGOOD so that \n"
1524 "BAD soudn\nGOOD sound\n"
1525 "BAD soudns\nGOOD sounds\n"
1526 "BAD speach\nGOOD speech\n"
1527 "BAD specificaly\nGOOD specifically\n"
1528 "BAD specificalyl\nGOOD specifically\n"
1529 "BAD spelt\nGOOD spelled\n"
1530 "BAD sry\nGOOD sorry\n"
1531 "COMPLETE 0\nBAD state of the ark\nGOOD state of the art\n"
1532 "BAD statment\nGOOD statement\n"
1533 "BAD statments\nGOOD statements\n"
1534 "BAD stnad\nGOOD stand\n"
1535 "BAD stopry\nGOOD story\n"
1536 "BAD stoyr\nGOOD story\n"
1537 "BAD stpo\nGOOD stop\n"
1538 "BAD strentgh\nGOOD strength\n"
1539 "BAD stroy\nGOOD story\n"
1540 "BAD struggel\nGOOD struggle\n"
1541 "BAD strugle\nGOOD struggle\n"
1542 "BAD studnet\nGOOD student\n"
1543 "BAD successfull\nGOOD successful\n"
1544 "BAD successfuly\nGOOD successfully\n"
1545 "BAD successfulyl\nGOOD successfully\n"
1546 "BAD sucess\nGOOD success\n"
1547 "BAD sucessfull\nGOOD successful\n"
1548 "BAD sufficiant\nGOOD sufficient\n"
1549 "BAD sum1\nGOOD someone\n"
1550 "BAD sunday\nGOOD Sunday\n"
1551 "BAD suposed\nGOOD supposed\n"
1552 "BAD supposably\nGOOD supposedly\n"
1553 "BAD suppossed\nGOOD supposed\n"
1554 "BAD suprise\nGOOD surprise\n"
1555 "BAD suprised\nGOOD surprised\n"
1556 "BAD sux\nGOOD sucks\n"
1557 "BAD swiming\nGOOD swimming\n"
1558 "BAD tahn\nGOOD than\n"
1559 "BAD taht\nGOOD that\n"
1560 "COMPLETE 0\nBAD take it for granite\nGOOD take it for granted\n"
1561 "COMPLETE 0\nBAD taken for granite\nGOOD taken for granted\n"
1562 "BAD talekd\nGOOD talked\n"
1563 "BAD talkign\nGOOD talking\n"
1564 "BAD tath\nGOOD that\n"
1565 "BAD tecnical\nGOOD technical\n"
1566 "BAD teh\nGOOD the\n"
1567 "BAD tehy\nGOOD they\n"
1568 "COMPLETE 0\nBAD tellt he \nGOOD tell the \n"
1569 "BAD termoil\nGOOD turmoil\n"
1570 "BAD tets\nGOOD test\n"
1571 "BAD tghe\nGOOD the\n"
1572 "BAD tghis\nGOOD this\n"
1573 "BAD thansk\nGOOD thanks\n"
1574 "BAD thanx\nGOOD thanks\n"
1575 "BAD thats\nGOOD that's\n"
1576 "BAD thatthe\nGOOD that the\n"
1577 "COMPLETE 0\nBAD thatt he \nGOOD that the \n"
1578 "BAD thecompany\nGOOD the company\n"
1579 "BAD thefirst\nGOOD the first\n"
1580 "BAD thegovernment\nGOOD the government\n"
1581 "COMPLETE 0\nBAD their are \nGOOD there are \n"
1582 "COMPLETE 0\nBAD their aren't \nGOOD there aren't \n"
1583 "COMPLETE 0\nBAD their is \nGOOD there is \n"
1584 "BAD themself\nGOOD themselves\n"
1585 "BAD themselfs\nGOOD themselves\n"
1586 "BAD thenew\nGOOD the new\n"
1587 "BAD theres\nGOOD there's\n"
1588 "COMPLETE 0\nBAD there's is \nGOOD theirs is \n"
1589 "COMPLETE 0\nBAD there's isn't \nGOOD theirs isn't \n"
1590 "BAD theri\nGOOD their\n"
1591 "BAD thesame\nGOOD the same\n"
1592 "BAD thetwo\nGOOD the two\n"
1593 "BAD theyd\nGOOD they'd\n"
1594 "COMPLETE 0\nBAD they;d \nGOOD they'd \n"
1595 "COMPLETE 0\nBAD they;l \nGOOD they'll \n"
1596 "BAD theyll\nGOOD they'll\n"
1597 "COMPLETE 0\nBAD they;ll \nGOOD they'll \n"
1598 "COMPLETE 0\nBAD they;r \nGOOD they're \n"
1599 "COMPLETE 0\nBAD theyre \nGOOD they're \n"
1600 "COMPLETE 0\nBAD they;re \nGOOD they're \n"
1601 "COMPLETE 0\nBAD they're are \nGOOD there are \n"
1602 "COMPLETE 0\nBAD they're is \nGOOD there is \n"
1603 "COMPLETE 0\nBAD they;v \nGOOD they've \n"
1604 "BAD theyve\nGOOD they've\n"
1605 "COMPLETE 0\nBAD they;ve \nGOOD they've \n"
1606 "BAD thgat\nGOOD that\n"
1607 "BAD thge\nGOOD the\n"
1608 "BAD thier\nGOOD their \n"
1609 "BAD thigsn\nGOOD things\n"
1610 "BAD thisyear\nGOOD this year\n"
1611 "BAD thme\nGOOD them\n"
1612 "BAD thna\nGOOD than\n"
1613 "BAD thne\nGOOD then\n"
1614 "BAD thnig\nGOOD thing\n"
1615 "BAD thnigs\nGOOD things\n"
1616 "BAD tho\nGOOD though\n"
1617 "BAD threatend\nGOOD threatened\n"
1618 "BAD thsi\nGOOD this\n"
1619 "BAD thsoe\nGOOD those\n"
1620 "BAD thta\nGOOD that\n"
1621 "BAD thursday\nGOOD Thursday\n"
1622 "BAD thx\nGOOD thanks\n"
1623 "BAD tihs\nGOOD this\n"
1624 "BAD timne\nGOOD time\n"
1625 "BAD tiogether\nGOOD together\n"
1626 "BAD tje\nGOOD the\n"
1627 "BAD tjhe\nGOOD the\n"
1628 "BAD tkae\nGOOD take\n"
1629 "BAD tkaes\nGOOD takes\n"
1630 "BAD tkaing\nGOOD taking\n"
1631 "BAD tlaking\nGOOD talking\n"
1632 "BAD tnx\nGOOD thanks\n"
1633 "BAD todya\nGOOD today\n"
1634 "BAD togehter\nGOOD together\n"
1635 "COMPLETE 0\nBAD toldt he \nGOOD told the \n"
1636 "BAD tomorow\nGOOD tomorrow\n"
1637 "BAD tongiht\nGOOD tonight\n"
1638 "BAD tonihgt\nGOOD tonight\n"
1639 "BAD tonite\nGOOD tonight\n"
1640 "BAD totaly\nGOOD totally\n"
1641 "BAD totalyl\nGOOD totally\n"
1642 "BAD tothe\nGOOD to the\n"
1643 "COMPLETE 0\nBAD tot he \nGOOD to the \n"
1644 "BAD touche\nGOOD touch\303\251\n"
1645 "BAD towrad\nGOOD toward\n"
1646 "BAD traditionalyl\nGOOD traditionally\n"
1647 "BAD transfered\nGOOD transferred\n"
1648 "BAD truely\nGOOD truly\n"
1649 "BAD truley\nGOOD truly\n"
1650 "BAD tryed\nGOOD tried\n"
1651 "BAD tthe\nGOOD the\n"
1652 "BAD tuesday\nGOOD Tuesday\n"
1653 "BAD tyhat\nGOOD that\n"
1654 "BAD tyhe\nGOOD the\n"
1656 "BAD udnerstand\nGOOD understand\n"
1657 "BAD understnad\nGOOD understand\n"
1658 "COMPLETE 0\nBAD undert he \nGOOD under the \n"
1659 "BAD unforseen\nGOOD unforeseen\n"
1660 "BAD UnitedStates\nGOOD United States\n"
1661 "BAD unliek\nGOOD unlike\n"
1662 "BAD unpleasently\nGOOD unpleasantly\n"
1663 "BAD untill\nGOOD until\n"
1664 "BAD untilll\nGOOD until\n"
1665 "BAD ur\nGOOD you are\n"
1666 "BAD useing\nGOOD using\n"
1667 "BAD usualyl\nGOOD usually\n"
1668 "BAD veyr\nGOOD very\n"
1669 "BAD virtualyl\nGOOD virtually\n"
1670 "BAD visavis\nGOOD vis-a-vis\n"
1671 "COMPLETE 0\nBAD vis-a-vis\nGOOD vis-\303\240-vis\n"
1672 "BAD vrey\nGOOD very\n"
1673 "BAD vulnerible\nGOOD vulnerable\n"
1674 "BAD waht\nGOOD what\n"
1675 "BAD warrent\nGOOD warrant\n"
1676 "COMPLETE 0\nBAD wa snot \nGOOD was not \n"
1677 "COMPLETE 0\nBAD wasnt \nGOOD wasn't \n"
1678 "COMPLETE 0\nBAD wasn;t \nGOOD wasn't \n"
1679 "BAD wat\nGOOD what\n"
1680 "BAD watn\nGOOD want\n"
1681 "COMPLETE 0\nBAD we;d \nGOOD we'd \n"
1682 "BAD wednesday\nGOOD Wednesday\n"
1683 "BAD wehn\nGOOD when\n"
1684 "COMPLETE 0\nBAD we'l \nGOOD we'll \n"
1685 "COMPLETE 0\nBAD we;ll \nGOOD we'll \n"
1686 "COMPLETE 0\nBAD we;re \nGOOD we're \n"
1687 "BAD werent\nGOOD weren't\n"
1688 "COMPLETE 0\nBAD weren;t \nGOOD weren't \n"
1689 "COMPLETE 0\nBAD wern't \nGOOD weren't \n"
1690 "BAD werre\nGOOD were\n"
1691 "BAD weve\nGOOD we've\n"
1692 "COMPLETE 0\nBAD we;ve \nGOOD we've \n"
1693 "BAD whats\nGOOD what's\n"
1694 "COMPLETE 0\nBAD what;s \nGOOD what's \n"
1695 "BAD whcih\nGOOD which\n"
1696 "COMPLETE 0\nBAD whent he \nGOOD when the \n"
1697 "BAD wheres\nGOOD where's\n"
1698 "COMPLETE 0\nBAD where;s \nGOOD where's \n"
1699 "BAD wherre\nGOOD where\n"
1700 "BAD whic\nGOOD which\n"
1701 "COMPLETE 0\nBAD whicht he \nGOOD which the \n"
1702 "BAD whihc\nGOOD which\n"
1703 "BAD wholl\nGOOD who'll\n"
1704 "BAD whos\nGOOD who's\n"
1705 "COMPLETE 0\nBAD who;s \nGOOD who's \n"
1706 "BAD whove\nGOOD who've\n"
1707 "COMPLETE 0\nBAD who;ve \nGOOD who've \n"
1708 "BAD whta\nGOOD what\n"
1709 "BAD whys\nGOOD why's\n"
1710 "BAD wief\nGOOD wife\n"
1711 "BAD wierd\nGOOD weird\n"
1712 "BAD wihch\nGOOD which\n"
1713 "BAD wiht\nGOOD with\n"
1714 "BAD willbe\nGOOD will be\n"
1715 "COMPLETE 0\nBAD will of been\nGOOD will have been\n"
1716 "COMPLETE 0\nBAD will of had\nGOOD will have had\n"
1717 "BAD windoes\nGOOD windows\n"
1718 "BAD witha\nGOOD with a\n"
1719 "BAD withdrawl\nGOOD withdrawal\n"
1720 "BAD withe\nGOOD with\n"
1721 "COMPLETE 0\nBAD withthe \nGOOD with the \n"
1722 "BAD witht he\nGOOD with the\n"
1723 "BAD wiull\nGOOD will\n"
1724 "BAD wnat\nGOOD want\n"
1725 "BAD wnated\nGOOD wanted\n"
1726 "BAD wnats\nGOOD wants\n"
1727 "BAD woh\nGOOD who\n"
1728 "BAD wohle\nGOOD whole\n"
1729 "BAD wokr\nGOOD work\n"
1730 "BAD wont\nGOOD won't\n"
1731 "COMPLETE 0\nBAD wo'nt \nGOOD won't \n"
1732 "COMPLETE 0\nBAD won;t \nGOOD won't \n"
1733 "BAD woudl\nGOOD would\n"
1734 "COMPLETE 0\nBAD woudln't \nGOOD wouldn't \n"
1735 "BAD wouldbe\nGOOD would be\n"
1736 "BAD wouldnt\nGOOD wouldn't\n"
1737 "COMPLETE 0\nBAD wouldn;t \nGOOD wouldn't \n"
1738 "COMPLETE 0\nBAD would of been\nGOOD would have been\n"
1739 "COMPLETE 0\nBAD would of had\nGOOD would have had\n"
1740 "BAD wouldve\nGOOD would've\n"
1741 "BAD wriet\nGOOD write\n"
1742 "BAD writting\nGOOD writing\n"
1743 "BAD wrod\nGOOD word\n"
1744 "BAD wroet\nGOOD wrote\n"
1745 "BAD wroking\nGOOD working\n"
1746 "BAD wtih\nGOOD with\n"
1747 "BAD wuould\nGOOD would\n"
1748 "BAD wud\nGOOD would\n"
1749 "BAD wut\nGOOD what\n"
1750 "BAD wya\nGOOD way\n"
1752 "BAD yeh\nGOOD yeah\n"
1753 "BAD yera\nGOOD year\n"
1754 "BAD yeras\nGOOD years\n"
1755 "BAD yersa\nGOOD years\n"
1756 "BAD yoiu\nGOOD you\n"
1757 "BAD youare\nGOOD you are\n"
1758 "BAD youd\nGOOD you'd\n"
1759 "COMPLETE 0\nBAD you;d \nGOOD you'd \n"
1760 "BAD youll\nGOOD you'll\n"
1761 "COMPLETE 0\nBAD your a \nGOOD you're a \n"
1762 "COMPLETE 0\nBAD your an \nGOOD you're an \n"
1763 "BAD youre\nGOOD you're\n"
1764 "COMPLETE 0\nBAD you;re \nGOOD you're \n"
1765 "COMPLETE 0\nBAD you're own \nGOOD your own \n"
1766 "COMPLETE 0\nBAD your her \nGOOD you're her \n"
1767 "COMPLETE 0\nBAD your here \nGOOD you're here \n"
1768 "COMPLETE 0\nBAD your his \nGOOD you're his \n"
1769 "COMPLETE 0\nBAD your my \nGOOD you're my \n"
1770 "COMPLETE 0\nBAD your the \nGOOD you're the \n"
1771 "COMPLETE 0\nBAD your their \nGOOD you're their \n"
1772 "COMPLETE 0\nBAD your your \nGOOD you're your \n"
1773 "BAD youve\nGOOD you've\n"
1774 "COMPLETE 0\nBAD you;ve \nGOOD you've \n"
1775 "BAD ytou\nGOOD you\n"
1776 "BAD yuo\nGOOD you\n"
1777 "BAD yuor\nGOOD your\n";
1782 char good
[256] = "";
1785 gboolean complete
= TRUE
;
1786 gboolean case_sensitive
= FALSE
;
1788 buf
= g_build_filename(purple_user_dir(), "dict", NULL
);
1789 if (!(g_file_get_contents(buf
, &ibuf
, &size
, NULL
) && ibuf
)) {
1790 ibuf
= g_strdup(defaultconf
);
1791 size
= strlen(defaultconf
);
1795 model
= gtk_list_store_new((gint
)N_COLUMNS
, G_TYPE_STRING
, G_TYPE_STRING
, G_TYPE_BOOLEAN
, G_TYPE_BOOLEAN
);
1796 hashes
= g_hash_table_new_full(g_str_hash
, g_str_equal
, g_free
, NULL
);
1798 while (ibuf
&& buf_get_line(ibuf
, &buf
, &pnt
, size
)) {
1800 if (!g_ascii_strncasecmp(buf
, "BAD ", 4))
1802 strncpy(bad
, buf
+ 4, 81);
1804 else if(!g_ascii_strncasecmp(buf
, "CASE ", 5))
1806 case_sensitive
= *(buf
+5) == '0' ? FALSE
: TRUE
;
1808 else if(!g_ascii_strncasecmp(buf
, "COMPLETE ", 9))
1810 complete
= *(buf
+9) == '0' ? FALSE
: TRUE
;
1812 else if (!g_ascii_strncasecmp(buf
, "GOOD ", 5))
1814 strncpy(good
, buf
+ 5, 255);
1816 if (*bad
&& *good
&& g_hash_table_lookup(hashes
, bad
) == NULL
) {
1819 /* We don't actually need to store the good string, since this
1820 * hash is just being used to eliminate duplicate bad strings.
1821 * The value has to be non-NULL so the lookup above will work.
1823 g_hash_table_insert(hashes
, g_strdup(bad
), GINT_TO_POINTER(1));
1826 case_sensitive
= TRUE
;
1828 gtk_list_store_append(model
, &iter
);
1829 gtk_list_store_set(model
, &iter
,
1832 WORD_ONLY_COLUMN
, complete
,
1833 CASE_SENSITIVE_COLUMN
, case_sensitive
,
1838 case_sensitive
= FALSE
;
1843 g_hash_table_destroy(hashes
);
1845 gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(model
),
1846 0, GTK_SORT_ASCENDING
);
1849 static GtkWidget
*tree
;
1850 static GtkWidget
*bad_entry
;
1851 static GtkWidget
*good_entry
;
1852 static GtkWidget
*complete_toggle
;
1853 static GtkWidget
*case_toggle
;
1855 static void save_list(void);
1857 static void on_edited(GtkCellRendererText
*cellrenderertext
,
1858 gchar
*path
, gchar
*arg2
, gpointer data
)
1863 if (arg2
[0] == '\0') {
1868 g_return_if_fail(gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(model
), &iter
, path
));
1870 gtk_tree_model_get_value(GTK_TREE_MODEL(model
), &iter
, GPOINTER_TO_INT(data
), &val
);
1872 if (strcmp(arg2
, g_value_get_string(&val
))) {
1873 gtk_list_store_set(model
, &iter
, GPOINTER_TO_INT(data
), arg2
, -1);
1876 g_value_unset(&val
);
1880 static void word_only_toggled(GtkCellRendererToggle
*cellrenderertoggle
,
1881 gchar
*path
, gpointer data
){
1885 g_return_if_fail(gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(model
), &iter
, path
));
1886 gtk_tree_model_get(GTK_TREE_MODEL(model
), &iter
,
1887 WORD_ONLY_COLUMN
, &enabled
,
1890 gtk_list_store_set(GTK_LIST_STORE(model
), &iter
,
1891 WORD_ONLY_COLUMN
, !enabled
,
1894 /* I want to be sure that the above change has happened to the GtkTreeView first. */
1895 gtk_list_store_set(GTK_LIST_STORE(model
), &iter
,
1896 CASE_SENSITIVE_COLUMN
, enabled
,
1902 static void case_sensitive_toggled(GtkCellRendererToggle
*cellrenderertoggle
,
1903 gchar
*path
, gpointer data
){
1907 g_return_if_fail(gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(model
), &iter
, path
));
1909 /* Prevent the case sensitive column from changing on non-whole word replacements.
1910 * Ideally, the column would be set insensitive in the word_only_toggled callback. */
1911 gtk_tree_model_get(GTK_TREE_MODEL(model
), &iter
,
1912 WORD_ONLY_COLUMN
, &enabled
,
1917 gtk_tree_model_get(GTK_TREE_MODEL(model
), &iter
,
1918 CASE_SENSITIVE_COLUMN
, &enabled
,
1921 gtk_list_store_set(GTK_LIST_STORE(model
), &iter
,
1922 CASE_SENSITIVE_COLUMN
, !enabled
,
1928 static void list_add_new(void)
1931 const char *word
= gtk_entry_get_text(GTK_ENTRY(bad_entry
));
1932 gboolean case_sensitive
= gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(case_toggle
));
1934 if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(model
), &iter
)) {
1935 char *tmpword
= g_utf8_casefold(word
, -1);
1942 gtk_tree_model_get_value(GTK_TREE_MODEL(model
), &iter
, BAD_COLUMN
, &bad_val
);
1946 GValue case_sensitive_val
;
1947 case_sensitive_val
.g_type
= 0;
1948 gtk_tree_model_get_value(GTK_TREE_MODEL(model
), &iter
, CASE_SENSITIVE_COLUMN
, &case_sensitive_val
);
1950 /* If they're both case-sensitive, then compare directly.
1951 * Otherwise, they overlap. */
1952 if (g_value_get_boolean(&case_sensitive_val
))
1954 match
= !strcmp(g_value_get_string(&bad_val
), word
);
1958 char *bad
= g_utf8_casefold(g_value_get_string(&bad_val
), -1);
1959 match
= !strcmp(bad
, tmpword
);
1962 g_value_unset(&case_sensitive_val
);
1966 char *bad
= g_utf8_casefold(g_value_get_string(&bad_val
), -1);
1967 match
= !strcmp(bad
, tmpword
);
1972 g_value_unset(&bad_val
);
1975 purple_notify_error(NULL
, _("Duplicate Correction"),
1976 _("The specified word already exists in the correction list."),
1977 gtk_entry_get_text(GTK_ENTRY(bad_entry
)), NULL
);
1981 g_value_unset(&bad_val
);
1983 } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(model
), &iter
));
1989 gtk_list_store_append(model
, &iter
);
1990 gtk_list_store_set(model
, &iter
,
1992 GOOD_COLUMN
, gtk_entry_get_text(GTK_ENTRY(good_entry
)),
1993 WORD_ONLY_COLUMN
, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(complete_toggle
)),
1994 CASE_SENSITIVE_COLUMN
, case_sensitive
,
1997 gtk_editable_delete_text(GTK_EDITABLE(bad_entry
), 0, -1);
1998 gtk_editable_delete_text(GTK_EDITABLE(good_entry
), 0, -1);
1999 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(complete_toggle
), TRUE
);
2000 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(case_toggle
), FALSE
);
2001 gtk_widget_grab_focus(bad_entry
);
2006 static void add_selected_row_to_list(GtkTreeModel
*model
, GtkTreePath
*path
,
2007 GtkTreeIter
*iter
, gpointer data
)
2009 GtkTreeRowReference
*row_reference
;
2010 GSList
**list
= (GSList
**)data
;
2011 row_reference
= gtk_tree_row_reference_new(model
, path
);
2012 *list
= g_slist_prepend(*list
, row_reference
);
2015 static void remove_row(void *data1
, gpointer data2
)
2017 GtkTreeRowReference
*row_reference
;
2021 row_reference
= (GtkTreeRowReference
*)data1
;
2022 path
= gtk_tree_row_reference_get_path(row_reference
);
2024 if (gtk_tree_model_get_iter(GTK_TREE_MODEL(model
), &iter
, path
))
2025 gtk_list_store_remove(model
, &iter
);
2027 gtk_tree_path_free(path
);
2028 gtk_tree_row_reference_free(row_reference
);
2031 static void list_delete(void)
2033 GtkTreeSelection
*sel
;
2034 GSList
*list
= NULL
;
2036 sel
= gtk_tree_view_get_selection(GTK_TREE_VIEW(tree
));
2037 gtk_tree_selection_selected_foreach(sel
, add_selected_row_to_list
, &list
);
2039 g_slist_foreach(list
, remove_row
, NULL
);
2045 static void save_list()
2050 data
= g_string_new("");
2052 if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(model
), &iter
)) {
2064 gtk_tree_model_get_value(GTK_TREE_MODEL(model
), &iter
, BAD_COLUMN
, &val0
);
2065 gtk_tree_model_get_value(GTK_TREE_MODEL(model
), &iter
, GOOD_COLUMN
, &val1
);
2066 gtk_tree_model_get_value(GTK_TREE_MODEL(model
), &iter
, WORD_ONLY_COLUMN
, &val2
);
2067 gtk_tree_model_get_value(GTK_TREE_MODEL(model
), &iter
, CASE_SENSITIVE_COLUMN
, &val3
);
2069 g_string_append_printf(data
, "COMPLETE %d\nCASE %d\nBAD %s\nGOOD %s\n\n",
2070 g_value_get_boolean(&val2
),
2071 g_value_get_boolean(&val3
),
2072 g_value_get_string(&val0
),
2073 g_value_get_string(&val1
));
2075 g_value_unset(&val0
);
2076 g_value_unset(&val1
);
2077 g_value_unset(&val2
);
2078 g_value_unset(&val3
);
2080 } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(model
), &iter
));
2083 purple_util_write_data_to_file("dict", data
->str
, -1);
2085 g_string_free(data
, TRUE
);
2088 static void on_selection_changed(GtkTreeSelection
*sel
,
2092 num_selected
= gtk_tree_selection_count_selected_rows(sel
);
2093 gtk_widget_set_sensitive((GtkWidget
*)data
, (num_selected
> 0));
2096 static gboolean
non_empty(const char *s
)
2098 while (*s
&& g_ascii_isspace(*s
))
2103 static void on_entry_changed(GtkEditable
*editable
, gpointer data
)
2105 gtk_widget_set_sensitive((GtkWidget
*)data
,
2106 non_empty(gtk_entry_get_text(GTK_ENTRY(bad_entry
))) &&
2107 non_empty(gtk_entry_get_text(GTK_ENTRY(good_entry
))));
2110 static void whole_words_button_toggled(GtkToggleButton
*complete_toggle
, GtkToggleButton
*case_toggle
)
2112 gboolean enabled
= gtk_toggle_button_get_active(complete_toggle
);
2114 gtk_toggle_button_set_active(case_toggle
, !enabled
);
2115 gtk_widget_set_sensitive(GTK_WIDGET(case_toggle
), enabled
);
2119 get_config_frame(PurplePlugin
*plugin
)
2121 GtkWidget
*ret
, *vbox
;
2126 GtkCellRenderer
*renderer
;
2127 GtkTreeViewColumn
*column
;
2131 ret
= gtk_box_new(GTK_ORIENTATION_VERTICAL
, PIDGIN_HIG_CAT_SPACE
);
2132 gtk_container_set_border_width (GTK_CONTAINER(ret
), PIDGIN_HIG_BORDER
);
2134 vbox
= pidgin_make_frame(ret
, _("Text Replacements"));
2135 gtk_container_set_border_width(GTK_CONTAINER(vbox
), 4);
2136 gtk_widget_show(vbox
);
2138 tree
= gtk_tree_view_new_with_model(GTK_TREE_MODEL(model
));
2139 gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(tree
), TRUE
);
2140 gtk_widget_set_size_request(tree
, -1, 200);
2142 renderer
= gtk_cell_renderer_text_new();
2143 g_object_set(G_OBJECT(renderer
),
2146 g_signal_connect(G_OBJECT(renderer
), "edited",
2147 G_CALLBACK(on_edited
), GINT_TO_POINTER(0));
2148 column
= gtk_tree_view_column_new_with_attributes(_("You type"), renderer
,
2151 gtk_tree_view_column_set_sizing(column
, GTK_TREE_VIEW_COLUMN_FIXED
);
2152 gtk_tree_view_column_set_fixed_width(column
, 150);
2153 gtk_tree_view_column_set_resizable(column
, TRUE
);
2154 gtk_tree_view_append_column(GTK_TREE_VIEW(tree
), column
);
2156 renderer
= gtk_cell_renderer_text_new();
2157 g_object_set(G_OBJECT(renderer
),
2160 g_signal_connect(G_OBJECT(renderer
), "edited",
2161 G_CALLBACK(on_edited
), GINT_TO_POINTER(1));
2162 column
= gtk_tree_view_column_new_with_attributes(_("You send"), renderer
,
2163 "text", GOOD_COLUMN
,
2165 gtk_tree_view_column_set_sizing(column
, GTK_TREE_VIEW_COLUMN_FIXED
);
2166 gtk_tree_view_column_set_fixed_width(column
, 150);
2167 gtk_tree_view_column_set_resizable(column
, TRUE
);
2168 gtk_tree_view_append_column(GTK_TREE_VIEW(tree
), column
);
2170 renderer
= gtk_cell_renderer_toggle_new();
2171 g_object_set(G_OBJECT(renderer
),
2172 "activatable", TRUE
,
2174 g_signal_connect(G_OBJECT(renderer
), "toggled",
2175 G_CALLBACK(word_only_toggled
), NULL
);
2176 column
= gtk_tree_view_column_new_with_attributes(_("Whole words only"), renderer
,
2177 "active", WORD_ONLY_COLUMN
,
2179 gtk_tree_view_column_set_resizable(column
, TRUE
);
2180 gtk_tree_view_append_column(GTK_TREE_VIEW(tree
), column
);
2182 renderer
= gtk_cell_renderer_toggle_new();
2183 g_object_set(G_OBJECT(renderer
),
2184 "activatable", TRUE
,
2186 g_signal_connect(G_OBJECT(renderer
), "toggled",
2187 G_CALLBACK(case_sensitive_toggled
), NULL
);
2188 column
= gtk_tree_view_column_new_with_attributes(_("Case sensitive"), renderer
,
2189 "active", CASE_SENSITIVE_COLUMN
,
2191 gtk_tree_view_column_set_resizable(column
, TRUE
);
2192 gtk_tree_view_append_column(GTK_TREE_VIEW(tree
), column
);
2194 gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(tree
)),
2195 GTK_SELECTION_MULTIPLE
);
2196 gtk_box_pack_start(GTK_BOX(vbox
),
2197 pidgin_make_scrollable(tree
, GTK_POLICY_NEVER
, GTK_POLICY_ALWAYS
, GTK_SHADOW_IN
, -1, -1),
2199 gtk_widget_show(tree
);
2201 hbox
= gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL
);
2202 gtk_box_pack_start(GTK_BOX(vbox
), hbox
, FALSE
, FALSE
, 0);
2203 gtk_widget_show(hbox
);
2205 button
= gtk_button_new_from_stock(GTK_STOCK_DELETE
);
2206 g_signal_connect(G_OBJECT(button
), "clicked",
2207 G_CALLBACK(list_delete
), NULL
);
2208 gtk_box_pack_start(GTK_BOX(hbox
), button
, FALSE
, FALSE
, 0);
2209 gtk_widget_set_sensitive(button
, FALSE
);
2211 g_signal_connect(G_OBJECT(gtk_tree_view_get_selection(GTK_TREE_VIEW(tree
))),
2212 "changed", G_CALLBACK(on_selection_changed
), button
);
2214 gtk_widget_show(button
);
2216 vbox
= pidgin_make_frame(ret
, _("Add a new text replacement"));
2218 hbox
= gtk_box_new(GTK_ORIENTATION_HORIZONTAL
, PIDGIN_HIG_BOX_SPACE
);
2219 gtk_box_pack_start(GTK_BOX(vbox
), hbox
, TRUE
, TRUE
, 0);
2220 gtk_widget_show(hbox
);
2221 vbox2
= gtk_box_new(GTK_ORIENTATION_VERTICAL
, PIDGIN_HIG_BOX_SPACE
);
2222 gtk_box_pack_start(GTK_BOX(hbox
), vbox2
, TRUE
, TRUE
, 0);
2223 gtk_widget_show(vbox2
);
2225 sg
= gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL
);
2226 sg2
= gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL
);
2228 bad_entry
= gtk_entry_new();
2229 /* Set a minimum size. Since they're in a size group, the other entry will match up. */
2230 gtk_widget_set_size_request(bad_entry
, 350, -1);
2231 gtk_size_group_add_widget(sg2
, bad_entry
);
2232 pidgin_add_widget_to_vbox(GTK_BOX(vbox2
), _("You _type:"), sg
, bad_entry
, FALSE
, NULL
);
2234 good_entry
= gtk_entry_new();
2235 gtk_size_group_add_widget(sg2
, good_entry
);
2236 pidgin_add_widget_to_vbox(GTK_BOX(vbox2
), _("You _send:"), sg
, good_entry
, FALSE
, NULL
);
2238 /* Created here so it can be passed to whole_words_button_toggled. */
2239 case_toggle
= gtk_check_button_new_with_mnemonic(_("_Exact case match (uncheck for automatic case handling)"));
2241 complete_toggle
= gtk_check_button_new_with_mnemonic(_("Only replace _whole words"));
2242 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(complete_toggle
), TRUE
);
2243 g_signal_connect(G_OBJECT(complete_toggle
), "clicked",
2244 G_CALLBACK(whole_words_button_toggled
), case_toggle
);
2245 gtk_widget_show(complete_toggle
);
2246 gtk_box_pack_start(GTK_BOX(vbox2
), complete_toggle
, FALSE
, FALSE
, 0);
2248 /* The button is created above so it can be passed to whole_words_button_toggled. */
2249 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(case_toggle
), FALSE
);
2250 gtk_widget_show(case_toggle
);
2251 gtk_box_pack_start(GTK_BOX(vbox2
), case_toggle
, FALSE
, FALSE
, 0);
2253 button
= gtk_button_new_from_stock(GTK_STOCK_ADD
);
2254 g_signal_connect(G_OBJECT(button
), "clicked",
2255 G_CALLBACK(list_add_new
), NULL
);
2256 vbox3
= gtk_box_new(GTK_ORIENTATION_VERTICAL
, 0);
2257 gtk_box_pack_start(GTK_BOX(hbox
), vbox3
, TRUE
, FALSE
, 0);
2258 gtk_widget_show(vbox3
);
2259 gtk_box_pack_end(GTK_BOX(vbox3
), button
, FALSE
, FALSE
, 0);
2260 g_signal_connect(G_OBJECT(bad_entry
), "changed", G_CALLBACK(on_entry_changed
), button
);
2261 g_signal_connect(G_OBJECT(good_entry
), "changed", G_CALLBACK(on_entry_changed
), button
);
2262 gtk_widget_set_sensitive(button
, FALSE
);
2263 gtk_widget_show(button
);
2266 vbox
= pidgin_make_frame(ret
, _("General Text Replacement Options"));
2267 pidgin_prefs_checkbox(_("Enable replacement of last word on send"),
2268 "/plugins/gtk/spellchk/last_word_replace", vbox
);
2271 gtk_widget_show_all(ret
);
2273 g_object_unref(sg2
);
2278 * EXPORTED FUNCTIONS
2281 static PidginPluginInfo
*
2282 plugin_query(GError
**error
)
2284 const gchar
* const authors
[] = {
2285 "Eric Warmenhoven <eric@warmenhoven.org>",
2289 return pidgin_plugin_info_new(
2290 "id", SPELLCHECK_PLUGIN_ID
,
2291 "name", N_("Text replacement"),
2292 "version", DISPLAY_VERSION
,
2293 "category", N_("Utility"),
2294 "summary", N_("Replaces text in outgoing messages according to user-defined rules."),
2295 "description", N_("Replaces text in outgoing messages according to user-defined rules."),
2297 "website", PURPLE_WEBSITE
,
2298 "abi-version", PURPLE_ABI_VERSION
,
2299 "gtk-config-frame-cb", get_config_frame
,
2305 plugin_load(PurplePlugin
*plugin
, GError
**error
)
2307 void *conv_handle
= purple_conversations_get_handle();
2311 purple_prefs_add_none("/plugins");
2312 purple_prefs_add_none("/plugins/gtk");
2313 purple_prefs_add_none("/plugins/gtk/spellchk");
2314 purple_prefs_add_bool("/plugins/gtk/spellchk/last_word_replace", TRUE
);
2319 /* Attach to existing conversations */
2320 for (convs
= purple_conversations_get_all(); convs
!= NULL
; convs
= convs
->next
)
2322 spellchk_new_attach((PurpleConversation
*)convs
->data
);
2325 purple_signal_connect(conv_handle
, "conversation-created",
2326 plugin
, PURPLE_CALLBACK(spellchk_new_attach
), NULL
);
2332 plugin_unload(PurplePlugin
*plugin
, GError
**error
)
2336 /* Detach from existing conversations */
2337 for (convs
= purple_conversations_get_all(); convs
!= NULL
; convs
= convs
->next
)
2339 PidginConversation
*gtkconv
= PIDGIN_CONVERSATION((PurpleConversation
*)convs
->data
);
2340 spellchk
*spell
= g_object_get_data(G_OBJECT(gtkconv
->entry
), SPELLCHK_OBJECT_KEY
);
2342 g_signal_handlers_disconnect_by_func(gtkconv
->entry
, message_send_cb
, spell
);
2343 g_object_set_data(G_OBJECT(gtkconv
->entry
), SPELLCHK_OBJECT_KEY
, NULL
);
2349 PURPLE_PLUGIN_INIT(spellcheck
, plugin_query
, plugin_load
, plugin_unload
);