Skip to content

Commit 066dcf4

Browse files
authored
Merge pull request #1238 from PyThaiNLP/copilot/check-docs-comments-code
Fix spelling errors in comments and docstrings
2 parents 1a2998e + 7e79219 commit 066dcf4

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

examples/khavee.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@
6767
)
6868
)
6969
# -> [
70-
# "Cant find rhyme between paragraphs ('สอน', 'ไป') in paragraph 4",
71-
# "Cant find rhyme between paragraphs ('มี่', ['เกม', 'เอ่อ', 'เก่ง', 'กาจ']) in paragraph 5"
70+
# "Can't find rhyme between paragraphs ('สอน', 'ไป') in paragraph 4",
71+
# "Can't find rhyme between paragraphs ('มี่', ['เกม', 'เอ่อ', 'เก่ง', 'กาจ']) in paragraph 5"
7272
# ]
7373

7474

@@ -95,8 +95,8 @@
9595
)
9696
)
9797
# -> [
98-
# "Cant find rhyme between paragraphs ('หมา', 'จอง') in paragraph 2",
99-
# "Cant find rhyme between paragraphs ('หมา', 'ทอง') in paragraph 2"
98+
# "Can't find rhyme between paragraphs ('หมา', 'จอง') in paragraph 2",
99+
# "Can't find rhyme between paragraphs ('หมา', 'ทอง') in paragraph 2"
100100
# ]
101101

102102
# การเช็คคำเอกโท

pythainlp/khavee/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def check_marttra(self, word: str) -> str:
314314
if "็" in word:
315315
return "กา"
316316
else:
317-
return "Cant find Marttra in this word"
317+
return "Can't find Marttra in this word"
318318

319319
def is_sumpus(self, word1: str, word2: str) -> bool:
320320
"""

pythainlp/transliterate/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def romanize(
2222
2323
:param str text: A Thai word to be romanized. \
2424
The input should not include whitespace because \
25-
the function is support subwords by spliting whitespace.
25+
the function is support subwords by splitting whitespace.
2626
:param str engine: One of 'royin' (default), 'thai2rom', 'thai2rom_onnx,
2727
'tltk', and 'lookup'. See more in options for engine section.
2828
:param str fallback_engine: If engine equals 'lookup',

pythainlp/transliterate/iso_11940.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898

9999
_punctuation_and_digits = {
100100
# ฯ can has two meanings in ISO 11940.
101-
# If it is for abbrevation, it is paiyan noi.
101+
# If it is for abbreviation, it is paiyan noi.
102102
# If it is for sentence termination, it is angkhan diao.
103103
# Without semantic analysis, they cannot be distinguished from each other.
104104
# In this simple implementation, we decided to always treat ฯ as paiyan noi.

pythainlp/util/remove_trailing_repeat_consonants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def remove_trailing_repeat_consonants(
7979
if has_dictionary_updated:
8080
_update_consonant_repeaters(custom_dict)
8181

82-
# seperate by newline
82+
# separate by newline
8383
modified_lines = []
8484
for line in text.split("\n"):
8585
segments = line.split(" ")
@@ -144,7 +144,7 @@ def _remove_repeat_trailing_consonants_from_segment(segment: str) -> str:
144144
# the chance is that the correct is one character,
145145
# or it's not in the dictionary.
146146

147-
# make the repition to once
147+
# make the repetition to once
148148
segment = segment_head + (dup * 1)
149149

150150
return segment

0 commit comments

Comments
 (0)