Skip to content

recognize: try to self.resolve_resource model#83

Closed
kba wants to merge 1 commit intocisocrgroup:masterfrom
kba:resolve-resources
Closed

recognize: try to self.resolve_resource model#83
kba wants to merge 1 commit intocisocrgroup:masterfrom
kba:resolve-resources

Conversation

@kba
Copy link
Copy Markdown
Contributor

@kba kba commented Jan 28, 2021

No description provided.

Copy link
Copy Markdown
Collaborator

@bertsky bertsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your take!

There's still all the ocropus_find_file and unpickle logic behind load_object, so I'll have to think about this some more. Also, before you merge to ocrd_all, I'll have to find a way to finalize and merge #77 ...

@bertsky
Copy link
Copy Markdown
Collaborator

bertsky commented Jun 7, 2023

There's still all the ocropus_find_file and unpickle logic behind load_object, so I'll have to think about this some more.

Actually, there's not much to think about. Already before, we bypassed the ocropus_find_file mechanism. And it's not realistic that this will ever be used (esp. given OcrdResourceManager is so superior):

def ocropus_find_file(fname, gz=True):
"""Search for `fname` in one of the OCRopus data directories, as well as
the current directory). If `gz` is True, search also for gzipped files.
Result of searching $fname is the first existing in:
* $base/$fname
* $base/$fname.gz # if gz
* $base/model/$fname
* $base/model/$fname.gz # if gz
* $base/data/$fname
* $base/data/$fname.gz # if gz
* $base/gui/$fname
* $base/gui/$fname.gz # if gz
$base can be four base paths:
* `$OCROPUS_DATA` environment variable
* current working directory
* ../../../../share/ocropus from this file's install location
* `/usr/local/share/ocropus`
* `$PREFIX/share/ocropus` ($PREFIX being the Python installation
prefix, usually `/usr`)
"""

Also, before you merge to ocrd_all, I'll have to find a way to finalize and merge #77 ...

Let's get this forward by merging into #87.

bertsky pushed a commit to bertsky/ocrd_cis that referenced this pull request Jun 7, 2023
@bertsky
Copy link
Copy Markdown
Collaborator

bertsky commented Jun 7, 2023

Merged into #87 – closing

@bertsky bertsky closed this Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants