Browse Source

update: skip space character check in caption

master
Dnomd343 2 years ago
parent
commit
53bd35c9c1
  1. 7
      src/punctuation/check.py

7
src/punctuation/check.py

@ -25,8 +25,7 @@ endingPunctuations = [
# '—', # '—',
warningPunctuations = [ warningPunctuations = [
# ' ', ' ', '-', '·', '.', '',
'-', '·', '.', '',
] ]
defaultPath = os.path.join( defaultPath = os.path.join(
@ -92,6 +91,8 @@ def endingCheck(sentence: str) -> bool:
def existCheck(sentence: str) -> bool: def existCheck(sentence: str) -> bool:
if isCaption(sentence): # skip caption
return True
flag = False flag = False
for warningPunctuation in warningPunctuations: for warningPunctuation in warningPunctuations:
if warningPunctuation in sentence: if warningPunctuation in sentence:
@ -116,7 +117,7 @@ def contentCheck(content: list) -> None:
print('-' * 128) # split line print('-' * 128) # split line
flag = True flag = True
for row in content: # ending check for row in content: # exist check
flag &= existCheck(row) flag &= existCheck(row)
if not flag: if not flag:
print('-' * 128) # split line print('-' * 128) # split line

Loading…
Cancel
Save