feat: add PDFMathTranslate converter for PDF translation with mathematical content
- Introduced PDFMathTranslate converter to handle PDF translations while preserving mathematical formulas. - Updated Dockerfile to include necessary dependencies and pre-download models during build. - Enhanced README.md to document the new converter and its features. - Added tests for PDFMathTranslate to ensure correct functionality and error handling.
This commit is contained in:
parent
5322f85721
commit
d943771f36
7 changed files with 864 additions and 40 deletions
|
|
@ -26,6 +26,7 @@ import { convert as convertVcf, properties as propertiesVcf } from "./vcf";
|
|||
import { convert as convertxelatex, properties as propertiesxelatex } from "./xelatex";
|
||||
import { convert as convertMarkitdown, properties as propertiesMarkitdown } from "./markitdown";
|
||||
import { convert as convertMineru, properties as propertiesMineru } from "./mineru";
|
||||
import { convert as convertPDFMathTranslate, properties as propertiesPDFMathTranslate } from "./pdfmathtranslate";
|
||||
|
||||
// This should probably be reconstructed so that the functions are not imported instead the functions hook into this to make the converters more modular
|
||||
|
||||
|
|
@ -142,6 +143,10 @@ const properties: Record<
|
|||
properties: propertiesMineru,
|
||||
converter: convertMineru,
|
||||
},
|
||||
PDFMathTranslate: {
|
||||
properties: propertiesPDFMathTranslate,
|
||||
converter: convertPDFMathTranslate,
|
||||
},
|
||||
};
|
||||
|
||||
function chunks<T>(arr: T[], size: number): T[][] {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue