Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

i319 - make ocr searching work #354

Merged
merged 3 commits into from
Apr 5, 2023
Merged

i319 - make ocr searching work #354

merged 3 commits into from
Apr 5, 2023

Conversation

kirkkwang
Copy link
Contributor

ref: notch8/adventist_knapsack#428

This commit will add an over to IiifPrint::LineageService to look for slugs over ids. Also, we found that in some cases using --psm 1 had problems where it flips the image incorrectly when the image is already in the right orientation. Considerations will be needed for images that are actually in the wrong orientation though.

image

This commit will add an over to IiifPrint::LineageService to look for
slugs over ids.  Also, we found that in some cases using `--psm 1` had
problems where it flips the image incorrectly when the image is already
in the right orientation.  Considerations will be needed for images that
are actually in the wrong orientation though.
@kirkkwang kirkkwang marked this pull request as draft April 5, 2023 01:15
# frozen_string_literal: true

# OVERRIDE: IIIF Print v1.0.0 to work with slugs
IiifPrint::LineageService.module_eval do
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is a slug-related override, I was wondering if there is a reason it wasn't added to slug_override.rb (I haven't looked into it.. not everything works there, but most overrides do).

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm…I like that we have a decorator, but I also want a reference to this use in SlugBug.

Also I'm wondering if work.to_param is the better method?

https://github.com/scientist-softserv/adventist-dl/blob/3c6a3290ee0db02f534a49fb2d18975008cea6ba/app/models/concerns/slug_bug.rb#L12-L14

Copy link
Contributor

@laritakr laritakr Apr 5, 2023

Choose a reason for hiding this comment

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

slug_override.rb IS the full set of decorators for everything slug-related here. So if we do an override, I'd prefer it go in there. But the configuration option is good.

jeremyf added a commit to notch8/iiif_print that referenced this pull request Apr 5, 2023
Prior to this commit, we assumed that a work's `id` was the mechanism
for always identifying a work in regards to it's ancestry/lineage.

However, for implmentations that incorproate slug behavior, that reality
is not always the case.

With this commit, we expose a configurable mechanism for altering the
ancestry functionality.

Related to:

- notch8/adventist-dl#354
- https://github.com/scientist-softserv/adventist-dl/issues/319
@jeremyf
Copy link
Contributor

jeremyf commented Apr 5, 2023

I went ahead and minted a configurable option for IIIF Print: notch8/iiif_print#209

That should remove the need for a decorator and we can instead move the logic into an initializer and document accordingly.

jeremyf added a commit to notch8/iiif_print that referenced this pull request Apr 5, 2023
Prior to this commit, we assumed that a work's `id` was the mechanism
for always identifying a work in regards to it's ancestry/lineage.

However, for implmentations that incorproate slug behavior, that reality
is not always the case.

With this commit, we expose a configurable mechanism for altering the
ancestry functionality.

Related to:

- notch8/adventist-dl#354
- https://github.com/scientist-softserv/adventist-dl/issues/319
This commit will favor the use of SlugBug over the override since the
logic has been set up with the new configuration in IIIF Print.

ref: notch8/iiif_print@ba4e955

Also, updated to the latest IIIF Print to see improvements with the
`identify` call.

ref: https://github.com/scientist-softserv/iiif_print/blob/62686fc62180d7d89654bf1fa726efc30cf6d351/lib/iiif_print/image_tool.rb#L77
@kirkkwang kirkkwang marked this pull request as ready for review April 5, 2023 17:49
@kirkkwang kirkkwang changed the title Update LineageService and config i319 - make ocr searching work Apr 5, 2023
@kirkkwang kirkkwang merged commit 933058e into main Apr 5, 2023
@kirkkwang kirkkwang deleted the i319-ocr-and-uv-search branch April 5, 2023 18:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants