Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions docs/ENGINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -1877,6 +1877,14 @@ format, and FFmpeg reads what the file holds, so a `.dat` with no video in it fa
scans and pictures with Tesseract (`Ocr/TesseractConverter.cs`), in the language the preset names
(`PdfOptions.OcrLanguage`, a Tesseract code; English by default). The built-in "Searchable PDF" preset turns it on.

Text that mixes languages (issue #1123) has several codes in that one setting, the main language first, joined with
`+` as Tesseract's `-l` takes them (`chi_sim+eng`). `OcrLanguages.Parse` is the only reader: a code not in the list is
left out, repeats count once, and with none left English is read. Settings from before this hold one code and read as
they always did; an older Filee reads a joined value as a code it doesn't know, so English. Each language is its own
download and is fetched before the file is read; a download that fails refuses the file and names that language. Every
language makes Tesseract slower (it tries the others on words the first one reads badly), so the editor's "Other
languages in the text" says to add only what the text has.

- The route planner puts an OCR edge first (`ConversionEdge.Ocr`, `RoutePlanner.Plan(ocr: true)`): picture or PDF →
searchable PDF, then the cheapest ordinary route from that PDF. A picture Tesseract can't open (HEIC, PSD, …)
becomes a PNG first. OCR edges are never part of an ordinary route.
Expand Down Expand Up @@ -1905,12 +1913,14 @@ level and the newest revision the Mac has), part of macOS, so nothing is downloa
Tesseract and is registered before it, so the route planner takes it; on Windows and Linux it is unavailable
("Not available on this platform").

- The preset's language (a Tesseract code) is mapped to Vision's identifiers (`VisionLanguages`) and asked for with
English next to it; if Vision refuses the pair it reads with the language alone. Which languages Vision reads comes
- The preset's languages (Tesseract codes) are mapped to Vision's identifiers (`VisionLanguages`) and asked for in their
order. English is added when it wasn't chosen and goes last unless it is the main language; if Vision refuses the
combination it reads with one language fewer, down to the main language alone. Which languages Vision reads comes
from the Mac itself (`supportedRecognitionLanguagesAndReturnError:`, more with newer macOS versions); a language it
doesn't read (Hindi, Nepali, Greek, …) goes to Tesseract when that is installed, and is refused otherwise with
"Apple Vision can't read this language. Install Tesseract …". The preset editor shows no download size for the
languages Vision reads, and its hint names Apple Vision.
doesn't read (Hindi, Nepali, Greek, …) goes to Tesseract when that is installed, together with the preset's other
languages, and is refused otherwise with "Apple Vision can't read this language. Install Tesseract …" and its name.
The preset editor shows no download size for the languages Vision reads, unless such a language among the chosen ones
sends them all to Tesseract, and its hint names Apple Vision.
- PDFs go page by page exactly like Tesseract's (`TesseractConverter.RecognizePdfAsync`, at most two pages at a time).
A JPEG picture goes into the PDF as it is, other pictures (and a JPEG that EXIF turns) as an upright PNG; every page
of a TIFF becomes a page. The page size comes from the picture's resolution, 300 dpi when it has none.
Expand Down
4 changes: 4 additions & 0 deletions src/Filee.App/Assets/i18n/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,10 @@
"presets.ocr_hint_macos": "يصبح نص المستندات الممسوحة والصور قابلًا للبحث والتحرير بأداة التعرّف على النص المدمجة في macOS (Apple Vision). اللغات التي لا تقرؤها تتطلب Tesseract (الإعدادات ← المحركات).\nتبقى الصفحات التي تحتوي على نص كما هي.",
"presets.ocr_language": "لغة النص",
"presets.ocr_language_size": "تنزيل {0}",
"presets.ocr_more_languages": "لغات أخرى في النص",
"presets.ocr_add_language": "إضافة لغة",
"presets.ocr_remove_language": "إزالة هذه اللغة",
"presets.ocr_languages_hint": "أضف فقط اللغات الموجودة فعلًا في النص، فكل لغة تجعل التعرّف أبطأ.",
"presets.pdf_keep_metadata": "الاحتفاظ بالبيانات الوصفية للصفحات والصور (XMP)",
"presets.watermark": "علامة مائية",
"presets.watermark_hint": "مثلًا: مسودة",
Expand Down
4 changes: 4 additions & 0 deletions src/Filee.App/Assets/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,10 @@
"presets.ocr_hint_macos": "Scans und Bilder erhalten durchsuchbaren und bearbeitbaren Text mit der Texterkennung von macOS (Apple Vision). Nicht unterstützte Sprachen benötigen Tesseract (Einstellungen → Module).\nSeiten, die bereits Text enthalten, bleiben unverändert.",
"presets.ocr_language": "Sprache des Textes",
"presets.ocr_language_size": "{0} Download",
"presets.ocr_more_languages": "Weitere Sprachen im Text",
"presets.ocr_add_language": "Sprache hinzufügen",
"presets.ocr_remove_language": "Diese Sprache entfernen",
"presets.ocr_languages_hint": "Füge nur Sprachen hinzu, die wirklich im Text vorkommen: Jede weitere macht die Erkennung langsamer.",
"presets.pdf_keep_metadata": "Seiten- und Bildmetadaten beibehalten (XMP)",
"presets.watermark": "Wasserzeichen",
"presets.watermark_hint": "z. B. ENTWURF",
Expand Down
4 changes: 4 additions & 0 deletions src/Filee.App/Assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,10 @@
"presets.ocr_hint_macos": "Scans and pictures get text you can search and edit, with macOS's own text recognition (Apple Vision). Languages it can't read need Tesseract (Settings → Engines).\nPages that already have text stay as they are.",
"presets.ocr_language": "Language of the text",
"presets.ocr_language_size": "{0} download",
"presets.ocr_more_languages": "Other languages in the text",
"presets.ocr_add_language": "Add a language",
"presets.ocr_remove_language": "Remove this language",
"presets.ocr_languages_hint": "Only add languages the text really has: each one makes recognition slower.",
"presets.pdf_keep_metadata": "Keep page and picture metadata (XMP)",
"presets.watermark": "Watermark",
"presets.watermark_hint": "e.g. DRAFT",
Expand Down
4 changes: 4 additions & 0 deletions src/Filee.App/Assets/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,10 @@
"presets.ocr_hint_macos": "Los escaneos e imágenes tendrán texto que se puede buscar y editar, con el reconocimiento de texto propio de macOS (Apple Vision). Los idiomas que no lee requieren Tesseract (Ajustes → Motores).\nLas páginas que ya tienen texto no cambian.",
"presets.ocr_language": "Idioma del texto",
"presets.ocr_language_size": "Descarga de {0}",
"presets.ocr_more_languages": "Otros idiomas del texto",
"presets.ocr_add_language": "Añadir un idioma",
"presets.ocr_remove_language": "Quitar este idioma",
"presets.ocr_languages_hint": "Añade solo los idiomas que de verdad tiene el texto: cada uno hace más lento el reconocimiento.",
"presets.pdf_keep_metadata": "Conservar metadatos de página e imagen (XMP)",
"presets.watermark": "Marca de agua",
"presets.watermark_hint": "p. ej., BORRADOR",
Expand Down
4 changes: 4 additions & 0 deletions src/Filee.App/Assets/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,10 @@
"presets.ocr_hint_macos": "Le texte des numérisations et des images devient consultable et modifiable grâce à la reconnaissance de texte intégrée à macOS (Apple Vision). Les langues qu'elle ne lit pas nécessitent Tesseract (Paramètres → Moteurs).\nLes pages qui ont déjà du texte restent telles quelles.",
"presets.ocr_language": "Langue du texte",
"presets.ocr_language_size": "Téléchargement de {0}",
"presets.ocr_more_languages": "Autres langues du texte",
"presets.ocr_add_language": "Ajouter une langue",
"presets.ocr_remove_language": "Retirer cette langue",
"presets.ocr_languages_hint": "N'ajoutez que les langues vraiment présentes dans le texte : chacune ralentit la reconnaissance.",
"presets.pdf_keep_metadata": "Conserver les métadonnées des pages et des images (XMP)",
"presets.watermark": "Filigrane",
"presets.watermark_hint": "p. ex. BROUILLON",
Expand Down
4 changes: 4 additions & 0 deletions src/Filee.App/Assets/i18n/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,10 @@
"presets.ocr_hint_macos": "macOS की अपनी टेक्स्ट पहचान (Apple Vision) से स्कैन और तस्वीरों का टेक्स्ट खोजने और बदलने योग्य बनता है। जो भाषाएँ यह नहीं पढ़ सकता, उनके लिए Tesseract चाहिए (सेटिंग्स → इंजन)।\nजिन पेजों में पहले से टेक्स्ट है वे वैसे ही रहते हैं।",
"presets.ocr_language": "टेक्स्ट की भाषा",
"presets.ocr_language_size": "{0} डाउनलोड",
"presets.ocr_more_languages": "टेक्स्ट की अन्य भाषाएँ",
"presets.ocr_add_language": "भाषा जोड़ें",
"presets.ocr_remove_language": "यह भाषा हटाएँ",
"presets.ocr_languages_hint": "सिर्फ़ वही भाषाएँ जोड़ें जो टेक्स्ट में सच में हैं: हर भाषा से पहचान धीमी होती है।",
"presets.pdf_keep_metadata": "पेज और तस्वीर का मेटाडेटा (XMP) रखें",
"presets.watermark": "वॉटरमार्क",
"presets.watermark_hint": "जैसे: ड्राफ्ट",
Expand Down
4 changes: 4 additions & 0 deletions src/Filee.App/Assets/i18n/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,10 @@
"presets.ocr_hint_macos": "Hasil pindai dan gambar mendapatkan teks yang dapat dicari dan disalin dengan pengenal teks bawaan macOS (Apple Vision). Bahasa yang tidak didukungnya memerlukan Tesseract (Pengaturan → Engine).\nHalaman yang sudah memiliki teks dibiarkan apa adanya.",
"presets.ocr_language": "Bahasa teks",
"presets.ocr_language_size": "Unduhan {0}",
"presets.ocr_more_languages": "Bahasa lain dalam teks",
"presets.ocr_add_language": "Tambah bahasa",
"presets.ocr_remove_language": "Hapus bahasa ini",
"presets.ocr_languages_hint": "Tambahkan hanya bahasa yang benar-benar ada dalam teks: setiap bahasa membuat pengenalan lebih lambat.",
"presets.pdf_keep_metadata": "Pertahankan metadata halaman dan gambar (XMP)",
"presets.watermark": "Tanda air (watermark)",
"presets.watermark_hint": "contoh: DRAF",
Expand Down
4 changes: 4 additions & 0 deletions src/Filee.App/Assets/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,10 @@
"presets.ocr_hint_macos": "Scansioni e immagini ottengono testo ricercabile e modificabile, con il riconoscimento testo di macOS (Apple Vision). Le lingue che non riesce a leggere richiedono Tesseract (Impostazioni → Motori).\nLe pagine che hanno già testo restano come sono.",
"presets.ocr_language": "Lingua del testo",
"presets.ocr_language_size": "Download di {0}",
"presets.ocr_more_languages": "Altre lingue nel testo",
"presets.ocr_add_language": "Aggiungi una lingua",
"presets.ocr_remove_language": "Rimuovi questa lingua",
"presets.ocr_languages_hint": "Aggiungi solo le lingue davvero presenti nel testo: ognuna rallenta il riconoscimento.",
"presets.pdf_keep_metadata": "Mantieni i metadati di pagine e immagini (XMP)",
"presets.watermark": "Filigrana",
"presets.watermark_hint": "ad es. BOZZA",
Expand Down
4 changes: 4 additions & 0 deletions src/Filee.App/Assets/i18n/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,10 @@
"presets.ocr_hint_macos": "スキャンや画像の文字を、macOS 標準の文字認識(Apple Vision)で検索・編集できるようにします。読めない言語には Tesseract が必要です(「設定」→「変換エンジン」)。\nすでにテキストがあるページはそのままです。",
"presets.ocr_language": "テキストの言語",
"presets.ocr_language_size": "{0} をダウンロード",
"presets.ocr_more_languages": "テキストに含まれる他の言語",
"presets.ocr_add_language": "言語を追加",
"presets.ocr_remove_language": "この言語を削除",
"presets.ocr_languages_hint": "テキストに実際に含まれる言語だけを追加してください。言語が増えるほど認識に時間がかかります。",
"presets.pdf_keep_metadata": "ページと画像のメタデータ(XMP)を保持",
"presets.watermark": "透かし",
"presets.watermark_hint": "例:下書き",
Expand Down
4 changes: 4 additions & 0 deletions src/Filee.App/Assets/i18n/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,10 @@
"presets.ocr_hint_macos": "스캔본과 사진의 글자를 macOS에 들어 있는 문자 인식(Apple Vision)으로 검색하고 편집할 수 있게 돼요. Apple Vision이 못 읽는 언어는 Tesseract가 필요해요(설정 → 변환 엔진).\n이미 텍스트가 있는 페이지는 그대로 둬요.",
"presets.ocr_language": "텍스트 언어",
"presets.ocr_language_size": "{0} 내려받기",
"presets.ocr_more_languages": "텍스트에 함께 있는 다른 언어",
"presets.ocr_add_language": "언어 추가",
"presets.ocr_remove_language": "이 언어 빼기",
"presets.ocr_languages_hint": "텍스트에 실제로 있는 언어만 추가해 주세요. 언어가 많을수록 인식이 느려져요.",
"presets.pdf_keep_metadata": "페이지·이미지 메타데이터(XMP) 유지",
"presets.watermark": "워터마크",
"presets.watermark_hint": "예: 초안",
Expand Down
4 changes: 4 additions & 0 deletions src/Filee.App/Assets/i18n/ne.json
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,10 @@
"presets.ocr_hint_macos": "macOS को आफ्नै पाठ पहिचान (Apple Vision) ले स्क्यान र तस्बिरको पाठ खोज्न र सम्पादन गर्न मिल्ने हुन्छ। यसले पढ्न नसक्ने भाषाका लागि Tesseract चाहिन्छ (सेटिङहरू → इन्जिनहरू)।\nपहिले नै पाठ भएका पृष्ठ जस्ताको तस्तै रहन्छन्।",
"presets.ocr_language": "पाठको भाषा",
"presets.ocr_language_size": "{0} डाउनलोड",
"presets.ocr_more_languages": "पाठका अन्य भाषाहरू",
"presets.ocr_add_language": "भाषा थप्नुहोस्",
"presets.ocr_remove_language": "यो भाषा हटाउनुहोस्",
"presets.ocr_languages_hint": "पाठमा साँच्चै भएका भाषा मात्र थप्नुहोस्: हरेक भाषाले पहिचान ढिलो बनाउँछ।",
"presets.pdf_keep_metadata": "पृष्ठ र तस्बिरको मेटाडाटा (XMP) राख्नुहोस्",
"presets.watermark": "वाटरमार्क",
"presets.watermark_hint": "जस्तै: मस्यौदा",
Expand Down
4 changes: 4 additions & 0 deletions src/Filee.App/Assets/i18n/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,10 @@
"presets.ocr_hint_macos": "Tekst skanów i obrazów da się przeszukiwać i edytować dzięki wbudowanemu rozpoznawaniu tekstu macOS (Apple Vision). Języki, których nie czyta, wymagają Tesseract (Ustawienia → Silniki).\nStrony, które mają już tekst, pozostają bez zmian.",
"presets.ocr_language": "Język tekstu",
"presets.ocr_language_size": "Pobieranie {0}",
"presets.ocr_more_languages": "Inne języki w tekście",
"presets.ocr_add_language": "Dodaj język",
"presets.ocr_remove_language": "Usuń ten język",
"presets.ocr_languages_hint": "Dodawaj tylko języki, które naprawdę są w tekście: każdy kolejny spowalnia rozpoznawanie.",
"presets.pdf_keep_metadata": "Zachowaj metadane stron i obrazów (XMP)",
"presets.watermark": "Znak wodny",
"presets.watermark_hint": "np. SZKIC",
Expand Down
4 changes: 4 additions & 0 deletions src/Filee.App/Assets/i18n/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,10 @@
"presets.ocr_hint_macos": "Digitalizações e imagens ganham texto que pode ser pesquisado e editado, com o reconhecimento de texto do próprio macOS (Apple Vision). Idiomas que ele não lê precisam do Tesseract (Configurações → Motores).\nPáginas que já têm texto ficam como estão.",
"presets.ocr_language": "Idioma do texto",
"presets.ocr_language_size": "Download de {0}",
"presets.ocr_more_languages": "Outros idiomas no texto",
"presets.ocr_add_language": "Adicionar um idioma",
"presets.ocr_remove_language": "Remover este idioma",
"presets.ocr_languages_hint": "Adicione só os idiomas que o texto realmente tem: cada um deixa o reconhecimento mais lento.",
"presets.pdf_keep_metadata": "Manter metadados de página e imagem (XMP)",
"presets.watermark": "Marca d'água",
"presets.watermark_hint": "ex.: RASCUNHO",
Expand Down
4 changes: 4 additions & 0 deletions src/Filee.App/Assets/i18n/pt-PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,10 @@
"presets.ocr_hint_macos": "As digitalizações e imagens passam a ter texto que podes pesquisar e editar, com o reconhecimento de texto do macOS (Apple Vision). Os idiomas que não consegue ler requerem o Tesseract (Definições → Motores).\nAs páginas que já têm texto mantêm-se.",
"presets.ocr_language": "Idioma do texto",
"presets.ocr_language_size": "Transferência de {0}",
"presets.ocr_more_languages": "Outros idiomas no texto",
"presets.ocr_add_language": "Adicionar um idioma",
"presets.ocr_remove_language": "Remover este idioma",
"presets.ocr_languages_hint": "Adiciona só os idiomas que o texto tem mesmo: cada um torna o reconhecimento mais lento.",
"presets.pdf_keep_metadata": "Manter metadados de páginas e imagens (XMP)",
"presets.watermark": "Marca de água",
"presets.watermark_hint": "Por exemplo, RASCUNHO",
Expand Down
4 changes: 4 additions & 0 deletions src/Filee.App/Assets/i18n/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,10 @@
"presets.ocr_hint_macos": "Текст сканов и изображений можно будет искать и редактировать с помощью встроенного в macOS распознавания текста (Apple Vision). Для языков, которые оно не читает, нужен Tesseract (Настройки → Движки).\nСтраницы, где уже есть текст, не меняются.",
"presets.ocr_language": "Язык текста",
"presets.ocr_language_size": "Загрузка {0}",
"presets.ocr_more_languages": "Другие языки в тексте",
"presets.ocr_add_language": "Добавить язык",
"presets.ocr_remove_language": "Убрать этот язык",
"presets.ocr_languages_hint": "Добавляйте только языки, которые действительно есть в тексте: каждый новый замедляет распознавание.",
"presets.pdf_keep_metadata": "Сохранять метаданные страниц и картинок (XMP)",
"presets.watermark": "Водяной знак",
"presets.watermark_hint": "например, ЧЕРНОВИК",
Expand Down
4 changes: 4 additions & 0 deletions src/Filee.App/Assets/i18n/th.json
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,10 @@
"presets.ocr_hint_macos": "ข้อความในภาพสแกนและรูปภาพจะค้นหาและแก้ไขได้ด้วยระบบรู้จำข้อความในตัวของ macOS (Apple Vision) ภาษาที่อ่านไม่ได้ต้องใช้ Tesseract (การตั้งค่า → เครื่องมือแปลงไฟล์)\nหน้าที่มีข้อความอยู่แล้วจะคงไว้ตามเดิม",
"presets.ocr_language": "ภาษาของข้อความ",
"presets.ocr_language_size": "ดาวน์โหลด {0}",
"presets.ocr_more_languages": "ภาษาอื่นในข้อความ",
"presets.ocr_add_language": "เพิ่มภาษา",
"presets.ocr_remove_language": "เอาภาษานี้ออก",
"presets.ocr_languages_hint": "เพิ่มเฉพาะภาษาที่มีอยู่ในข้อความจริง ๆ เพราะทุกภาษาที่เพิ่มจะทำให้การรู้จำช้าลง",
"presets.pdf_keep_metadata": "คงเมทาดาตาของหน้าและรูปภาพ (XMP)",
"presets.watermark": "ลายน้ำ",
"presets.watermark_hint": "เช่น ฉบับร่าง",
Expand Down
Loading
Loading