Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为插件“批量翻译PDF文档(NOUGAT)”添加图片匹配功能(高级参数开启) #1623

Closed
wants to merge 56 commits into from

Conversation

Menghuan1918
Copy link
Contributor

通过高级参数可以尝试让程序对NOUGAT OCR后的结果匹配图片到文章中,对pdf图片周围的文本块与NOUGAT识别后的文本进行模糊匹配进行定位,将图片以md形式加回文章中。效果如下:

  • 单列文章:

2

  • 双列文章:

屏幕截图_20240311_234314

  • 非学术文章:

屏幕截图_20240311_231059

缺点:

  • 一些模型会把图片参数吃了(即英文原文有图像参数,但翻译版本没有),例如GPT-3.5-turbo (甚至glm-3表现都比它表现好一点) ,提示词需要改进

  • 对于一些pdf的图片识别效果并不是很好

  • NOUGAT识别的结果有问题导致图片位置不对

Kilig947 and others added 30 commits January 29, 2024 11:01
* 适配 google gemini 优化为从用户input中提取文件

* 适配最新的智谱SDK、支持glm-4v

* requirements.txt fix

* pending history check

---------

Co-authored-by: binary-husky <qingxu.fu@outlook.com>
…binary-husky#1520)

* Update crazy_functional.py with new functionality deal with PDF

* Update crazy_functional.py and Mermaid.py for plugin_kwargs

* Update crazy_functional.py with new chart type: mind map

* Update SELECT_PROMPT and i_say_show_user messages

* Update ArgsReminder message in get_crazy_functions() function

* Update with read md file and update PROMPTS

* Return the PROMPTS as the test found that the initial version worked best

* Update Mermaid chart generation function

* version 3.71

* 解决issues binary-husky#1510

* Remove unnecessary text from sys_prompt in 解析历史输入 function

* Remove sys_prompt message in 解析历史输入 function

* Update bridge_all.py: supports gpt-4-turbo-preview (binary-husky#1517)

* Update bridge_all.py: supports gpt-4-turbo-preview

supports gpt-4-turbo-preview

* Update bridge_all.py

---------

Co-authored-by: binary-husky <96192199+binary-husky@users.noreply.github.com>

* Update config.py: supports gpt-4-turbo-preview (binary-husky#1516)

* Update config.py: supports gpt-4-turbo-preview

supports gpt-4-turbo-preview

* Update config.py

---------

Co-authored-by: binary-husky <96192199+binary-husky@users.noreply.github.com>

* Refactor 解析历史输入 function to handle file input

* Update Mermaid chart generation functionality

* rename files and functions

---------

Co-authored-by: binary-husky <qingxu.fu@outlook.com>
Co-authored-by: hongyi-zhao <hongyi.zhao@gmail.com>
Co-authored-by: binary-husky <96192199+binary-husky@users.noreply.github.com>
* Update Latex输出PDF结果.py

借助mathpix实现了PDF翻译中文并重新编译PDF

* Update config.py

add mathpix appid & appkey

* Add 'PDF翻译中文并重新编译PDF' feature to plugins.

---------

Co-authored-by: binary-husky <96192199+binary-husky@users.noreply.github.com>
function_plugins dictionary
* 支持mermaid 滚动放大缩小重置,鼠标滚动和拖拽

* 微调未果 先stage一下

* update

---------

Co-authored-by: binary-husky <qingxu.fu@outlook.com>
Co-authored-by: binary-husky <96192199+binary-husky@users.noreply.github.com>
@binary-husky binary-husky deleted the branch binary-husky:frontier April 30, 2024 12:37
@binary-husky binary-husky reopened this Apr 30, 2024
@Menghuan1918 Menghuan1918 deleted the branch binary-husky:frontier May 9, 2024 03:10
@Menghuan1918 Menghuan1918 deleted the frontier branch May 9, 2024 03:10
@Menghuan1918 Menghuan1918 restored the frontier branch May 9, 2024 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants