Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

...

Find documents in a file Version 4 (Python)

Группа действий: Распознавание текста

Описание

Action group: Text recognition

...

Description

The action searches the source file for different types of documents and saves them as separate files. If necessary, the orientation of the documents will be correctedДействие ищет в исходном файле различные типы документов и сохраняет их в виде отдельных файлов. При необходимости ориентация документов будет исправлена.


...

Settings

Свойство
Property
Описание
Description
Тип
Type
Пример заполнения
Filling example
Обязательность
Mandatory 
заполнения поля
field

Параметры

Путь к файлу

Путь к файлу, из которого нужно получить отдельные документы
Parameters
File pathThe path to the file from which you want to get individual documents. Supported formats
. Поддерживаемые форматы
: jpg, jpeg, bmp, png, pdf.Robin.FilePath

C:\doc\img.png

Да

Yes
API
ключУникальный идентификатор для доступа к сервису Dbrain
keyA unique identifier for accessing the service.Robin.String

Да

Путь к папке


Yes
Cloud serverIf the value is «true», the action will send a request to the DBrain cloud server. If «false», the action will send a request to the local DBrain server.Robin.BooleantrueNo
Folder pathThe path to the folder where the images of the found documents will be saved. The images will be created with the *.png extension, and their names will contain the name of the type of the corresponding document. If the field is not filled in, the images will be saved to the source file folder
Путь к папке, в которую будут сохранены изображения найденных документов. Изображения будут созданы с расширением *.png, а их имена будут содержать название типа соответствующего документа. Если поле не заполнено, то изображения сохранятся в папку исходного файла
.Robin.FolderPathC:\doc\
Folder
img
Нет
No

Перезаписать

OverwriteIf «true», and there are images with the same name and extension in the specified folder, then the new image will overwrite it. If «false», the image will not be overwritten and the action will return an error
Если "true", и в указанной папке существует изображение с таким же именем и расширением, то новое изображение его перезапишет. Если "false", то изображение перезаписано не будет и действие вернет ошибку
.Robin.Booleantrue

Нет

No
Add the source file to the nameIf «true», then the name of each image will contain the name of the source file and the name of the document type specified in the image. If «false», then the image names will contain only the names of document types

Добавить исходное название

Если "true", то имя каждого изображения будет содержать имя исходного файла и название типа документа, указанного на изображении. Если "false", то имена изображений будут содержать только названия типов документов
.Robin.Booleantrue

Нет

No
Time outThe time in milliseconds during which data will be extracted from the document. The default value is 120000 ms
Тайм-аут, мсВремя в миллисекундах, в течение которого будет происходить поиск документов в файле. Значение по умолчанию 120000 мс
.Robin.Numeric
Нет

No
Результаты
Results

Результат

Коллекция путей к изображениям документов, которые были найдены в исходном файле. Если найдено несколько документов одного типа, к названиям их изображений будет добавлен индекс
ResultA collection of paths to document images that were found in the source file. If several documents of the same type are found, an index will be added to the names of their images.Robin.Collection

Особые условия использования 



Special conditions of use

Connecting to Dbrain Подключение к Dbrain https://doc.dbrain.io/podklyuchenie/podklyuchenie-k-oblaku

Действие работает с конкретными видами документов:  Снилс, первый разворот и прописка паспорта.

Нейросеть распознает только российские документы.  

Если пользователь подает на вход документы, кроме заявленных (Снилс, первый разворот и прописка паспорта), то при проценте сходства <50, они не будут классифицированы и записаны в результирующую таблицу.

The action works with specific types of documents: personal insurance policy number (SNILS), the first spread and registration in a passport.

Neural network recognizes only Russian documents.  

If a user submits documents other than the declared ones (personal insurance policy number, first spread and registration in a passport) for input, if the similarity percentage is <50, they will not be classified and recorded in the result table.

Example of how the "Add the source file to the name" parameter works: If true, the resulting file will be written as "Action Tests_NILSПример работы параметра "Добавить исходное название": Если true, то результирующий файл будет записан как "Тесты действий_СНИЛС_1.png".  Если If false, то then "СНИЛСSNILS_1.png".

Робот вернет ошибку, еслиThe robot will return an error if:

  • в поле "Путь к файлу" подается недопустимый формат входного файла.
  • по указанному пути уже есть файл с указанным именем и поле "перезаписать" = false.
  • Тайм-аут закончился, результат не получен.
  • указан неверный API-ключ.

Пример использования 

Задача: найти документы в файле. 

Решение: воспользоваться действием "Найти документы в файле". 

Реализация:

  1. Перенести действие  "Найти документы в файле" на рабочую область.
    Image Removed
  2. Настроить параметры действия "Найти документы в файле".
    Image Removed
  3. Нажать на кнопку "Старт"  в верхней панели.

Результат:

  • the "File path" field contains an invalid input file format.
  • there is already a file with the specified name on the specified path and the "overwrite" field = false.
  • Timeout expired, no result is obtained.
  • an invalid API key is specified.

Example of use 

Task: find documents in a file. 

Solution: use the "Find documents in a file" action. 

Implementation:

  1. Transfer the "Find documents in a file" action to the workspace.
    Image Added
  2. Set the parameters of the "Find documents in a file" action.
    Image Added
  3. Click on the "Start" button in the top panel.

Result

The program robot completed successfully. The documents have been saved to separate files.

 Программный робот отработал успешно. Документы сохранены в отдельные файлы.