GameSentenceMiner 2.14.2__py3-none-any.whl → 2.14.4__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.
@@ -29,7 +29,8 @@ Translate ONLY the single line of game dialogue specified below into natural-sou
29
29
  **Output Requirements:**
30
30
  - Provide only the single, best {get_config().general.get_native_language_name()} translation.
31
31
  - Use expletives if they are natural for the context and enhance the translation's impact, but do not over-exaggerate.
32
- - Preserve all HTML tags present in the original text on their corresponding words in the translation.
32
+ - Carryover all HTML tags present in the original text to HTML tags surrounding their corresponding words in the translation. DO NOT CONVERT TO MARKDOWN.
33
+ - Maintain New Line Characters.
33
34
  - Do not include notes, alternatives, explanations, or any other surrounding text. Absolutely nothing but the translated line.
34
35
 
35
36
  **Line to Translate:**
@@ -166,7 +167,7 @@ class OpenAIManager(AIManager):
166
167
  ],
167
168
  temperature=0.3,
168
169
  max_tokens=4096,
169
- top_p=1,
170
+ top_p=0.9,
170
171
  n=1,
171
172
  stop=None,
172
173
  )
@@ -196,7 +197,7 @@ class GeminiAI(AIManager):
196
197
  self.generation_config = types.GenerateContentConfig(
197
198
  temperature=0.5,
198
199
  max_output_tokens=1024,
199
- top_p=1,
200
+ top_p=0.9,
200
201
  stop_sequences=None,
201
202
  safety_settings=[
202
203
  types.SafetySetting(category=types.HarmCategory.HARM_CATEGORY_HARASSMENT, threshold=types.HarmBlockThreshold.BLOCK_NONE),
@@ -297,7 +298,7 @@ ai_managers: dict[str, AIManager] = {}
297
298
  ai_manager: AIManager | None = None
298
299
  current_ai_config: Ai | None = None
299
300
 
300
- def get_ai_prompt_result(lines: List[GameLine], sentence: str, current_line: GameLine, game_title: str = "", force_refresh: bool = False) -> str:
301
+ def get_ai_prompt_result(lines: List[GameLine], sentence: str, current_line: GameLine, game_title: str = "", force_refresh: bool = False, start_index = -1, end_index = -1) -> str:
301
302
  global ai_manager, current_ai_config
302
303
  try:
303
304
  is_local_provider = get_config().ai.provider == AIType.OPENAI.value
@@ -368,6 +368,23 @@ class ScreenSelector:
368
368
  # Lower the rectangle so it's behind the text
369
369
  canvas.tag_lower(self.instructions_rect, self.instructions_overlay)
370
370
 
371
+ # Add hover effect: make rectangle transparent on mouse over
372
+ def on_motion(event):
373
+ # Check if mouse is over the rectangle
374
+ x, y = event.x, event.y
375
+ rect_bbox = canvas.bbox(self.instructions_rect)
376
+ if rect_bbox and rect_bbox[0] <= x <= rect_bbox[2] and rect_bbox[1] <= y <= y <= rect_bbox[3]:
377
+ # Set fill to more transparent using denser stipple
378
+ canvas.itemconfigure(self.instructions_rect, fill='#2B2B2B', stipple='gray12')
379
+ # Make text more transparent by changing its color to a lighter gray
380
+ canvas.itemconfigure(self.instructions_overlay, fill='#CCCCCC')
381
+ else:
382
+ # Restore solid fill and opaque text
383
+ canvas.itemconfigure(self.instructions_rect, fill='#2B2B2B', stipple='')
384
+ canvas.itemconfigure(self.instructions_overlay, fill='white')
385
+
386
+ canvas.bind('<Motion>', on_motion)
387
+
371
388
 
372
389
  def toggle_instructions(self, event=None):
373
390
  canvas = event.widget.winfo_toplevel().winfo_children()[0]
@@ -439,6 +439,7 @@ class GoogleLens:
439
439
 
440
440
  if skipped:
441
441
  logger.info(f"Skipped {len(skipped)} chars due to furigana filter sensitivity: {furigana_filter_sensitivity}")
442
+ logger.debug(f"Skipped chars: {''.join(skipped)}")
442
443
 
443
444
  # img.close()
444
445
  return x
@@ -8,7 +8,8 @@ from PIL import Image
8
8
  from typing import Dict, Any, List, Tuple
9
9
 
10
10
  # Local application imports
11
- from GameSentenceMiner.util.configuration import get_config
11
+ from GameSentenceMiner.ocr.gsm_ocr_config import set_dpi_awareness
12
+ from GameSentenceMiner.util.configuration import get_config, is_windows
12
13
  from GameSentenceMiner.util.electron_config import get_ocr_language
13
14
  from GameSentenceMiner.obs import get_screenshot_PIL, logger
14
15
  from GameSentenceMiner.web.texthooking_page import send_word_coordinates_to_overlay
@@ -61,6 +62,9 @@ class OverlayProcessor:
61
62
  self.ready = True
62
63
  else:
63
64
  logger.warning("OCR dependencies not found or websocket port not configured. OCR functionality will be disabled.")
65
+
66
+ if is_windows:
67
+ set_dpi_awareness()
64
68
 
65
69
  if not mss:
66
70
  logger.warning("MSS library not found. Screenshot functionality may be limited.")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: GameSentenceMiner
3
- Version: 2.14.2
3
+ Version: 2.14.4
4
4
  Summary: A tool for mining sentences from games. Update: Overlay?
5
5
  Author-email: Beangate <bpwhelan95@gmail.com>
6
6
  License: MIT License
@@ -6,7 +6,7 @@ GameSentenceMiner/gsm.py,sha256=GdqegZnKrTMVRvp43bK7oNlWj5OxLx2PNdVWyHL9Gc4,2828
6
6
  GameSentenceMiner/obs.py,sha256=LfczcmAF1G2-L7HxFAJJ-0rlCMy29WN2YUuDbeATP1g,18845
7
7
  GameSentenceMiner/vad.py,sha256=zFReBMvNEEaQ_YEozCTCaMdV-o40FwtlxYRb17cYZio,19125
8
8
  GameSentenceMiner/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- GameSentenceMiner/ai/ai_prompting.py,sha256=gNNDkoXVjWU8-is1CVI08ir2Jo_DpGvCWkV8TLl74Gg,23375
9
+ GameSentenceMiner/ai/ai_prompting.py,sha256=_pnL8I3L5riRJEsDxI8SYPZHlLybCug-E6Kr5vRrDfM,23496
10
10
  GameSentenceMiner/assets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  GameSentenceMiner/assets/icon.png,sha256=9GRL8uXUAgkUSlvbm9Pv9o2poFVRGdW6s2ub_DeUD9M,937624
12
12
  GameSentenceMiner/assets/icon128.png,sha256=l90j7biwdz5ahwOd5wZ-406ryEV9Pan93dquJQ3e1CI,18395
@@ -21,14 +21,14 @@ GameSentenceMiner/locales/zh_cn.json,sha256=tx9Szm6KEMn_YaYDWS1ph4pGALYR3iguVru2
21
21
  GameSentenceMiner/ocr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
22
  GameSentenceMiner/ocr/gsm_ocr_config.py,sha256=1cuFYT2LN_A2WjCqm2FsiHqM93EG2zIbB4ZWxps829Y,5791
23
23
  GameSentenceMiner/ocr/ocrconfig.py,sha256=_tY8mjnzHMJrLS8E5pHqYXZjMuLoGKYgJwdhYgN-ny4,6466
24
- GameSentenceMiner/ocr/owocr_area_selector.py,sha256=Y505tm7KT18flaIyFUe5DfBcBo99e9P3nQDgF4NTmbI,28209
24
+ GameSentenceMiner/ocr/owocr_area_selector.py,sha256=Rm1_nuZotJhfOfoJ_3mesh9udtOBjYqKhnAvSief6fo,29181
25
25
  GameSentenceMiner/ocr/owocr_helper.py,sha256=SkiAcyVDTQYo9Jvr0g1iy7L_xbqEL4oiovQJfz0hWnI,27874
26
26
  GameSentenceMiner/ocr/ss_picker.py,sha256=0IhxUdaKruFpZyBL-8SpxWg7bPrlGpy3lhTcMMZ5rwo,5224
27
27
  GameSentenceMiner/owocr/owocr/__init__.py,sha256=87hfN5u_PbL_onLfMACbc0F5j4KyIK9lKnRCj6oZgR0,49
28
28
  GameSentenceMiner/owocr/owocr/__main__.py,sha256=XQaqZY99EKoCpU-gWQjNbTs7Kg17HvBVE7JY8LqIE0o,157
29
29
  GameSentenceMiner/owocr/owocr/config.py,sha256=qM7kISHdUhuygGXOxmgU6Ef2nwBShrZtdqu4InDCViE,8103
30
30
  GameSentenceMiner/owocr/owocr/lens_betterproto.py,sha256=oNoISsPilVVRBBPVDtb4-roJtAhp8ZAuFTci3TGXtMc,39141
31
- GameSentenceMiner/owocr/owocr/ocr.py,sha256=8DDmWC-_49I1q9uExDp2ognM7GeL6E5OYokeFDe4zFw,69070
31
+ GameSentenceMiner/owocr/owocr/ocr.py,sha256=besWaJanvUk_fHOn-y8jN9dw8IZEPvfL9oiTX9sDzek,69134
32
32
  GameSentenceMiner/owocr/owocr/run.py,sha256=TSSZnHO_sPoTtUCsDol-v4TWPPzz_Nbf24TeBUea5I4,68498
33
33
  GameSentenceMiner/owocr/owocr/screen_coordinate_picker.py,sha256=Na6XStbQBtpQUSdbN3QhEswtKuU1JjReFk_K8t5ezQE,3395
34
34
  GameSentenceMiner/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -40,7 +40,7 @@ GameSentenceMiner/util/configuration.py,sha256=SODstU9nrRRAmbPrubYHJuGzzuKXURNUE
40
40
  GameSentenceMiner/util/db.py,sha256=2bO0rD4i8A1hhsRBER-wgZy9IK17ibRbI8DHxdKvYsI,16598
41
41
  GameSentenceMiner/util/electron_config.py,sha256=9CA27nzEFlxezzDqOPHxeD4BdJ093AnSJ9DJTcwWPsM,8762
42
42
  GameSentenceMiner/util/ffmpeg.py,sha256=iqsdp3TbBv6KMACJxkUF3e5VWak3jHPZdIEMrUdKFtE,23073
43
- GameSentenceMiner/util/get_overlay_coords.py,sha256=Y9qSJP-XX9xNxSAceZWm9hMPKs-DxiXWaGL2jBvVRK4,13082
43
+ GameSentenceMiner/util/get_overlay_coords.py,sha256=h4ofCy16bWqs7omgPqqFi7EeYMkDO8gvePULoWTGiZE,13237
44
44
  GameSentenceMiner/util/gsm_utils.py,sha256=Piwv88Q9av2LBeN7M6QDi0Mp0_R2lNbkcI6ekK5hd2o,11851
45
45
  GameSentenceMiner/util/model.py,sha256=R-_RYTYLSDNgBoVTPuPBcIHeOznIqi_vBzQ7VQ20WYk,6727
46
46
  GameSentenceMiner/util/notification.py,sha256=-qk3kTKEERzmMxx5XMh084HCyFmbfqz0XjY1hTKhCeQ,4202
@@ -69,9 +69,9 @@ GameSentenceMiner/web/templates/index.html,sha256=Gv3CJvNnhAzIVV_QxhNq4OD-pXDt1v
69
69
  GameSentenceMiner/web/templates/text_replacements.html,sha256=tV5c8mCaWSt_vKuUpbdbLAzXZ3ATZeDvQ9PnnAfqY0M,8598
70
70
  GameSentenceMiner/web/templates/utility.html,sha256=3flZinKNqUJ7pvrZk6xu__v67z44rXnaK7UTZ303R-8,16946
71
71
  GameSentenceMiner/wip/__init___.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
72
- gamesentenceminer-2.14.2.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
73
- gamesentenceminer-2.14.2.dist-info/METADATA,sha256=DS-YKKmYLeaYEE3BNMwUB6lTbjYtr0g4qhSG41X_NyA,1564
74
- gamesentenceminer-2.14.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
75
- gamesentenceminer-2.14.2.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
76
- gamesentenceminer-2.14.2.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
77
- gamesentenceminer-2.14.2.dist-info/RECORD,,
72
+ gamesentenceminer-2.14.4.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
73
+ gamesentenceminer-2.14.4.dist-info/METADATA,sha256=Vid-_Q_V7pwU3alwIjmzsi4uYuTY1ydqx5V_w4XjOt8,1564
74
+ gamesentenceminer-2.14.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
75
+ gamesentenceminer-2.14.4.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
76
+ gamesentenceminer-2.14.4.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
77
+ gamesentenceminer-2.14.4.dist-info/RECORD,,