Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Use strings instead of numbers for oem and psm #4332

Open
amitdo opened this issue Oct 28, 2024 · 6 comments
Open

Feature Request: Use strings instead of numbers for oem and psm #4332

amitdo opened this issue Oct 28, 2024 · 6 comments

Comments

@amitdo
Copy link
Collaborator

amitdo commented Oct 28, 2024

Your Feature Request

Use strings instead of numbers for oem and psm in the command line.

@stweil
Copy link
Contributor

stweil commented Oct 28, 2024

Which strings would you suggest? The macro names from include/tesseract/publictypes.h, maybe without the "OEM_" and "PSM_" prefixes? Upper or lower case?

@amitdo
Copy link
Collaborator Author

amitdo commented Oct 28, 2024

Stefan, this was suggested by you 6 years ago here:

#1604 (comment)

I‌ wonder whether we should drop the numeric values and replace them by symbolic strings (e. g. --oem lstm+legacy).

I added the psm part:

Same idea for psm.

--psm <mode> modes: osd, auto, auto-osd, column, block, word. char...

@amitdo
Copy link
Collaborator Author

amitdo commented Oct 28, 2024

@Shreeshrii commented on Jun 25, 2018

Symbolic strings is a good idea. However for compatibility, I would suggest also supporting the existing numeric values, both for oem and psm.

@amitdo
Copy link
Collaborator Author

amitdo commented Nov 1, 2024

Stefan, you used a 'confused' emoji as reaction to one of my comments. What confused you?

@stweil
Copy link
Contributor

stweil commented Nov 1, 2024

Sorry, it was the wrong choice. I was surprised that you remembered things which I had written 6 years ago. Perhaps I was also a little bit confused why this feature was never implemented up to now. I think I'll not wait longer, but implement it (if nobody else wants to do it).

stweil added a commit to stweil/tesseract that referenced this issue Nov 1, 2024
stweil added a commit that referenced this issue Nov 2, 2024
This fixes issue #4332.

Signed-off-by: Stefan Weil <[email protected]>
@stweil
Copy link
Contributor

stweil commented Nov 2, 2024

It's now implemented in Git master. Does this require a new minor release, or is a bugfix release sufficient?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants