chore: Combined combinable lookaheads
This commit is contained in:
@@ -35,9 +35,7 @@ ENDOFSENTENCE_PATTERN_STR = r"""
|
|||||||
(?<![A-Z]) # Negative lookbehind: not preceded by an uppercase letter (e.g., "U.S.A.")
|
(?<![A-Z]) # Negative lookbehind: not preceded by an uppercase letter (e.g., "U.S.A.")
|
||||||
(?<!\d) # Negative lookbehind: not preceded by a digit (e.g., "1. Let's start")
|
(?<!\d) # Negative lookbehind: not preceded by a digit (e.g., "1. Let's start")
|
||||||
(?<!\d\s[ap]) # Negative lookbehind: not preceded by time (e.g., "3:00 a.m.")
|
(?<!\d\s[ap]) # Negative lookbehind: not preceded by time (e.g., "3:00 a.m.")
|
||||||
(?<!Mr) # Negative lookbehind: not preceded by "Mr"
|
(?<!Mr|Ms|Dr) # Negative lookbehind: not preceded by Mr, Ms, Dr (combined bc. length is the same)
|
||||||
(?<!Ms) # Negative lookbehind: not preceded by "Ms"
|
|
||||||
(?<!Dr) # Negative lookbehind: not preceded by "Dr"
|
|
||||||
(?<!Mrs) # Negative lookbehind: not preceded by "Mrs"
|
(?<!Mrs) # Negative lookbehind: not preceded by "Mrs"
|
||||||
(?<!Prof) # Negative lookbehind: not preceded by "Prof"
|
(?<!Prof) # Negative lookbehind: not preceded by "Prof"
|
||||||
[\.\?\!:] # Match a period, question mark, exclamation point, or colon
|
[\.\?\!:] # Match a period, question mark, exclamation point, or colon
|
||||||
|
|||||||
Reference in New Issue
Block a user