Can recognition be called in multiple child threads?
Best Answer
O
Olivier @MyScript
said
about 5 years ago
Dear Dovy Zou,
currently, in order to prevent the "package is already opened" message, you shall call the "waitForIdle" method before closing the package.
Once editor is in "idle" state, you should be able to properly close the editor, contentPart and contentPackage.
Regarding speeding up the recognition process, this is not possible by itself: text recognition is a very demanding process, and the more ink you provide in "batch mode", the longer the recognition process will take.
Currently, the recognition cannot be done on several processes, it is a single-thread process.
What is the reason of your question? You are providing the ink in "batch mode", and you would like to speed up the recognition process?
Best regards,
Olivier
d
dovy Zou
said
about 5 years ago
Hello, we have more data to identify at this time, so we want to cut into a small number of parts, put multiple sub-threads for segmentation recognition, and finally spliced together. If you say that you don't support multithreading, then this method is not ready for use.
In order not to block the main thread, I put the identification in a single sub-thread, including the destruction of the "Package" after the recognition is also placed in the child thread. Now there is a new problem, the destruction of "Package" will sometimes be very slow, resulting in the next recognition will be reported: 1, Error, -[IINKEngine deletePackage: error:]::172 package is opened; 2, Error , -[IINKEngine createPackage:error:]::139 package is already opened. I guess it should be the last time that the legacy "Package" was not destroyed.
What method do you have over there, which will allow me to speed up the last time to identify the legacy "Package" destruction speed when the amount of data is large?
thank you very much!
O
Olivier @MyScript
said
about 5 years ago
Answer
Dear Dovy Zou,
currently, in order to prevent the "package is already opened" message, you shall call the "waitForIdle" method before closing the package.
Once editor is in "idle" state, you should be able to properly close the editor, contentPart and contentPackage.
Regarding speeding up the recognition process, this is not possible by itself: text recognition is a very demanding process, and the more ink you provide in "batch mode", the longer the recognition process will take.
dovy Zou
Can recognition be called in multiple child threads?
Dear Dovy Zou,
currently, in order to prevent the "package is already opened" message, you shall call the "waitForIdle" method before closing the package.
Once editor is in "idle" state, you should be able to properly close the editor, contentPart and contentPackage.
Regarding speeding up the recognition process, this is not possible by itself: text recognition is a very demanding process, and the more ink you provide in "batch mode", the longer the recognition process will take.
Best regards,
Olivier
- Oldest First
- Popular
- Newest First
Sorted by PopularOlivier @MyScript
Dear Dovy Zou,
thank your for contacting us and your question.
Currently, the recognition cannot be done on several processes, it is a single-thread process.
What is the reason of your question? You are providing the ink in "batch mode", and you would like to speed up the recognition process?
Best regards,
Olivier
dovy Zou
Hello, we have more data to identify at this time, so we want to cut into a small number of parts, put multiple sub-threads for segmentation recognition, and finally spliced together. If you say that you don't support multithreading, then this method is not ready for use.
In order not to block the main thread, I put the identification in a single sub-thread, including the destruction of the "Package" after the recognition is also placed in the child thread. Now there is a new problem, the destruction of "Package" will sometimes be very slow, resulting in the next recognition will be reported: 1, Error, -[IINKEngine deletePackage: error:]::172 package is opened; 2, Error , -[IINKEngine createPackage:error:]::139 package is already opened. I guess it should be the last time that the legacy "Package" was not destroyed.
What method do you have over there, which will allow me to speed up the last time to identify the legacy "Package" destruction speed when the amount of data is large?
thank you very much!
Olivier @MyScript
Dear Dovy Zou,
currently, in order to prevent the "package is already opened" message, you shall call the "waitForIdle" method before closing the package.
Once editor is in "idle" state, you should be able to properly close the editor, contentPart and contentPackage.
Regarding speeding up the recognition process, this is not possible by itself: text recognition is a very demanding process, and the more ink you provide in "batch mode", the longer the recognition process will take.
Best regards,
Olivier