Browse Source

feat: gui tencent

Byaidu 1 year ago
parent
commit
15872056bf
2 changed files with 2 additions and 1 deletions
  1. 1 1
      pdf2zh/converter.py
  2. 1 0
      pdf2zh/gui.py

+ 1 - 1
pdf2zh/converter.py

@@ -213,7 +213,7 @@ class TranslateConverter(PDFConverterEx):
                 if (                                                                                        # 判定当前字符是否属于公式
                     cls == 0                                                                                # 1. 类别为保留区域
                     or (cls == xt_cls and len(sstk[-1].strip()) > 1 and child.size < pstk[-1].size * 0.79)  # 2. 角标字体,有 0.76 的角标和 0.799 的大写,这里用 0.79 取中,同时考虑首字母放大的情况
-                    or vflag(child.fontname, child.get_text())                                                    # 3. 公式字体
+                    or vflag(child.fontname, child.get_text())                                              # 3. 公式字体
                     or (child.matrix[0] == 0 and child.matrix[3] == 0)                                      # 4. 垂直字体
                 ):
                     cur_v = True

+ 1 - 0
pdf2zh/gui.py

@@ -18,6 +18,7 @@ service_map = {
     "Ollama": "ollama",
     "OpenAI": "openai",
     "Azure": "azure",
+    "Tencent": "tencent",
 }
 lang_map = {
     "Chinese": "zh",