python-negar 1.2.7__tar.gz → 1.2.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python-negar-1.2.7 → python-negar-1.2.9}/Changelog.txt +7 -0
- {python-negar-1.2.7 → python-negar-1.2.9}/PKG-INFO +1 -1
- {python-negar-1.2.7 → python-negar-1.2.9}/negar/constants.py +1 -1
- {python-negar-1.2.7 → python-negar-1.2.9}/negar/virastar.py +8 -3
- {python-negar-1.2.7 → python-negar-1.2.9}/python_negar.egg-info/PKG-INFO +1 -1
- {python-negar-1.2.7 → python-negar-1.2.9}/AUTHORS +0 -0
- {python-negar-1.2.7 → python-negar-1.2.9}/LICENSE +0 -0
- {python-negar-1.2.7 → python-negar-1.2.9}/MANIFEST.in +0 -0
- {python-negar-1.2.7 → python-negar-1.2.9}/README.md +0 -0
- {python-negar-1.2.7 → python-negar-1.2.9}/negar/__init__.py +0 -0
- {python-negar-1.2.7 → python-negar-1.2.9}/negar/data/__init__.py +0 -0
- {python-negar-1.2.7 → python-negar-1.2.9}/negar/data/untouchable.dat +0 -0
- {python-negar-1.2.7 → python-negar-1.2.9}/negar/gui.py +0 -0
- {python-negar-1.2.7 → python-negar-1.2.9}/python_negar.egg-info/SOURCES.txt +0 -0
- {python-negar-1.2.7 → python-negar-1.2.9}/python_negar.egg-info/dependency_links.txt +0 -0
- {python-negar-1.2.7 → python-negar-1.2.9}/python_negar.egg-info/entry_points.txt +0 -0
- {python-negar-1.2.7 → python-negar-1.2.9}/python_negar.egg-info/requires.txt +0 -0
- {python-negar-1.2.7 → python-negar-1.2.9}/python_negar.egg-info/top_level.txt +0 -0
- {python-negar-1.2.7 → python-negar-1.2.9}/setup.cfg +0 -0
- {python-negar-1.2.7 → python-negar-1.2.9}/setup.py +0 -0
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
1.2.9 - 2024-05-07
|
|
2
|
+
-- Fix subtle issue with untoucahle words which stick to nonliteral symbols like Parantheses
|
|
3
|
+
-- new test for untoucahle words
|
|
4
|
+
|
|
5
|
+
1.2.8 - 2023-09-21
|
|
6
|
+
-- Fix subtle issue with triple dots at the end of sentence followed by another [?!.]
|
|
7
|
+
|
|
1
8
|
1.2.7 - 2023-08-07
|
|
2
9
|
-- Remove dot from saving directory under Windows OS.
|
|
3
10
|
|
|
@@ -59,7 +59,7 @@ class PersianEditor:
|
|
|
59
59
|
self.fix_three_dots() if self._fix_three_dots else None
|
|
60
60
|
self.aggressive() if self._aggresive else None
|
|
61
61
|
self.text = re.sub(
|
|
62
|
-
r"[ ]*([
|
|
62
|
+
r"[ ]*([…:;,؛،.؟!]{1})[ ]*",
|
|
63
63
|
r"\1 ",
|
|
64
64
|
self.text,
|
|
65
65
|
)
|
|
@@ -80,6 +80,11 @@ class PersianEditor:
|
|
|
80
80
|
if self._fix_spacing_for_braces_and_quotes else None
|
|
81
81
|
self.cleanup_redundant_zwnj()
|
|
82
82
|
self.cleanup_spacing() if self._cleanup_spacing else None
|
|
83
|
+
self.text = re.sub(
|
|
84
|
+
r"…([.؟!])",
|
|
85
|
+
r"… \1",
|
|
86
|
+
self.text,
|
|
87
|
+
)
|
|
83
88
|
self._handle_urls(State.restore)
|
|
84
89
|
return self.text
|
|
85
90
|
|
|
@@ -106,7 +111,7 @@ class PersianEditor:
|
|
|
106
111
|
|
|
107
112
|
def fix_three_dots(self):
|
|
108
113
|
"""Replace three dots with an ellipsis."""
|
|
109
|
-
self.text = re.sub(r"\s*\.{3,}", r"
|
|
114
|
+
self.text = re.sub(r"\s*\.{3,}(\s)*", r"…\1", self.text)
|
|
110
115
|
|
|
111
116
|
def fix_english_quotes(self):
|
|
112
117
|
"""Replace English quotes with their Persian counterparts."""
|
|
@@ -227,7 +232,7 @@ class PersianEditor:
|
|
|
227
232
|
[تمش]ان|
|
|
228
233
|
ها(ی(ی|ت|م|ش|تان|شان)?)?|""" if self._exaggerating_zwnj else ""
|
|
229
234
|
regx = re.compile(
|
|
230
|
-
rf"""(\S+?) # not-greedy fetch to handle some case like هایشان instead شان
|
|
235
|
+
rf"""\b(\S+?) # not-greedy fetch to handle some case like هایشان instead شان
|
|
231
236
|
({exag}
|
|
232
237
|
# تر(ی(ن)?)?
|
|
233
238
|
# [تمش]ان|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|