55 </table> |
55 </table> |
56 <h3>Methods</h3> |
56 <h3>Methods</h3> |
57 <table> |
57 <table> |
58 <tr> |
58 <tr> |
59 <td><a href="#SpellChecker.__init__">SpellChecker</a></td> |
59 <td><a href="#SpellChecker.__init__">SpellChecker</a></td> |
60 <td>Constructor</td> |
60 <td>Constructor</td> |
61 </tr><tr> |
61 </tr><tr> |
62 <td><a href="#SpellChecker.__checkDocumentPart">__checkDocumentPart</a></td> |
62 <td><a href="#SpellChecker.__checkDocumentPart">__checkDocumentPart</a></td> |
63 <td>Private method to check some part of the document.</td> |
63 <td>Private method to check some part of the document.</td> |
64 </tr><tr> |
64 </tr><tr> |
65 <td><a href="#SpellChecker.__getNextWord">__getNextWord</a></td> |
65 <td><a href="#SpellChecker.__getNextWord">__getNextWord</a></td> |
66 <td>Private method to get the next word in the text after the given position.</td> |
66 <td>Private method to get the next word in the text after the given position.</td> |
67 </tr><tr> |
67 </tr><tr> |
68 <td><a href="#SpellChecker.__incrementalCheck">__incrementalCheck</a></td> |
68 <td><a href="#SpellChecker.__incrementalCheck">__incrementalCheck</a></td> |
69 <td>Private method to check the document incrementally.</td> |
69 <td>Private method to check the document incrementally.</td> |
70 </tr><tr> |
70 </tr><tr> |
71 <td><a href="#SpellChecker.__iter__">__iter__</a></td> |
71 <td><a href="#SpellChecker.__iter__">__iter__</a></td> |
72 <td>Private method to create an iterator.</td> |
72 <td>Private method to create an iterator.</td> |
73 </tr><tr> |
73 </tr><tr> |
74 <td><a href="#SpellChecker.__next__">__next__</a></td> |
74 <td><a href="#SpellChecker.__next__">__next__</a></td> |
75 <td>Public method to advance to the next error.</td> |
75 <td>Public method to advance to the next error.</td> |
76 </tr><tr> |
76 </tr><tr> |
77 <td><a href="#SpellChecker._getDict">_getDict</a></td> |
77 <td><a href="#SpellChecker._getDict">_getDict</a></td> |
78 <td>Protected classmethod to get a new dictionary.</td> |
78 <td>Protected classmethod to get a new dictionary.</td> |
79 </tr><tr> |
79 </tr><tr> |
80 <td><a href="#SpellChecker.add">add</a></td> |
80 <td><a href="#SpellChecker.add">add</a></td> |
81 <td>Public method to add a word to the personal word list.</td> |
81 <td>Public method to add a word to the personal word list.</td> |
82 </tr><tr> |
82 </tr><tr> |
83 <td><a href="#SpellChecker.checkCurrentPage">checkCurrentPage</a></td> |
83 <td><a href="#SpellChecker.checkCurrentPage">checkCurrentPage</a></td> |
84 <td>Private method to check the currently visible page.</td> |
84 <td>Private method to check the currently visible page.</td> |
85 </tr><tr> |
85 </tr><tr> |
86 <td><a href="#SpellChecker.checkDocument">checkDocument</a></td> |
86 <td><a href="#SpellChecker.checkDocument">checkDocument</a></td> |
87 <td>Public method to check the complete document</td> |
87 <td>Public method to check the complete document</td> |
88 </tr><tr> |
88 </tr><tr> |
89 <td><a href="#SpellChecker.checkDocumentIncrementally">checkDocumentIncrementally</a></td> |
89 <td><a href="#SpellChecker.checkDocumentIncrementally">checkDocumentIncrementally</a></td> |
90 <td>Public method to check the document incrementally.</td> |
90 <td>Public method to check the document incrementally.</td> |
91 </tr><tr> |
91 </tr><tr> |
92 <td><a href="#SpellChecker.checkLines">checkLines</a></td> |
92 <td><a href="#SpellChecker.checkLines">checkLines</a></td> |
93 <td>Public method to check some lines of text.</td> |
93 <td>Public method to check some lines of text.</td> |
94 </tr><tr> |
94 </tr><tr> |
95 <td><a href="#SpellChecker.checkSelection">checkSelection</a></td> |
95 <td><a href="#SpellChecker.checkSelection">checkSelection</a></td> |
96 <td>Private method to check the current selection.</td> |
96 <td>Private method to check the current selection.</td> |
97 </tr><tr> |
97 </tr><tr> |
98 <td><a href="#SpellChecker.checkWord">checkWord</a></td> |
98 <td><a href="#SpellChecker.checkWord">checkWord</a></td> |
99 <td>Public method to check the word at position pos.</td> |
99 <td>Public method to check the word at position pos.</td> |
100 </tr><tr> |
100 </tr><tr> |
101 <td><a href="#SpellChecker.clearAll">clearAll</a></td> |
101 <td><a href="#SpellChecker.clearAll">clearAll</a></td> |
102 <td>Public method to clear all spelling markers.</td> |
102 <td>Public method to clear all spelling markers.</td> |
103 </tr><tr> |
103 </tr><tr> |
104 <td><a href="#SpellChecker.getAvailableLanguages">getAvailableLanguages</a></td> |
104 <td><a href="#SpellChecker.getAvailableLanguages">getAvailableLanguages</a></td> |
105 <td>Public classmethod to get all available languages.</td> |
105 <td>Public classmethod to get all available languages.</td> |
106 </tr><tr> |
106 </tr><tr> |
107 <td><a href="#SpellChecker.getContext">getContext</a></td> |
107 <td><a href="#SpellChecker.getContext">getContext</a></td> |
108 <td>Public method to get the context of a faulty word.</td> |
108 <td>Public method to get the context of a faulty word.</td> |
109 </tr><tr> |
109 </tr><tr> |
110 <td><a href="#SpellChecker.getError">getError</a></td> |
110 <td><a href="#SpellChecker.getError">getError</a></td> |
111 <td>Public method to get information about the last error found.</td> |
111 <td>Public method to get information about the last error found.</td> |
112 </tr><tr> |
112 </tr><tr> |
113 <td><a href="#SpellChecker.getLanguage">getLanguage</a></td> |
113 <td><a href="#SpellChecker.getLanguage">getLanguage</a></td> |
114 <td>Public method to get the current language.</td> |
114 <td>Public method to get the current language.</td> |
115 </tr><tr> |
115 </tr><tr> |
116 <td><a href="#SpellChecker.getSuggestions">getSuggestions</a></td> |
116 <td><a href="#SpellChecker.getSuggestions">getSuggestions</a></td> |
117 <td>Public method to get suggestions for the given word.</td> |
117 <td>Public method to get suggestions for the given word.</td> |
118 </tr><tr> |
118 </tr><tr> |
119 <td><a href="#SpellChecker.ignoreAlways">ignoreAlways</a></td> |
119 <td><a href="#SpellChecker.ignoreAlways">ignoreAlways</a></td> |
120 <td>Public method to tell the checker, to always ignore the given word or the current word.</td> |
120 <td>Public method to tell the checker, to always ignore the given word or the current word.</td> |
121 </tr><tr> |
121 </tr><tr> |
122 <td><a href="#SpellChecker.initCheck">initCheck</a></td> |
122 <td><a href="#SpellChecker.initCheck">initCheck</a></td> |
123 <td>Public method to initialize a spell check.</td> |
123 <td>Public method to initialize a spell check.</td> |
124 </tr><tr> |
124 </tr><tr> |
125 <td><a href="#SpellChecker.isAvailable">isAvailable</a></td> |
125 <td><a href="#SpellChecker.isAvailable">isAvailable</a></td> |
126 <td>Public classmethod to check, if spellchecking is available.</td> |
126 <td>Public classmethod to check, if spellchecking is available.</td> |
127 </tr><tr> |
127 </tr><tr> |
128 <td><a href="#SpellChecker.remove">remove</a></td> |
128 <td><a href="#SpellChecker.remove">remove</a></td> |
129 <td>Public method to add a word to the personal exclude list.</td> |
129 <td>Public method to add a word to the personal exclude list.</td> |
130 </tr><tr> |
130 </tr><tr> |
131 <td><a href="#SpellChecker.replace">replace</a></td> |
131 <td><a href="#SpellChecker.replace">replace</a></td> |
132 <td>Public method to tell the checker to replace the current word with the replacement string.</td> |
132 <td>Public method to tell the checker to replace the current word with the replacement string.</td> |
133 </tr><tr> |
133 </tr><tr> |
134 <td><a href="#SpellChecker.replaceAlways">replaceAlways</a></td> |
134 <td><a href="#SpellChecker.replaceAlways">replaceAlways</a></td> |
135 <td>Public method to tell the checker to always replace the current word with the replacement string.</td> |
135 <td>Public method to tell the checker to always replace the current word with the replacement string.</td> |
136 </tr><tr> |
136 </tr><tr> |
137 <td><a href="#SpellChecker.setDefaultLanguage">setDefaultLanguage</a></td> |
137 <td><a href="#SpellChecker.setDefaultLanguage">setDefaultLanguage</a></td> |
138 <td>Public classmethod to set the default language.</td> |
138 <td>Public classmethod to set the default language.</td> |
139 </tr><tr> |
139 </tr><tr> |
140 <td><a href="#SpellChecker.setLanguage">setLanguage</a></td> |
140 <td><a href="#SpellChecker.setLanguage">setLanguage</a></td> |
141 <td>Public method to set the current language.</td> |
141 <td>Public method to set the current language.</td> |
142 </tr><tr> |
142 </tr><tr> |
143 <td><a href="#SpellChecker.setMinimumWordSize">setMinimumWordSize</a></td> |
143 <td><a href="#SpellChecker.setMinimumWordSize">setMinimumWordSize</a></td> |
144 <td>Public method to set the minimum word size.</td> |
144 <td>Public method to set the minimum word size.</td> |
145 </tr><tr> |
145 </tr><tr> |
146 <td><a href="#SpellChecker.stopIncrementalCheck">stopIncrementalCheck</a></td> |
146 <td><a href="#SpellChecker.stopIncrementalCheck">stopIncrementalCheck</a></td> |
147 <td>Public method to stop an incremental check.</td> |
147 <td>Public method to stop an incremental check.</td> |
148 </tr> |
148 </tr> |
149 </table> |
149 </table> |
150 <a NAME="SpellChecker.__init__" ID="SpellChecker.__init__"></a> |
150 <a NAME="SpellChecker.__init__" ID="SpellChecker.__init__"></a> |
151 <h4>SpellChecker (Constructor)</h4> |
151 <h4>SpellChecker (Constructor)</h4> |
152 <b>SpellChecker</b>(<i>editor, indicator, defaultLanguage = None, checkRegion = None</i>) |
152 <b>SpellChecker</b>(<i>editor, indicator, defaultLanguage = None, checkRegion = None</i>) |
153 <p> |
153 <p> |
154 Constructor |
154 Constructor |
155 </p><dl> |
155 </p><dl> |
156 <dt><i>editor</i></dt> |
156 <dt><i>editor</i></dt> |
157 <dd> |
157 <dd> |
158 reference to the editor object (QScintilla.Editor) |
158 reference to the editor object (QScintilla.Editor) |
159 </dd><dt><i>indicator</i></dt> |
159 </dd><dt><i>indicator</i></dt> |
160 <dd> |
160 <dd> |
161 spell checking indicator |
161 spell checking indicator |
162 </dd><dt><i>defaultLanguage=</i></dt> |
162 </dd><dt><i>defaultLanguage=</i></dt> |
163 <dd> |
163 <dd> |
164 the language to be used as the default (string). |
164 the language to be used as the default (string). |
165 The string should be in language locale format (e.g. en_US, de). |
165 The string should be in language locale format (e.g. en_US, de). |
166 </dd><dt><i>checkRegion=</i></dt> |
166 </dd><dt><i>checkRegion=</i></dt> |
167 <dd> |
167 <dd> |
168 reference to a function to check for a valid region |
168 reference to a function to check for a valid region |
169 </dd> |
169 </dd> |
170 </dl><a NAME="SpellChecker.__checkDocumentPart" ID="SpellChecker.__checkDocumentPart"></a> |
170 </dl><a NAME="SpellChecker.__checkDocumentPart" ID="SpellChecker.__checkDocumentPart"></a> |
171 <h4>SpellChecker.__checkDocumentPart</h4> |
171 <h4>SpellChecker.__checkDocumentPart</h4> |
172 <b>__checkDocumentPart</b>(<i>startPos, endPos</i>) |
172 <b>__checkDocumentPart</b>(<i>startPos, endPos</i>) |
173 <p> |
173 <p> |
174 Private method to check some part of the document. |
174 Private method to check some part of the document. |
175 </p><dl> |
175 </p><dl> |
176 <dt><i>startPos</i></dt> |
176 <dt><i>startPos</i></dt> |
177 <dd> |
177 <dd> |
178 position to start at (integer) |
178 position to start at (integer) |
179 </dd><dt><i>endPos</i></dt> |
179 </dd><dt><i>endPos</i></dt> |
180 <dd> |
180 <dd> |
181 position to end at (integer) |
181 position to end at (integer) |
182 </dd> |
182 </dd> |
183 </dl><a NAME="SpellChecker.__getNextWord" ID="SpellChecker.__getNextWord"></a> |
183 </dl><a NAME="SpellChecker.__getNextWord" ID="SpellChecker.__getNextWord"></a> |
184 <h4>SpellChecker.__getNextWord</h4> |
184 <h4>SpellChecker.__getNextWord</h4> |
185 <b>__getNextWord</b>(<i>pos, endPosition</i>) |
185 <b>__getNextWord</b>(<i>pos, endPosition</i>) |
186 <p> |
186 <p> |
187 Private method to get the next word in the text after the given position. |
187 Private method to get the next word in the text after the given position. |
188 </p><dl> |
188 </p><dl> |
189 <dt><i>pos</i></dt> |
189 <dt><i>pos</i></dt> |
190 <dd> |
190 <dd> |
191 position to start word extraction (integer) |
191 position to start word extraction (integer) |
192 </dd><dt><i>endPosition</i></dt> |
192 </dd><dt><i>endPosition</i></dt> |
193 <dd> |
193 <dd> |
194 position to stop word extraction (integer) |
194 position to stop word extraction (integer) |
195 </dd> |
195 </dd> |
196 </dl><dl> |
196 </dl><dl> |
197 <dt>Returns:</dt> |
197 <dt>Returns:</dt> |
198 <dd> |
198 <dd> |
199 tuple of three values (the extracted word (string), |
199 tuple of three values (the extracted word (string), |
200 start position (integer), end position (integer)) |
200 start position (integer), end position (integer)) |
201 </dd> |
201 </dd> |
202 </dl><a NAME="SpellChecker.__incrementalCheck" ID="SpellChecker.__incrementalCheck"></a> |
202 </dl><a NAME="SpellChecker.__incrementalCheck" ID="SpellChecker.__incrementalCheck"></a> |
203 <h4>SpellChecker.__incrementalCheck</h4> |
203 <h4>SpellChecker.__incrementalCheck</h4> |
204 <b>__incrementalCheck</b>(<i></i>) |
204 <b>__incrementalCheck</b>(<i></i>) |
205 <p> |
205 <p> |
206 Private method to check the document incrementally. |
206 Private method to check the document incrementally. |
207 </p><a NAME="SpellChecker.__iter__" ID="SpellChecker.__iter__"></a> |
207 </p><a NAME="SpellChecker.__iter__" ID="SpellChecker.__iter__"></a> |
208 <h4>SpellChecker.__iter__</h4> |
208 <h4>SpellChecker.__iter__</h4> |
209 <b>__iter__</b>(<i></i>) |
209 <b>__iter__</b>(<i></i>) |
210 <p> |
210 <p> |
211 Private method to create an iterator. |
211 Private method to create an iterator. |
212 </p><a NAME="SpellChecker.__next__" ID="SpellChecker.__next__"></a> |
212 </p><a NAME="SpellChecker.__next__" ID="SpellChecker.__next__"></a> |
213 <h4>SpellChecker.__next__</h4> |
213 <h4>SpellChecker.__next__</h4> |
214 <b>__next__</b>(<i></i>) |
214 <b>__next__</b>(<i></i>) |
215 <p> |
215 <p> |
216 Public method to advance to the next error. |
216 Public method to advance to the next error. |
217 </p><dl> |
217 </p><dl> |
218 <dt>Returns:</dt> |
218 <dt>Returns:</dt> |
219 <dd> |
219 <dd> |
220 self |
220 self |
221 </dd> |
221 </dd> |
222 </dl><a NAME="SpellChecker._getDict" ID="SpellChecker._getDict"></a> |
222 </dl><a NAME="SpellChecker._getDict" ID="SpellChecker._getDict"></a> |
223 <h4>SpellChecker._getDict</h4> |
223 <h4>SpellChecker._getDict</h4> |
224 <b>_getDict</b>(<i>lang, pwl = "", pel = ""</i>) |
224 <b>_getDict</b>(<i>lang, pwl = "", pel = ""</i>) |
225 <p> |
225 <p> |
226 Protected classmethod to get a new dictionary. |
226 Protected classmethod to get a new dictionary. |
227 </p><dl> |
227 </p><dl> |
228 <dt><i>lang</i></dt> |
228 <dt><i>lang</i></dt> |
229 <dd> |
229 <dd> |
230 the language to be used as the default (string). |
230 the language to be used as the default (string). |
231 The string should be in language locale format (e.g. en_US, de). |
231 The string should be in language locale format (e.g. en_US, de). |
232 </dd><dt><i>pwl=</i></dt> |
232 </dd><dt><i>pwl=</i></dt> |
233 <dd> |
233 <dd> |
234 name of the personal/project word list (string) |
234 name of the personal/project word list (string) |
235 </dd><dt><i>pel=</i></dt> |
235 </dd><dt><i>pel=</i></dt> |
236 <dd> |
236 <dd> |
237 name of the personal/project exclude list (string) |
237 name of the personal/project exclude list (string) |
238 </dd> |
238 </dd> |
239 </dl><dl> |
239 </dl><dl> |
240 <dt>Returns:</dt> |
240 <dt>Returns:</dt> |
241 <dd> |
241 <dd> |
242 reference to the dictionary (enchant.Dict) |
242 reference to the dictionary (enchant.Dict) |
243 </dd> |
243 </dd> |
244 </dl><a NAME="SpellChecker.add" ID="SpellChecker.add"></a> |
244 </dl><a NAME="SpellChecker.add" ID="SpellChecker.add"></a> |
245 <h4>SpellChecker.add</h4> |
245 <h4>SpellChecker.add</h4> |
246 <b>add</b>(<i>word = None</i>) |
246 <b>add</b>(<i>word = None</i>) |
247 <p> |
247 <p> |
248 Public method to add a word to the personal word list. |
248 Public method to add a word to the personal word list. |
249 </p><dl> |
249 </p><dl> |
250 <dt><i>word</i></dt> |
250 <dt><i>word</i></dt> |
251 <dd> |
251 <dd> |
252 word to add (string) |
252 word to add (string) |
253 </dd> |
253 </dd> |
254 </dl><a NAME="SpellChecker.checkCurrentPage" ID="SpellChecker.checkCurrentPage"></a> |
254 </dl><a NAME="SpellChecker.checkCurrentPage" ID="SpellChecker.checkCurrentPage"></a> |
255 <h4>SpellChecker.checkCurrentPage</h4> |
255 <h4>SpellChecker.checkCurrentPage</h4> |
256 <b>checkCurrentPage</b>(<i></i>) |
256 <b>checkCurrentPage</b>(<i></i>) |
257 <p> |
257 <p> |
258 Private method to check the currently visible page. |
258 Private method to check the currently visible page. |
259 </p><a NAME="SpellChecker.checkDocument" ID="SpellChecker.checkDocument"></a> |
259 </p><a NAME="SpellChecker.checkDocument" ID="SpellChecker.checkDocument"></a> |
260 <h4>SpellChecker.checkDocument</h4> |
260 <h4>SpellChecker.checkDocument</h4> |
261 <b>checkDocument</b>(<i></i>) |
261 <b>checkDocument</b>(<i></i>) |
262 <p> |
262 <p> |
263 Public method to check the complete document |
263 Public method to check the complete document |
264 </p><a NAME="SpellChecker.checkDocumentIncrementally" ID="SpellChecker.checkDocumentIncrementally"></a> |
264 </p><a NAME="SpellChecker.checkDocumentIncrementally" ID="SpellChecker.checkDocumentIncrementally"></a> |
265 <h4>SpellChecker.checkDocumentIncrementally</h4> |
265 <h4>SpellChecker.checkDocumentIncrementally</h4> |
266 <b>checkDocumentIncrementally</b>(<i></i>) |
266 <b>checkDocumentIncrementally</b>(<i></i>) |
267 <p> |
267 <p> |
268 Public method to check the document incrementally. |
268 Public method to check the document incrementally. |
269 </p><a NAME="SpellChecker.checkLines" ID="SpellChecker.checkLines"></a> |
269 </p><a NAME="SpellChecker.checkLines" ID="SpellChecker.checkLines"></a> |
270 <h4>SpellChecker.checkLines</h4> |
270 <h4>SpellChecker.checkLines</h4> |
271 <b>checkLines</b>(<i>firstLine, lastLine</i>) |
271 <b>checkLines</b>(<i>firstLine, lastLine</i>) |
272 <p> |
272 <p> |
273 Public method to check some lines of text. |
273 Public method to check some lines of text. |
274 </p><dl> |
274 </p><dl> |
275 <dt><i>firstLine</i></dt> |
275 <dt><i>firstLine</i></dt> |
276 <dd> |
276 <dd> |
277 line number of first line to check (integer) |
277 line number of first line to check (integer) |
278 </dd><dt><i>lastLine</i></dt> |
278 </dd><dt><i>lastLine</i></dt> |
279 <dd> |
279 <dd> |
280 line number of last line to check (integer) |
280 line number of last line to check (integer) |
281 </dd> |
281 </dd> |
282 </dl><a NAME="SpellChecker.checkSelection" ID="SpellChecker.checkSelection"></a> |
282 </dl><a NAME="SpellChecker.checkSelection" ID="SpellChecker.checkSelection"></a> |
283 <h4>SpellChecker.checkSelection</h4> |
283 <h4>SpellChecker.checkSelection</h4> |
284 <b>checkSelection</b>(<i></i>) |
284 <b>checkSelection</b>(<i></i>) |
285 <p> |
285 <p> |
286 Private method to check the current selection. |
286 Private method to check the current selection. |
287 </p><a NAME="SpellChecker.checkWord" ID="SpellChecker.checkWord"></a> |
287 </p><a NAME="SpellChecker.checkWord" ID="SpellChecker.checkWord"></a> |
288 <h4>SpellChecker.checkWord</h4> |
288 <h4>SpellChecker.checkWord</h4> |
289 <b>checkWord</b>(<i>pos, atEnd = False</i>) |
289 <b>checkWord</b>(<i>pos, atEnd = False</i>) |
290 <p> |
290 <p> |
291 Public method to check the word at position pos. |
291 Public method to check the word at position pos. |
292 </p><dl> |
292 </p><dl> |
293 <dt><i>pos</i></dt> |
293 <dt><i>pos</i></dt> |
294 <dd> |
294 <dd> |
295 position to check at (integer) |
295 position to check at (integer) |
296 </dd><dt><i>atEnd=</i></dt> |
296 </dd><dt><i>atEnd=</i></dt> |
297 <dd> |
297 <dd> |
298 flag indicating the position is at the end of the word |
298 flag indicating the position is at the end of the word |
299 to check (boolean) |
299 to check (boolean) |
300 </dd> |
300 </dd> |
301 </dl><a NAME="SpellChecker.clearAll" ID="SpellChecker.clearAll"></a> |
301 </dl><a NAME="SpellChecker.clearAll" ID="SpellChecker.clearAll"></a> |
302 <h4>SpellChecker.clearAll</h4> |
302 <h4>SpellChecker.clearAll</h4> |
303 <b>clearAll</b>(<i></i>) |
303 <b>clearAll</b>(<i></i>) |
304 <p> |
304 <p> |
305 Public method to clear all spelling markers. |
305 Public method to clear all spelling markers. |
306 </p><a NAME="SpellChecker.getAvailableLanguages" ID="SpellChecker.getAvailableLanguages"></a> |
306 </p><a NAME="SpellChecker.getAvailableLanguages" ID="SpellChecker.getAvailableLanguages"></a> |
307 <h4>SpellChecker.getAvailableLanguages</h4> |
307 <h4>SpellChecker.getAvailableLanguages</h4> |
308 <b>getAvailableLanguages</b>(<i></i>) |
308 <b>getAvailableLanguages</b>(<i></i>) |
309 <p> |
309 <p> |
310 Public classmethod to get all available languages. |
310 Public classmethod to get all available languages. |
311 </p><dl> |
311 </p><dl> |
312 <dt>Returns:</dt> |
312 <dt>Returns:</dt> |
313 <dd> |
313 <dd> |
314 list of available languages (list of strings) |
314 list of available languages (list of strings) |
315 </dd> |
315 </dd> |
316 </dl><a NAME="SpellChecker.getContext" ID="SpellChecker.getContext"></a> |
316 </dl><a NAME="SpellChecker.getContext" ID="SpellChecker.getContext"></a> |
317 <h4>SpellChecker.getContext</h4> |
317 <h4>SpellChecker.getContext</h4> |
318 <b>getContext</b>(<i>wordStart, wordEnd</i>) |
318 <b>getContext</b>(<i>wordStart, wordEnd</i>) |
319 <p> |
319 <p> |
320 Public method to get the context of a faulty word. |
320 Public method to get the context of a faulty word. |
321 </p><dl> |
321 </p><dl> |
322 <dt><i>wordStart</i></dt> |
322 <dt><i>wordStart</i></dt> |
323 <dd> |
323 <dd> |
324 the starting position of the word (integer) |
324 the starting position of the word (integer) |
325 </dd><dt><i>wordEnd</i></dt> |
325 </dd><dt><i>wordEnd</i></dt> |
326 <dd> |
326 <dd> |
327 the ending position of the word (integer) |
327 the ending position of the word (integer) |
328 </dd> |
328 </dd> |
329 </dl><dl> |
329 </dl><dl> |
330 <dt>Returns:</dt> |
330 <dt>Returns:</dt> |
331 <dd> |
331 <dd> |
332 tuple of the leading and trailing context (string, string) |
332 tuple of the leading and trailing context (string, string) |
333 </dd> |
333 </dd> |
334 </dl><a NAME="SpellChecker.getError" ID="SpellChecker.getError"></a> |
334 </dl><a NAME="SpellChecker.getError" ID="SpellChecker.getError"></a> |
335 <h4>SpellChecker.getError</h4> |
335 <h4>SpellChecker.getError</h4> |
336 <b>getError</b>(<i></i>) |
336 <b>getError</b>(<i></i>) |
337 <p> |
337 <p> |
338 Public method to get information about the last error found. |
338 Public method to get information about the last error found. |
339 </p><dl> |
339 </p><dl> |
340 <dt>Returns:</dt> |
340 <dt>Returns:</dt> |
341 <dd> |
341 <dd> |
342 tuple of last faulty word (string), starting position of the |
342 tuple of last faulty word (string), starting position of the |
343 faulty word (integer) and ending position of the faulty word (integer) |
343 faulty word (integer) and ending position of the faulty word (integer) |
344 </dd> |
344 </dd> |
345 </dl><a NAME="SpellChecker.getLanguage" ID="SpellChecker.getLanguage"></a> |
345 </dl><a NAME="SpellChecker.getLanguage" ID="SpellChecker.getLanguage"></a> |
346 <h4>SpellChecker.getLanguage</h4> |
346 <h4>SpellChecker.getLanguage</h4> |
347 <b>getLanguage</b>(<i></i>) |
347 <b>getLanguage</b>(<i></i>) |
348 <p> |
348 <p> |
349 Public method to get the current language. |
349 Public method to get the current language. |
350 </p><dl> |
350 </p><dl> |
351 <dt>Returns:</dt> |
351 <dt>Returns:</dt> |
352 <dd> |
352 <dd> |
353 current language in language locale format (string) |
353 current language in language locale format (string) |
354 </dd> |
354 </dd> |
355 </dl><a NAME="SpellChecker.getSuggestions" ID="SpellChecker.getSuggestions"></a> |
355 </dl><a NAME="SpellChecker.getSuggestions" ID="SpellChecker.getSuggestions"></a> |
356 <h4>SpellChecker.getSuggestions</h4> |
356 <h4>SpellChecker.getSuggestions</h4> |
357 <b>getSuggestions</b>(<i>word</i>) |
357 <b>getSuggestions</b>(<i>word</i>) |
358 <p> |
358 <p> |
359 Public method to get suggestions for the given word. |
359 Public method to get suggestions for the given word. |
360 </p><dl> |
360 </p><dl> |
361 <dt><i>word</i></dt> |
361 <dt><i>word</i></dt> |
362 <dd> |
362 <dd> |
363 word to get suggestions for (string) |
363 word to get suggestions for (string) |
364 </dd> |
364 </dd> |
365 </dl><dl> |
365 </dl><dl> |
366 <dt>Returns:</dt> |
366 <dt>Returns:</dt> |
367 <dd> |
367 <dd> |
368 list of suggestions (list of strings) |
368 list of suggestions (list of strings) |
369 </dd> |
369 </dd> |
370 </dl><a NAME="SpellChecker.ignoreAlways" ID="SpellChecker.ignoreAlways"></a> |
370 </dl><a NAME="SpellChecker.ignoreAlways" ID="SpellChecker.ignoreAlways"></a> |
371 <h4>SpellChecker.ignoreAlways</h4> |
371 <h4>SpellChecker.ignoreAlways</h4> |
372 <b>ignoreAlways</b>(<i>word = None</i>) |
372 <b>ignoreAlways</b>(<i>word = None</i>) |
373 <p> |
373 <p> |
374 Public method to tell the checker, to always ignore the given word |
374 Public method to tell the checker, to always ignore the given word |
375 or the current word. |
375 or the current word. |
376 </p><dl> |
376 </p><dl> |
377 <dt><i>word</i></dt> |
377 <dt><i>word</i></dt> |
378 <dd> |
378 <dd> |
379 word to be ignored (string) |
379 word to be ignored (string) |
380 </dd> |
380 </dd> |
381 </dl><a NAME="SpellChecker.initCheck" ID="SpellChecker.initCheck"></a> |
381 </dl><a NAME="SpellChecker.initCheck" ID="SpellChecker.initCheck"></a> |
382 <h4>SpellChecker.initCheck</h4> |
382 <h4>SpellChecker.initCheck</h4> |
383 <b>initCheck</b>(<i>startPos, endPos</i>) |
383 <b>initCheck</b>(<i>startPos, endPos</i>) |
384 <p> |
384 <p> |
385 Public method to initialize a spell check. |
385 Public method to initialize a spell check. |
386 </p><dl> |
386 </p><dl> |
387 <dt><i>startPos</i></dt> |
387 <dt><i>startPos</i></dt> |
388 <dd> |
388 <dd> |
389 position to start at (integer) |
389 position to start at (integer) |
390 </dd><dt><i>endPos</i></dt> |
390 </dd><dt><i>endPos</i></dt> |
391 <dd> |
391 <dd> |
392 position to end at (integer) |
392 position to end at (integer) |
393 </dd> |
393 </dd> |
394 </dl><dl> |
394 </dl><dl> |
395 <dt>Returns:</dt> |
395 <dt>Returns:</dt> |
396 <dd> |
396 <dd> |
397 flag indicating successful initialization (boolean) |
397 flag indicating successful initialization (boolean) |
398 </dd> |
398 </dd> |
399 </dl><a NAME="SpellChecker.isAvailable" ID="SpellChecker.isAvailable"></a> |
399 </dl><a NAME="SpellChecker.isAvailable" ID="SpellChecker.isAvailable"></a> |
400 <h4>SpellChecker.isAvailable</h4> |
400 <h4>SpellChecker.isAvailable</h4> |
401 <b>isAvailable</b>(<i></i>) |
401 <b>isAvailable</b>(<i></i>) |
402 <p> |
402 <p> |
403 Public classmethod to check, if spellchecking is available. |
403 Public classmethod to check, if spellchecking is available. |
404 </p><dl> |
404 </p><dl> |
405 <dt>Returns:</dt> |
405 <dt>Returns:</dt> |
406 <dd> |
406 <dd> |
407 flag indicating availability (boolean) |
407 flag indicating availability (boolean) |
408 </dd> |
408 </dd> |
409 </dl><a NAME="SpellChecker.remove" ID="SpellChecker.remove"></a> |
409 </dl><a NAME="SpellChecker.remove" ID="SpellChecker.remove"></a> |
410 <h4>SpellChecker.remove</h4> |
410 <h4>SpellChecker.remove</h4> |
411 <b>remove</b>(<i>word</i>) |
411 <b>remove</b>(<i>word</i>) |
412 <p> |
412 <p> |
413 Public method to add a word to the personal exclude list. |
413 Public method to add a word to the personal exclude list. |
414 </p><dl> |
414 </p><dl> |
415 <dt><i>word</i></dt> |
415 <dt><i>word</i></dt> |
416 <dd> |
416 <dd> |
417 word to add (string) |
417 word to add (string) |
418 </dd> |
418 </dd> |
419 </dl><a NAME="SpellChecker.replace" ID="SpellChecker.replace"></a> |
419 </dl><a NAME="SpellChecker.replace" ID="SpellChecker.replace"></a> |
420 <h4>SpellChecker.replace</h4> |
420 <h4>SpellChecker.replace</h4> |
421 <b>replace</b>(<i>replacement</i>) |
421 <b>replace</b>(<i>replacement</i>) |
422 <p> |
422 <p> |
423 Public method to tell the checker to replace the current word with |
423 Public method to tell the checker to replace the current word with |
424 the replacement string. |
424 the replacement string. |
425 </p><dl> |
425 </p><dl> |
426 <dt><i>replacement</i></dt> |
426 <dt><i>replacement</i></dt> |
427 <dd> |
427 <dd> |
428 replacement string (string) |
428 replacement string (string) |
429 </dd> |
429 </dd> |
430 </dl><a NAME="SpellChecker.replaceAlways" ID="SpellChecker.replaceAlways"></a> |
430 </dl><a NAME="SpellChecker.replaceAlways" ID="SpellChecker.replaceAlways"></a> |
431 <h4>SpellChecker.replaceAlways</h4> |
431 <h4>SpellChecker.replaceAlways</h4> |
432 <b>replaceAlways</b>(<i>replacement</i>) |
432 <b>replaceAlways</b>(<i>replacement</i>) |
433 <p> |
433 <p> |
434 Public method to tell the checker to always replace the current word |
434 Public method to tell the checker to always replace the current word |
435 with the replacement string. |
435 with the replacement string. |
436 </p><dl> |
436 </p><dl> |
437 <dt><i>replacement</i></dt> |
437 <dt><i>replacement</i></dt> |
438 <dd> |
438 <dd> |
439 replacement string (string) |
439 replacement string (string) |
440 </dd> |
440 </dd> |
441 </dl><a NAME="SpellChecker.setDefaultLanguage" ID="SpellChecker.setDefaultLanguage"></a> |
441 </dl><a NAME="SpellChecker.setDefaultLanguage" ID="SpellChecker.setDefaultLanguage"></a> |
442 <h4>SpellChecker.setDefaultLanguage</h4> |
442 <h4>SpellChecker.setDefaultLanguage</h4> |
443 <b>setDefaultLanguage</b>(<i>language</i>) |
443 <b>setDefaultLanguage</b>(<i>language</i>) |
444 <p> |
444 <p> |
445 Public classmethod to set the default language. |
445 Public classmethod to set the default language. |
446 </p><dl> |
446 </p><dl> |
447 <dt><i>language</i></dt> |
447 <dt><i>language</i></dt> |
448 <dd> |
448 <dd> |
449 the language to be used as the default (string). |
449 the language to be used as the default (string). |
450 The string should be in language locale format (e.g. en_US, de). |
450 The string should be in language locale format (e.g. en_US, de). |
451 </dd> |
451 </dd> |
452 </dl><a NAME="SpellChecker.setLanguage" ID="SpellChecker.setLanguage"></a> |
452 </dl><a NAME="SpellChecker.setLanguage" ID="SpellChecker.setLanguage"></a> |
453 <h4>SpellChecker.setLanguage</h4> |
453 <h4>SpellChecker.setLanguage</h4> |
454 <b>setLanguage</b>(<i>language, pwl = "", pel = ""</i>) |
454 <b>setLanguage</b>(<i>language, pwl = "", pel = ""</i>) |
455 <p> |
455 <p> |
456 Public method to set the current language. |
456 Public method to set the current language. |
457 </p><dl> |
457 </p><dl> |
458 <dt><i>language</i></dt> |
458 <dt><i>language</i></dt> |
459 <dd> |
459 <dd> |
460 the language to be used as the default (string). |
460 the language to be used as the default (string). |
461 The string should be in language locale format (e.g. en_US, de). |
461 The string should be in language locale format (e.g. en_US, de). |
462 </dd><dt><i>pwl=</i></dt> |
462 </dd><dt><i>pwl=</i></dt> |
463 <dd> |
463 <dd> |
464 name of the personal/project word list (string) |
464 name of the personal/project word list (string) |
465 </dd><dt><i>pel=</i></dt> |
465 </dd><dt><i>pel=</i></dt> |
466 <dd> |
466 <dd> |
467 name of the personal/project exclude list (string) |
467 name of the personal/project exclude list (string) |
468 </dd> |
468 </dd> |
469 </dl><a NAME="SpellChecker.setMinimumWordSize" ID="SpellChecker.setMinimumWordSize"></a> |
469 </dl><a NAME="SpellChecker.setMinimumWordSize" ID="SpellChecker.setMinimumWordSize"></a> |
470 <h4>SpellChecker.setMinimumWordSize</h4> |
470 <h4>SpellChecker.setMinimumWordSize</h4> |
471 <b>setMinimumWordSize</b>(<i>size</i>) |
471 <b>setMinimumWordSize</b>(<i>size</i>) |
472 <p> |
472 <p> |
473 Public method to set the minimum word size. |
473 Public method to set the minimum word size. |
474 </p><dl> |
474 </p><dl> |
475 <dt><i>size</i></dt> |
475 <dt><i>size</i></dt> |
476 <dd> |
476 <dd> |
477 minimum word size (integer) |
477 minimum word size (integer) |
478 </dd> |
478 </dd> |
479 </dl><a NAME="SpellChecker.stopIncrementalCheck" ID="SpellChecker.stopIncrementalCheck"></a> |
479 </dl><a NAME="SpellChecker.stopIncrementalCheck" ID="SpellChecker.stopIncrementalCheck"></a> |
480 <h4>SpellChecker.stopIncrementalCheck</h4> |
480 <h4>SpellChecker.stopIncrementalCheck</h4> |
481 <b>stopIncrementalCheck</b>(<i></i>) |
481 <b>stopIncrementalCheck</b>(<i></i>) |
482 <p> |
482 <p> |
483 Public method to stop an incremental check. |
483 Public method to stop an incremental check. |
484 </p> |
484 </p> |
485 <div align="right"><a href="#top">Up</a></div> |
485 <div align="right"><a href="#top">Up</a></div> |
486 <hr /> |
486 <hr /> |
487 </body></html> |
487 </body></html> |