среда, 9 ноября 2011 г.

Локализация

Русская локализация уже включена в версию 0.9, которую я сегодня установил. Мой корявый перевод её вряд ли сильно украсит, но может быть эта самая корявость кого-то подвигнет что-то исправить. Ещё несколько замечаний по переводу:
  1. Я не знаю как переводится термин Stage Folder в контексте Mayan, но предполагаю, что это папка, куда автоматически выгружается сканы документа, в связи с чем я использую как перевод слово "транспортный" т.е. "транспортная папка" и "транспортный файл"
  2. Стараюсь выкидывать слово "успешно", которое переводчик от google услужливо подсовывает django-rosetta, на которой я остановился как на инструменте для перевода. Пробовал какое-то чудо java-мысли OmegaT, но в очередной раз убедился, что у меня с Java несовместимая ДНК.
  3. В дальнейшем для "transformation" я буду использовать не "преобразование", а "обработка".
В коде api.py приложения ocr сделана пометка, что tesseract 3.0 падает при lang отличном от None, но за версией 3.01.1 я подобного не заметил. Вот из письма Roberto:
The lines:

if lang is not None:
       command.extend([u'-l', lang])
are commented because Tesseract 3.0 is very unstable and gives a 'segmentation fault' with the -l option, I'm waiting for the developers to fix this so I can uncomment the lines permanently.

As for the difference on manual OCR, I don't think you are doing anything wrong, I have the same situation as you, sometimes running the OCR manually gives different results as with Mayan.

This is how OCR works in Mayan:
1) High resolution image is created from the document and stored in the directory 'image_cache'  (filename is a hash of the document.checksum + page number + transformation string)
2) The document image is passed to the 'unpaper' software for cleanup and converted to the 'tiff' format
3) The TIFF file is passed to Tesseract
4) The result text from Tesseract is cleanup by the 'language backend filter' (eng.py, rus.py, spa.py)

The difference could be caused by several things:
 - if the document is a PDF, there are many format versions of PDF and sometimes Mayan has trouble doing a good preview, I'm working to increase Mayan support for all PDF versions.
 - the other reason could be the 'unpaper' software, I plan to add a settings to skip the 'unpaper' step in the future, gives very good results for some documents and very bad results for other documents.
 - finally sometimes it is 'Tesseract' itself the problem, that is why I also plan to support other OCR programs in the future to let users choose the one they like better.

то  есть со временем он предполагает дать возможность подключать другие движки распознавания символов, а tesseract ещё далёк от идеала, впрочем как и cuneiform. Пока же придётся обходиться без OCR.

Комментариев нет:

Отправить комментарий