Skip to content

Commit 500a6e7

Browse files
maxtaran2010maxtaran2010
andauthored
docs: fix typos in docstrings and comments (#677)
Corrects several misspellings in docstrings and inline comments: - explicity -> explicit (ProvenanceItem docstring + generated schema) - horisontal -> horizontal - ommitted -> omitted - to serializes -> to serialize - succesive -> successive - questionaires -> questionnaires - optionaly -> optionally No functional changes; identifiers and enum values are untouched. Signed-off-by: maxtaran2010 <ocotifuzo727@gmail.com> Co-authored-by: maxtaran2010 <ocotifuzo727@gmail.com>
1 parent a6b6023 commit 500a6e7

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

docling_core/transforms/visualizer/layout_visualizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def _draw_doc_layout(
148148
images: Optional[dict[Optional[int], Image]] = None,
149149
included_content_layers: Optional[set[ContentLayer]] = None,
150150
):
151-
"""Draw the document clusters and optionaly the reading order."""
151+
"""Draw the document clusters and optionally the reading order."""
152152
clusters = []
153153
my_images: dict[Optional[int], Image] = {}
154154

docling_core/types/doc/document.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,7 +1321,7 @@ class ProvenanceItem(BaseModel):
13211321
"""Provenance information for elements extracted from a textual document.
13221322
13231323
A `ProvenanceItem` object acts as a lightweight pointer back into the original
1324-
document for an extracted element. It applies to documents with an explicity
1324+
document for an extracted element. It applies to documents with an explicit
13251325
or implicit layout, such as PDF, HTML, docx, or pptx.
13261326
"""
13271327

@@ -1391,7 +1391,7 @@ def check_order(self) -> Self:
13911391
13921392
Notes:
13931393
- Additional source types may be added to this union in the future to support other content sources.
1394-
- For documents with an implicit or explicity layout, such as PDF, HTML, docx, pptx, or markdown files, the
1394+
- For documents with an implicit or explicit layout, such as PDF, HTML, docx, pptx, or markdown files, the
13951395
`ProvenanceItem` should still be used.
13961396
"""
13971397

@@ -2594,7 +2594,7 @@ def export_to_otsl(
25942594
# Empty and full cells:
25952595
# "ecel", "fcel"
25962596
#
2597-
# Cell spans (horisontal, vertical, 2d):
2597+
# Cell spans (horizontal, vertical, 2d):
25982598
# "lcel", "ucel", "xcel"
25992599
#
26002600
# New line:
@@ -6735,7 +6735,7 @@ def export_to_vtt(
67356735
"""Serializes the Docling document to WebVTT format.
67366736
67376737
Args:
6738-
included_content_layers: The content layers to serializes. If ommitted, the `DEFAULT_CONTENT_LAYERS` will
6738+
included_content_layers: The content layers to serialize. If omitted, the `DEFAULT_CONTENT_LAYERS` will
67396739
be serialized.
67406740
omit_hours_if_zero: If True, omit hours when they are 0 in the timings.
67416741
omit_voice_end: If True and cue blocks have a WebVTT cue voice span as the only component, omit the voice
@@ -6769,7 +6769,7 @@ def save_as_vtt(
67696769
67706770
Args:
67716771
filename: The path to the WebVTT file.
6772-
included_content_layers: The content layers to serializes. If ommitted, the `DEFAULT_CONTENT_LAYERS` will
6772+
included_content_layers: The content layers to serialize. If omitted, the `DEFAULT_CONTENT_LAYERS` will
67736773
be serialized.
67746774
omit_hours_if_zero: If True, omit hours when they are 0 in the timings.
67756775
omit_voice_end: If True and cue blocks have a WebVTT cue voice span as the only component, omit the voice
@@ -7862,7 +7862,7 @@ def validate_document(self) -> Self:
78627862
@model_validator(mode="after")
78637863
def validate_misplaced_list_items(self) -> Self:
78647864
"""validate_misplaced_list_items."""
7865-
# find list items without list parent, putting succesive ones together
7865+
# find list items without list parent, putting successive ones together
78667866
misplaced_list_items: list[list[ListItem]] = []
78677867
prev: Optional[NodeItem] = None
78687868
for item, _ in self.iterate_items(

docling_core/types/doc/labels.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class DocItemLabel(str, Enum):
2424
CHECKBOX_UNSELECTED = "checkbox_unselected"
2525
FORM = "form"
2626
KEY_VALUE_REGION = "key_value_region"
27-
GRADING_SCALE = "grading_scale" # for elements in forms, questionaires representing a grading scale
27+
GRADING_SCALE = "grading_scale" # for elements in forms, questionnaires representing a grading scale
2828
# e.g. [strongly disagree | ... | ... | strongly agree]
2929
# e.g. ★★☆☆☆
3030
HANDWRITTEN_TEXT = "handwritten_text"

docs/DoclingDocument.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3444,7 +3444,7 @@
34443444
"type": "object"
34453445
},
34463446
"ProvenanceItem": {
3447-
"description": "Provenance information for elements extracted from a textual document.\n\nA `ProvenanceItem` object acts as a lightweight pointer back into the original\ndocument for an extracted element. It applies to documents with an explicity\nor implicit layout, such as PDF, HTML, docx, or pptx.",
3447+
"description": "Provenance information for elements extracted from a textual document.\n\nA `ProvenanceItem` object acts as a lightweight pointer back into the original\ndocument for an extracted element. It applies to documents with an explicit\nor implicit layout, such as PDF, HTML, docx, or pptx.",
34483448
"properties": {
34493449
"page_no": {
34503450
"description": "Page number",

0 commit comments

Comments
 (0)