korcen 0.3.8__tar.gz → 0.3.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: korcen
3
- Version: 0.3.8
3
+ Version: 0.3.9
4
4
  Summary: 한국어 비속어 검열
5
5
  Home-page: https://github.com/KR-korcen/korcen
6
6
  Author: Tanat
@@ -10,3 +10,5 @@ Classifier: License :: OSI Approved :: MIT License
10
10
  Classifier: Operating System :: OS Independent
11
11
  Requires-Python: >=3.6
12
12
  Description-Content-Type: text/markdown
13
+ Requires-Dist: better_profanity
14
+ Requires-Dist: OrderedDict
@@ -15,4 +15,4 @@ except ImportError as e:
15
15
 
16
16
 
17
17
  __all__ = [name for name, obj in locals().items()
18
- if not (name.startswith('_') or inspect.ismodule(obj))]
18
+ if not (name.startswith('_') or inspect.ismodule(obj))]
@@ -2,7 +2,6 @@ import re
2
2
  from better_profanity import profanity
3
3
  from collections import OrderedDict
4
4
 
5
-
6
5
  profanity.load_censor_words()
7
6
 
8
7
  cache_size = 0
@@ -30,8 +29,8 @@ def check(text:str, id: int=None):
30
29
 
31
30
  if id != None:
32
31
  if cache_size < 2:
33
- print("Cache size must be at least 2")
34
- return "error"
32
+ print("korcen: Cache size must be at least 2")
33
+ return False
35
34
  text = save_text(id=id, text=text)
36
35
 
37
36
  text = re.sub('𝗌', 's', text)
@@ -1160,8 +1159,8 @@ def general(text:str, id: int=None):
1160
1159
 
1161
1160
  if id != None:
1162
1161
  if cache_size < 2:
1163
- print("Cache size must be at least 2")
1164
- return "error"
1162
+ print("korcen: Cache size must be at least 2")
1163
+ return False
1165
1164
  text = save_text(id=id, text=text)
1166
1165
 
1167
1166
  text = re.sub('𝗌', 's', text)
@@ -1761,8 +1760,8 @@ def minor(text:str, id: int=None):
1761
1760
 
1762
1761
  if id != None:
1763
1762
  if cache_size < 2:
1764
- print("Cache size must be at least 2")
1765
- return "error"
1763
+ print("korcen: Cache size must be at least 2")
1764
+ return False
1766
1765
  text = save_text(id=id, text=text)
1767
1766
 
1768
1767
  newtext = text.lower()
@@ -1830,8 +1829,8 @@ def sexual(text:str, id: int=None):
1830
1829
 
1831
1830
  if id != None:
1832
1831
  if cache_size < 2:
1833
- print("Cache size must be at least 2")
1834
- return "error"
1832
+ print("korcen: Cache size must be at least 2")
1833
+ return False
1835
1834
  text = save_text(id=id, text=text)
1836
1835
 
1837
1836
  text = re.sub('𝗌', 's', text)
@@ -2192,8 +2191,8 @@ def belittle(text:str, id: int=None):
2192
2191
 
2193
2192
  if id != None:
2194
2193
  if cache_size < 2:
2195
- print("Cache size must be at least 2")
2196
- return "error"
2194
+ print("korcen: Cache size must be at least 2")
2195
+ return False
2197
2196
  text = save_text(id=id, text=text)
2198
2197
 
2199
2198
  text = text.lower()
@@ -2246,8 +2245,8 @@ def race(text:str, id: int=None):
2246
2245
 
2247
2246
  if id != None:
2248
2247
  if cache_size < 2:
2249
- print("Cache size must be at least 2")
2250
- return "error"
2248
+ print("korcen: Cache size must be at least 2")
2249
+ return False
2251
2250
  text = save_text(id=id, text=text)
2252
2251
 
2253
2252
  text = text.lower()
@@ -2268,8 +2267,8 @@ def parent(text:str, id: int=None):
2268
2267
 
2269
2268
  if id != None:
2270
2269
  if cache_size < 2:
2271
- print("Cache size must be at least 2")
2272
- return "error"
2270
+ print("korcen: Cache size must be at least 2")
2271
+ return False
2273
2272
  text = save_text(id=id, text=text)
2274
2273
 
2275
2274
  text = text.lower()
@@ -2314,8 +2313,8 @@ def english(text:str, id: int=None):
2314
2313
 
2315
2314
  if id != None:
2316
2315
  if cache_size < 2:
2317
- print("Cache size must be at least 2")
2318
- return "error"
2316
+ print("korcen: Cache size must be at least 2")
2317
+ return False
2319
2318
  text = save_text(id=id, text=text)
2320
2319
 
2321
2320
  text = re.sub('𝗌', 's', text)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: korcen
3
- Version: 0.3.8
3
+ Version: 0.3.9
4
4
  Summary: 한국어 비속어 검열
5
5
  Home-page: https://github.com/KR-korcen/korcen
6
6
  Author: Tanat
@@ -10,3 +10,5 @@ Classifier: License :: OSI Approved :: MIT License
10
10
  Classifier: Operating System :: OS Independent
11
11
  Requires-Python: >=3.6
12
12
  Description-Content-Type: text/markdown
13
+ Requires-Dist: better_profanity
14
+ Requires-Dist: OrderedDict
@@ -5,7 +5,7 @@ with open("README", "r") as fh:
5
5
 
6
6
  setuptools.setup(
7
7
  name="korcen", # Replace with your own PyPI username(id)
8
- version="0.3.8",
8
+ version="0.3.9",
9
9
  author="Tanat",
10
10
  author_email="shrbwjd05@naver.com",
11
11
  description="한국어 비속어 검열",
File without changes
File without changes