document check_spelling

This commit is contained in:
Sina Atalay 2023-09-09 20:59:39 +02:00
parent f107f972fb
commit c1f95af8a6
2 changed files with 24 additions and 4 deletions

View File

@ -14,4 +14,16 @@ nav:
plugins:
- search
- mkdocstrings
- mkdocstrings:
handlers:
python:
options:
show_root_heading: true
show_bases: true
show_root_members_full_path: true
group_by_category: true
show_category_heading: true
show_symbol_type_heading: true
show_symbol_type_toc: true
merge_init_into_class: true
docstring_style: sphinx

View File

@ -40,7 +40,15 @@ dictionary = [
def check_spelling(sentence: str) -> str:
"""
To be continued...
Check the spelling of a sentence and give warnings if there are any misspelled
words.
It uses pyspellchecker. It can also guess the correct version of the
misspelled word, but it is not used because it is very slow.
:param sentence: the sentence to be checked
:type sentence: str
:return: the same sentence
"""
modifiedSentence = sentence.lower() # convert to lower case
modifiedSentence = re.sub(