@xuda.io/drive_module 1.1.965 → 1.1.967

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.
Files changed (2) hide show
  1. package/index.js +3 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1724,7 +1724,7 @@ const ocr_drive_file = async function (app_id, doc) {
1724
1724
 
1725
1725
  var ocr = "";
1726
1726
  const generalConfig = { lang: "eng", oem: 1, psm: 3 };
1727
- const franc = await import("franc");
1727
+ const { franc } = await import("franc");
1728
1728
 
1729
1729
  switch (doc.mime.split("/")[0]) {
1730
1730
  case "image": {
@@ -1734,7 +1734,7 @@ const ocr_drive_file = async function (app_id, doc) {
1734
1734
  );
1735
1735
 
1736
1736
  // Detect the language from the extracted text
1737
- const detectedLang = franc.franc(initialText);
1737
+ const detectedLang = franc(initialText);
1738
1738
  const tesseractLang = detectedLang || "eng";
1739
1739
  ocr = await tesseract.recognize(target_file, tesseractLang);
1740
1740
 
@@ -1754,7 +1754,7 @@ const ocr_drive_file = async function (app_id, doc) {
1754
1754
  );
1755
1755
 
1756
1756
  // Detect the language from the extracted text
1757
- const detectedLang = franc.franc(initialText);
1757
+ const detectedLang = franc(initialText);
1758
1758
  const tesseractLang = detectedLang || "eng";
1759
1759
  ocr += await tesseract.recognize(imageData.path, tesseractLang);
1760
1760
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.965",
3
+ "version": "1.1.967",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {