Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lex failed with exit code 1

StackOverflow https://stackoverflow.com/questions/20309913

  •  06-08-2022
  •  | 
  •  

문제

I am trying to include a file in my resource bundle the files contains the following:

LeadPunc="({[`'
TrailPunc=}:;-]!?`,.)"'
NumLeadPunc=#({[@$
NumTrailPunc=}):;].,%
Operators=*+-/.:,()[]
Digits=0123456789
Alphas=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
*extra line*

The files is called:

eng.cube.lm

The error I get is:

IExpenseReporter/tessdata/eng.cube.lm:6: premature EOF
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lex failed with exit code 1

This file goes along with the newest version of tesseract (OCR). Does anyone have an idea what is causing this error and how to fix it?

도움이 되었습니까?

해결책 2

XCode "thinks" this is a lex file and try to process it by calling lex. However, lex finds and unbalanced quote and thus a premature end of file.

You should try to call the designated tool explicitly.

다른 팁

Make sure you select the "Create folder references" option when adding the tessdata folder to your project.

From the documentation:

NOTE: This library currently requires the tessdata folder to be linked as a referenced folder instead of a symbolic group. If Tesseract can't find a language file in your own project, it's probably because you created the tessdata folder as a symbolic group instead of a referenced folder. It should look like this if you did it correctly:

enter image description here

Note how the tessdata folder has a blue icon, indicating it was imported as a referenced folder instead of a symbolic group.

Trashing the current folder and adding it again as a folder reference should solve the problem.

I had this issue and I found that copying the folder "tessdata" from the language zip into the project directory rather then into Xcode fixed the issue.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top