Back to index

plone3  3.1.7
Classes | Functions | Variables
kupu.python.spellcheck Namespace Reference

Classes

class  SpellChecker

Functions

def format_result

Variables

string COMMAND = 'aspell -a'
int __allow_access_to_unprotected_subobjects__ = 1
tuple c = SpellChecker()
tuple line = raw_input('Enter text to check: ')
tuple ret = c.check(line)

Function Documentation

convert the result dict to XML

Definition at line 106 of file spellcheck.py.

00106 
00107 def format_result(result):
00108     """convert the result dict to XML"""
00109     buf = ['<?xml version="1.0" encoding="UTF-8" ?>\n<spellcheck_result>']
00110     for key, value in result.items():
00111         buf.append('<incorrect><word>')
00112         buf.append(key)
00113         buf.append('</word><replacements>')
00114         buf.append(' '.join(value))
00115         buf.append('</replacements></incorrect>')
00116     buf.append('</spellcheck_result>')
00117     return ''.join(buf)

Here is the caller graph for this function:


Variable Documentation

Definition at line 15 of file spellcheck.py.

Definition at line 119 of file spellcheck.py.

string kupu.python.spellcheck.COMMAND = 'aspell -a'

Definition at line 5 of file spellcheck.py.

tuple kupu.python.spellcheck.line = raw_input('Enter text to check: ')

Definition at line 121 of file spellcheck.py.

tuple kupu.python.spellcheck.ret = c.check(line)

Definition at line 124 of file spellcheck.py.