mirror of
https://github.com/rendercv/rendercv.git
synced 2026-10-24 05:08:46 -04:00
document check_spelling
This commit is contained in:
1 parent
f107f972fb
commit
c1f95af8a6
2 files changed
+24
-4
No files matched your search
+13
-1
@@ -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
|
||||
+11
-3
@@ -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(
|
||||
@@ -276,9 +284,9 @@ class Event(BaseModel):
|
||||
or "month" in string
|
||||
):
|
||||
strings_without_time_span.remove(string)
|
||||
|
||||
|
||||
return strings_without_time_span
|
||||
|
||||
|
||||
@computed_field
|
||||
@cached_property
|
||||
def highlight_strings(self) -> list[SpellCheckedString]:
|
||||
|
||||
Reference in new issue
Block a user