Skip to content

Commit 29cb747

Browse files
author
Kirill Makankov
committed
1. typo has been fixed
2. only one / 3. fixed unit tests to support only one / in the path.
1 parent 3844aaf commit 29cb747

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

TesseractOCR/G8Tesseract.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@
238238
* Initialize Tesseract with the provided language and engine mode.
239239
*
240240
* @param language The language to use in recognition. See `language`.
241-
* @param configDictionary A dictioanry of the config variables
241+
* @param configDictionary A dictionary of the config variables
242242
* @param configFileNames An array of file names containing key-value config pairs. All the config
243243
* variables can be init only and debug time both. Furthermore they could be
244244
* specified at the same time, in such case tesseract will get variables from

TesseractOCR/G8Tesseract.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ - (id)initWithLanguage:(NSString *)language
116116
}
117117
else {
118118
// config Tesseract to search trainedData in tessdata folder of the application bundle];
119-
_absoluteDataPath = [NSString stringWithFormat:@"%@/", [NSString stringWithString:[NSBundle bundleForClass:self.class].bundlePath]].copy;
119+
_absoluteDataPath = [NSString stringWithFormat:@"%@", [NSString stringWithString:[NSBundle bundleForClass:self.class].bundlePath]].copy;
120120
}
121121

122122
setenv("TESSDATA_PREFIX", [_absoluteDataPath stringByAppendingString:@"/"].UTF8String, 1);

TestsProject/TestsProjectTests/InitializationTests.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
describe(@"Tesseract initialization", ^{
1818

1919
NSFileManager *fileManager = [NSFileManager defaultManager];
20-
NSString *resourcePath = [[NSBundle bundleForClass:G8Tesseract.class].resourcePath stringByAppendingString:@"/"];
20+
NSString *resourcePath = [NSBundle bundleForClass:G8Tesseract.class].resourcePath;
2121
NSString *tessdataFolderName = @"tessdata";
2222
NSString *tessdataFolderPathFromTheBundle = [[resourcePath stringByAppendingPathComponent:tessdataFolderName] stringByAppendingString:@"/"];
2323
NSString *debugConfigsFileName = @"debugConfigs.txt";

0 commit comments

Comments
 (0)