GameSentenceMiner 2.12.5__py3-none-any.whl → 2.12.6.dev0__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.
- GameSentenceMiner/ocr/owocr_helper.py +5 -2
- {gamesentenceminer-2.12.5.dist-info → gamesentenceminer-2.12.6.dev0.dist-info}/METADATA +1 -1
- {gamesentenceminer-2.12.5.dist-info → gamesentenceminer-2.12.6.dev0.dist-info}/RECORD +7 -7
- {gamesentenceminer-2.12.5.dist-info → gamesentenceminer-2.12.6.dev0.dist-info}/WHEEL +0 -0
- {gamesentenceminer-2.12.5.dist-info → gamesentenceminer-2.12.6.dev0.dist-info}/entry_points.txt +0 -0
- {gamesentenceminer-2.12.5.dist-info → gamesentenceminer-2.12.6.dev0.dist-info}/licenses/LICENSE +0 -0
- {gamesentenceminer-2.12.5.dist-info → gamesentenceminer-2.12.6.dev0.dist-info}/top_level.txt +0 -0
@@ -194,6 +194,7 @@ def compare_ocr_results(prev_text, new_text, threshold=90):
|
|
194
194
|
all_cords = None
|
195
195
|
rectangles = None
|
196
196
|
last_ocr2_result = []
|
197
|
+
last_sent_result = ""
|
197
198
|
|
198
199
|
def do_second_ocr(ocr1_text, time, img, filtering, pre_crop_image=None, ignore_furigana_filter=False, ignore_previous_result=False):
|
199
200
|
global twopassocr, ocr2, last_ocr2_result
|
@@ -201,12 +202,13 @@ def do_second_ocr(ocr1_text, time, img, filtering, pre_crop_image=None, ignore_f
|
|
201
202
|
orig_text, text = run.process_and_write_results(img, None, last_ocr2_result if not ignore_previous_result else None, filtering, None,
|
202
203
|
engine=get_ocr_ocr2(), furigana_filter_sensitivity=furigana_filter_sensitivity if not ignore_furigana_filter else 0)
|
203
204
|
|
204
|
-
if compare_ocr_results(
|
205
|
+
if compare_ocr_results(last_sent_result, text, threshold=80):
|
205
206
|
if text:
|
206
207
|
logger.info("Seems like Text we already sent, not doing anything.")
|
207
208
|
return
|
208
209
|
save_result_image(img, pre_crop_image=pre_crop_image)
|
209
210
|
last_ocr2_result = orig_text
|
211
|
+
last_sent_result = text
|
210
212
|
asyncio.run(send_result(text, time))
|
211
213
|
except json.JSONDecodeError:
|
212
214
|
print("Invalid JSON received.")
|
@@ -304,12 +306,13 @@ def text_callback(text, orig_text, time, img=None, came_from_ss=False, filtering
|
|
304
306
|
line_start_time = time if time else datetime.now()
|
305
307
|
|
306
308
|
if manual or not get_ocr_two_pass_ocr():
|
307
|
-
if compare_ocr_results(
|
309
|
+
if compare_ocr_results(last_sent_result, text, 80):
|
308
310
|
if text:
|
309
311
|
logger.info("Seems like Text we already sent, not doing anything.")
|
310
312
|
return
|
311
313
|
save_result_image(img)
|
312
314
|
asyncio.run(send_result(text, line_start_time))
|
315
|
+
last_sent_result = text
|
313
316
|
previous_orig_text = orig_text_string
|
314
317
|
previous_text = None
|
315
318
|
previous_img = None
|
@@ -19,7 +19,7 @@ GameSentenceMiner/ocr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
19
19
|
GameSentenceMiner/ocr/gsm_ocr_config.py,sha256=Ezj-0k6Wo-una91FvYhMp6KGkRhWYihXzLAoh_Wu2xY,5329
|
20
20
|
GameSentenceMiner/ocr/ocrconfig.py,sha256=_tY8mjnzHMJrLS8E5pHqYXZjMuLoGKYgJwdhYgN-ny4,6466
|
21
21
|
GameSentenceMiner/ocr/owocr_area_selector.py,sha256=O8qKOTDglk-D4N-2_ORLeZacXT-OVOCNxUI8sQHAlx4,25538
|
22
|
-
GameSentenceMiner/ocr/owocr_helper.py,sha256=
|
22
|
+
GameSentenceMiner/ocr/owocr_helper.py,sha256=Dd5WtgyQUfQAnflPLo6C6XxzMKKEVNgziy5QCgwpwWw,25391
|
23
23
|
GameSentenceMiner/ocr/ss_picker.py,sha256=0IhxUdaKruFpZyBL-8SpxWg7bPrlGpy3lhTcMMZ5rwo,5224
|
24
24
|
GameSentenceMiner/owocr/owocr/__init__.py,sha256=87hfN5u_PbL_onLfMACbc0F5j4KyIK9lKnRCj6oZgR0,49
|
25
25
|
GameSentenceMiner/owocr/owocr/__main__.py,sha256=XQaqZY99EKoCpU-gWQjNbTs7Kg17HvBVE7JY8LqIE0o,157
|
@@ -64,9 +64,9 @@ GameSentenceMiner/web/templates/index.html,sha256=Gv3CJvNnhAzIVV_QxhNq4OD-pXDt1v
|
|
64
64
|
GameSentenceMiner/web/templates/text_replacements.html,sha256=tV5c8mCaWSt_vKuUpbdbLAzXZ3ATZeDvQ9PnnAfqY0M,8598
|
65
65
|
GameSentenceMiner/web/templates/utility.html,sha256=3flZinKNqUJ7pvrZk6xu__v67z44rXnaK7UTZ303R-8,16946
|
66
66
|
GameSentenceMiner/wip/get_overlay_coords.py,sha256=yivn8C26BBRK4cjE7yPv1XfvbyqWC0itLL9Vay8aY-c,19780
|
67
|
-
gamesentenceminer-2.12.
|
68
|
-
gamesentenceminer-2.12.
|
69
|
-
gamesentenceminer-2.12.
|
70
|
-
gamesentenceminer-2.12.
|
71
|
-
gamesentenceminer-2.12.
|
72
|
-
gamesentenceminer-2.12.
|
67
|
+
gamesentenceminer-2.12.6.dev0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
68
|
+
gamesentenceminer-2.12.6.dev0.dist-info/METADATA,sha256=U_kd54nTtK8b38F9eo8JsOhn3_2fIbIFOQzjZSVHOPg,7066
|
69
|
+
gamesentenceminer-2.12.6.dev0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
70
|
+
gamesentenceminer-2.12.6.dev0.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
|
71
|
+
gamesentenceminer-2.12.6.dev0.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
|
72
|
+
gamesentenceminer-2.12.6.dev0.dist-info/RECORD,,
|
File without changes
|
{gamesentenceminer-2.12.5.dist-info → gamesentenceminer-2.12.6.dev0.dist-info}/entry_points.txt
RENAMED
File without changes
|
{gamesentenceminer-2.12.5.dist-info → gamesentenceminer-2.12.6.dev0.dist-info}/licenses/LICENSE
RENAMED
File without changes
|
{gamesentenceminer-2.12.5.dist-info → gamesentenceminer-2.12.6.dev0.dist-info}/top_level.txt
RENAMED
File without changes
|