gali8/Tesseract-OCR-iOS — pull request #113 by ws233 (2014-12-23 17:58:24+00:00)
Title: New designated initializer.

I did changes to my pull request.
First of all, I rebased it, so now it contains only one commit.
Second, I did the following changes, as we discussed with BamX and Kevin.

1. dataPath is now readonly public.
2. designated initializer changed to - (id)initWithLanguage:(NSString *)language configDictionary:(NSDictionary *)configDictionary configFileNames:(NSArray *)configFileNames dataPath:(NSString *)dataPath engineMode:(G8OCREngineMode)engineMode NS_DESIGNATED_INITIALIZER;
where configDictionary is a dictioanry of the config variables and configFileNames is an array of file names containing key-value config pairs. All the config variables can be init only and debug time both. Furthermore they could be specified at the same time, in such case tesseract will get variables from every file and dictionary all together.
3. To avoid ambiguity with Apple Naming Conventions the following functions were renamed:
- setUpTesseractToSearchTrainedDataInTrainedDataFolderOfTheApplicatinBundle (only setters should start with set)
- initEngine (only initializer should start with init. in such case the function should return id)
- copyDataToDocumentsDirectory (if function starts from copy, the special rules are implemented by ARC to the function)
4. if the dataPath is specified, the whole content of the tessdata from the application bundle is copied to the Documents/dataPath/tessdata and tesseract is initialized with that path.
5. _dataPath is replaced with self.dataPath everywhere besides init method.

Finally, I'm not familiar with the Kiwi, so I'm not able to write down unit-tests righ now.
Therefore, I would appreciate, if you'll do some unit tests for these changes, while I do study the Kiwi.
That will help me to check my on Kiwi code and increase my unit-tests developing in the future for the project.

Thanks and looking forward for any more comments about the feature.