re-common 10.0.6__py3-none-any.whl → 10.0.7__py3-none-any.whl
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.
- re_common/v2/baselibrary/helpers/__init__.py +0 -0
- re_common/v2/baselibrary/utils/string_clear.py +53 -0
- {re_common-10.0.6.dist-info → re_common-10.0.7.dist-info}/METADATA +1 -1
- {re_common-10.0.6.dist-info → re_common-10.0.7.dist-info}/RECORD +7 -6
- {re_common-10.0.6.dist-info → re_common-10.0.7.dist-info}/LICENSE +0 -0
- {re_common-10.0.6.dist-info → re_common-10.0.7.dist-info}/WHEEL +0 -0
- {re_common-10.0.6.dist-info → re_common-10.0.7.dist-info}/top_level.txt +0 -0
|
File without changes
|
|
@@ -67,9 +67,15 @@ class StringClear(object):
|
|
|
67
67
|
return self
|
|
68
68
|
|
|
69
69
|
def replace_dash_with_space(self):
|
|
70
|
+
# 横杆转空格
|
|
70
71
|
self.obj_str = self.obj_str.replace("-", " ")
|
|
71
72
|
return self
|
|
72
73
|
|
|
74
|
+
def strip_quotes(self):
|
|
75
|
+
# 清理 双引号
|
|
76
|
+
self.obj_str = self.obj_str.replace("\"", "")
|
|
77
|
+
return self
|
|
78
|
+
|
|
73
79
|
def remove_diacritics(self):
|
|
74
80
|
# 去除音标 转换成字母
|
|
75
81
|
self.obj_str = get_diacritic_variant(self.obj_str)
|
|
@@ -110,3 +116,50 @@ def rel_clear(str_obj):
|
|
|
110
116
|
.lower() # 小写
|
|
111
117
|
.get_str() # 获取str
|
|
112
118
|
.strip()) # 去掉空格
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def clear_au_organ(str_obj):
|
|
122
|
+
"""
|
|
123
|
+
为作者机构定制的清理 与上面比除了不转小写外 还多了些特殊的清理
|
|
124
|
+
"""
|
|
125
|
+
strs = (StringClear(str_obj)
|
|
126
|
+
.None_to_str() # None 转 空字符串
|
|
127
|
+
.to_str() # 防止其他类型传入 比如 int double
|
|
128
|
+
.qj_to_bj() # 全角转半角
|
|
129
|
+
.strip_quotes() # 清理 双引号
|
|
130
|
+
.clean_symbols() # 清理已知的符号
|
|
131
|
+
.collapse_spaces() # 移除多余空格,连续多个空格变一个
|
|
132
|
+
.get_str() # 获取str
|
|
133
|
+
.strip() # 去掉空格
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
strs = strs.replace("lt正gt", "").strip() # 特殊需求
|
|
137
|
+
return strs
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def ref_clear(str_obj):
|
|
141
|
+
# 为 引文 数据定制的清理
|
|
142
|
+
strs = (StringClear(str_obj)
|
|
143
|
+
.None_to_str() # None 转 空字符串
|
|
144
|
+
.to_str() # 防止其他类型传入 比如 int double
|
|
145
|
+
.qj_to_bj() # 全角转半角
|
|
146
|
+
.strip_quotes() # 清理 双引号
|
|
147
|
+
.clean_symbols() # 清理已知的符号
|
|
148
|
+
.collapse_spaces() # 移除多余空格,连续多个空格变一个
|
|
149
|
+
.lower() # 小写
|
|
150
|
+
.get_str() # 获取str
|
|
151
|
+
.strip() # 去掉空格
|
|
152
|
+
)
|
|
153
|
+
return strs
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
def clear_obj(str_obj):
|
|
157
|
+
# 为对象化定制的清理
|
|
158
|
+
str_obj = clear_au_organ(str_obj)
|
|
159
|
+
str_obj = str_obj.replace("ß", "SS")
|
|
160
|
+
return (StringClear(str_obj)
|
|
161
|
+
.remove_diacritics() # 清理音标
|
|
162
|
+
.upper()
|
|
163
|
+
.get_str() # 获取str
|
|
164
|
+
.strip() # 去掉空格
|
|
165
|
+
)
|
|
@@ -163,6 +163,7 @@ re_common/studio/streamlitstudio/first_app.py,sha256=t7Fw8YDlub7G9q99GgVo_3sPZXU
|
|
|
163
163
|
re_common/studio/streamlitstudio/uber_pickups.py,sha256=cvrV5e8vRBM2_CpVDBE-f3V4mGFK9SqpRPZK8TEqr6U,785
|
|
164
164
|
re_common/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
165
165
|
re_common/v2/baselibrary/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
166
|
+
re_common/v2/baselibrary/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
166
167
|
re_common/v2/baselibrary/s3object/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
167
168
|
re_common/v2/baselibrary/s3object/baseboto3.py,sha256=mXuIFx99pnrPGQ4LJCZwlN1HLbaU-OWLwck0cVzW6hc,11203
|
|
168
169
|
re_common/v2/baselibrary/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -179,7 +180,7 @@ re_common/v2/baselibrary/utils/basehdfs.py,sha256=NVV5Q0OMPlM_zTrs9ZDoPJv29GQv5w
|
|
|
179
180
|
re_common/v2/baselibrary/utils/json_cls.py,sha256=dHOkWafG9lbQDoub9cbDwT2fDjMKtblQnjFLeA4hECA,286
|
|
180
181
|
re_common/v2/baselibrary/utils/n_ary_expression_tree.py,sha256=-05kO6G2Rth7CEK-5lfFrthFZ1Q0-0a7cni7mWZ-2gg,9172
|
|
181
182
|
re_common/v2/baselibrary/utils/string_bool.py,sha256=4VCr1g8pX5YnzZSKctQgQfmhSQ0aw7a8ruhWdiRmBFU,641
|
|
182
|
-
re_common/v2/baselibrary/utils/string_clear.py,sha256=
|
|
183
|
+
re_common/v2/baselibrary/utils/string_clear.py,sha256=k0QyD2FNPDpDvBd91Qhz69K81ydDpcHzHq1HSwaeG_w,5434
|
|
183
184
|
re_common/v2/baselibrary/utils/stringutils.py,sha256=GLXHAm8IulC_8hWrN2aiFQjsoOpjczvcVozmTJj86-A,3864
|
|
184
185
|
re_common/vip/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
185
186
|
re_common/vip/base_step_process.py,sha256=VXXiNj0I5CpzXIMCgOPU86bzDJkSBkUS-9CpZIl_GOk,205
|
|
@@ -207,8 +208,8 @@ re_common/vip/title/transform/TransformRegulationTitleToZt.py,sha256=LKRdIsWKues
|
|
|
207
208
|
re_common/vip/title/transform/TransformStandardTitleToZt.py,sha256=-fCKAbSBzXVyQDCE61CalvR9E_QzQMA08QOO_NePFNI,5563
|
|
208
209
|
re_common/vip/title/transform/TransformThesisTitleToZt.py,sha256=QS-uV0cQrpUFAcKucuJQ9Ue2VRQH-inmfn_X3IplfRo,5488
|
|
209
210
|
re_common/vip/title/transform/__init__.py,sha256=m83-CWyRq_VHPYHaALEQlmXrkTdrZ3e4B_kCfBYE-uc,239
|
|
210
|
-
re_common-10.0.
|
|
211
|
-
re_common-10.0.
|
|
212
|
-
re_common-10.0.
|
|
213
|
-
re_common-10.0.
|
|
214
|
-
re_common-10.0.
|
|
211
|
+
re_common-10.0.7.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
|
|
212
|
+
re_common-10.0.7.dist-info/METADATA,sha256=4WDIp2GrlSKpykFERfN59eNiEE0CgOJppUVg_wvEjHk,581
|
|
213
|
+
re_common-10.0.7.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
214
|
+
re_common-10.0.7.dist-info/top_level.txt,sha256=_H9H23zoLIalm1AIY_KYTVh_H0ZnmjxQIxsvXtLv45o,10
|
|
215
|
+
re_common-10.0.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|