ocropus-archive / DUP-ocropy

Python-based tools for document analysis and OCR
Apache License 2.0
3.41k stars 590 forks source link

Delete unused lru.py #273

Closed zuphilip closed 6 years ago

kba commented 6 years ago

This one we could actually delete, since it's just a copy of the snippet from http://code.activestate.com/recipes/498245-lru-and-lfu-cache-decorators/.

zuphilip commented 6 years ago

First, I wanted to delete completely, but then I saw that there is code in OLD which is relying on this lru.py: https://github.com/tmbdev/ocropy/search?utf8=%E2%9C%93&q=lru&type= and thus I moved it also to OLD. As you see, these are not strong reasons against deleting completely. To be honest, I have never used any file or code from OLD so far...

amitdo commented 6 years ago

About the OLD dir. Maybe it should be removed.

Git keeps the history, you know...

amitdo commented 6 years ago

'ocropus-sauvola' might be useful. See #210.

Consider moving it back to the root dir. It could be used as an alternative to 'ocropus-nlbin'.

kba commented 6 years ago

About the OLD dir. Maybe it should be removed.

Git keeps the history, you know...

That's true but while you can find/retrieve old files in Git if you know how and what to look for, discovering useful deleted code is tedious (e.g. when searching in Github or Google). I do agree that we should prune all the really old stuff not usable anymore but some code like the sauvola implementation or the synthetic training code is still useful to have for study.

@amitdo Feel free to open a PR for the ocropus-sauvola so we can test/adapt it to the current state of code base.

@zuphilip I would really delete lru.py.

amitdo commented 6 years ago

but while you can find/retrieve old files in Git if you know how and what to look for, discovering useful deleted code is tedious (e.g. when searching in Github or Google).

You can solve this issue by creating a new 'ocropy-unused' repo and move most of the stuff in 'OLD' dir to this repo.

zuphilip commented 6 years ago

Okay, the file is deleted now. @kba ready to merge?