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

[Suggestion] Directories reorder and renaming #4

Closed
amitdo opened this issue Jan 25, 2016 · 5 comments
Closed

[Suggestion] Directories reorder and renaming #4

amitdo opened this issue Jan 25, 2016 · 5 comments
Assignees

Comments

@amitdo
Copy link

amitdo commented Jan 25, 2016

Hello!

Nice work :-)

My suggestions:

  • Rename 'Modules' to 'Lib'.
  • Create a new folder named 'Progs' and move all the utilities (accci, accdist, accsum, etc.) to this folder.
  • Create a new folder named 'Man' and move all the manpages to there.
  • Create a new folder named 'src' and move 'Lib' and 'Progs' (and others) to there.
@eddieantonio
Copy link
Owner

@amitdo Hey, thanks!

I left these folders with the same structure because I really only ported the old code written in 1996 by Stephen Rice to modern computers, and added UTF-8 support. The only thing I did in terms of structure is move everything from analytic-tools to the root directory.

Why would you suggest these changes?

@amitdo
Copy link
Author

amitdo commented Jan 26, 2016

Hi again!

I reviewed your commits, so I know what changes you made so far.

Why would you suggest these changes?

Well, It's a matter of style. Many open source projects have a directory layout that include 'src' and/or 'lib' dirs. Some projects use 'prog(s)' dir, but it's less common.

https://github.com/kriasoft/Folder-Structure-Conventions
https://github.com/DanBloomberg/leptonica

It's just a suggestion, feel free to not accept it... :)

BTW, a few years ago I started rewriting this project in Python. Never finished it...

@amitdo
Copy link
Author

amitdo commented Jan 26, 2016

FYI, I added a link to this project to Tesseract wiki:
https://github.com/tesseract-ocr/tesseract/wiki/3rdParty

I hope this is ok with you.

@eddieantonio
Copy link
Owner

Heya!

Sorry if I sounded offended in my last post; I have a conference submission deadline looming and a major assignment due soon, so adding more potential work for me right now is like 😫

That said! This is a good idea! 😄 However, I like a more unix-y structure a bit better:

.
├── bin                 # Compiled binaries of utilities
├── include             # Public C/C++ API (does not really exist yet...)
├── lib
│   └── libisri.a       # Used for internal linking
│   └── libisri.so.60   # Used for dynamically linking with external applications
├── libexec             # Scripts used internally
├── man
│   └── man1            # Man pages for each binary
│   └── man3            # Man pages for public API?
├── src                 # Source of libisri and binaries
└── test                # Tests

This way, developers on Unix-y systems can simply add each directory to their respective paths:

ISRI=$HOME/isri-ocr-evaluation-tools # or wherever you decide to put this repo
export PATH=$ISRI/bin:$PATH
export MANDIR=$ISRI/man:$MANPATH
export LD_LIBRARY_PATH=$ISRI/lib:$LD_LIBRARY_PATH

I've suggested a public API, which may be a lot of work, but if implemented, you could link with ISRI libs like so:

g++ \
    -I$HOME/isri-ocr-evaluation-tools/include \ # Typically set in CPPFLAGS in a Makefile
    -L$HOME/isri-ocr-evaluation-tools/lib     \ # Typically set in LDFLAGS in a Makefile
    mycoolocrthing.cc -o mycoolocrthing       \ 
    -lisri                                      # Link with ISRI OCR evaluation tools

Edit: And yeah, it's okay for this project to be listed on the Tesseract page! My colleagues wanted to evaluate their Tesseract-based OCR engine and they found the ISRI tool to be the best for it (being dissatisfied with more modern options like ocrevalUAtion).

@amitdo
Copy link
Author

amitdo commented Jan 26, 2016

👍

But do it only if/when you have enough free time. :)

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