by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    jeffreycwitt
    @jeffreycwitt
    the only way I can think to do this, is run a loop until I find the annotation that matches the targeted annotation in the hits -> annotations array
    but this seems like it could end up taking a really long time, especially if the search results are long.
    does that make any sense?
    I wonder if you've got a better way of retrieving coordinates for a hit from its targeted annotations than just looping through all annotations until you find a match.
    Another way of saying it is, it would be nice if the hits had a property for coordinates, so you could bypass altogether the extra step of looking for the annotation
    Edward Silverton
    @edsilv

    this is what a wellcome search result looks like:

    http://wellcomelibrary.org/annoservices/search/b18035723?q=dieselbe

    jeffreycwitt
    @jeffreycwitt
    right, so say you are looping over the hits, and for each one you wanted to get the coordinates...
    Edward Silverton
    @edsilv
    the id of the annotation does contain the coords, but I think you'd still want to use the annotation's on property
    jeffreycwitt
    @jeffreycwitt
    don't you have search back through the "resources" to find the matching resource so that you can then grab the coordinates
    I think its dangerous to rely on the coordinates in the id
    Edward Silverton
    @edsilv
    personally I have no problem with looping over the annotations each time
    jeffreycwitt
    @jeffreycwitt
    we should be getting the from the "on" property
    Edward Silverton
    @edsilv
    yep
    jeffreycwitt
    @jeffreycwitt
    oh ok, doesn't feel to slow
    Edward Silverton
    @edsilv
    loops are so ridiculously fast that for me it's a no brainer
    manifesto takes a sort of "brute force" approach like that. haven't noticed any perf issues
    jeffreycwitt
    @jeffreycwitt
    ok, that's sounds fine then. That's basically how I've been doing it. I just worried professionals might have a secret trick :)
    Edward Silverton
    @edsilv
    shaun was saying that he tried manifesto and it solved a few bugs for him. I haven't got as far as implementing the hits property yet though - only using the annotations
    it's on the todo list for the near future though
    jeffreycwitt
    @jeffreycwitt
    great; many thanks
    Edward Silverton
    @edsilv
    but I'd use the "brute force" approach
    jeffreycwitt
    @jeffreycwitt
    happy halloween
    Edward Silverton
    @edsilv

    hi @jeffreycwitt have you thought about paging search results?

    UniversalViewer/universalviewer#166

    This would limit the size of the array you need to loop over.

    happy belated halloween too :-)
    Edward Silverton
    @edsilv

    also, you could try "caching" the annotations within the hits by replacing the annotation ids with references to the annotation objects after lookup. this is something I do a lot with jquery for example, do the lookup once with a selector, then cache the result in a var for reuse. not sure how much they will need to be reused, but possibly a worthwhile optimisation.

    I was pretty tired yesterday, had time to sleep on it :-)

    Øystein Blixhavn
    @blixhavn
    @edsilv: Your universalviewer will be on norwegian television in january :)
    Edward Silverton
    @edsilv
    cool! :-) which TV program is it?
    Øystein Blixhavn
    @blixhavn
    Schroedingers Cat - a popular science program
    Edward Silverton
    @edsilv
    awesome. send me a link if it's uploaded to youtube. it was on a UK science program a year or so ago. I think it was Horizon (for a fleeting moment).
    Øystein Blixhavn
    @blixhavn
    I will :)
    Ben W. Brumfield
    @benwbrum
    Is there a UV demo site which can accept IIIF manifests, so that I can try out an integration without installing UV locally?
    Edward Silverton
    @edsilv

    Yep:

    http://universalviewer.github.io/examples/

    If you scroll down to where it says Manifest, you can paste a manifest url into the field under the drop down box. Then hit Set to view.

    emmastanford
    @emmastanford

    Hello! I'm wondering if anyone using the Universal Viewer has encountered problems with non-unique page or folio numbers. Some of the items we're digitizing at the Bodleian are volumes that contain multiple sequences of folio numbers, so that there are several instances of folio 1r, for example, within a single volume. Since the Universal Viewer has a text entry field rather than a drop-down menu for page selection, I assume that if someone were trying to navigate to folio 1r within a volume like this, they would get an error message, or else they would be taken to the first instance of a folio 1r within the manifest, which might not be the one they wanted.

    We could get around this problem by including the section/sequence number within the foliation metadata (for example, the various 1rs would become 1: 1r, 2: 1r, etc.), but this isn't ideal. Has anyone else encountered this problem and found a workaround?

    Thanks! Hope to see some of you in Ghent later this week.

    Edward Silverton
    @edsilv
    Hi Emma, that's correct that the UV would default to the first instance it finds of '1r'. I think this might be a good question to discuss during our UV community call on Friday which coincides with the Working group in Ghent. The Swedish National Archives have been experimenting with a drop down box instead of text input field, so may be able to offer some insight.
    Øystein Blixhavn
    @blixhavn
    @edsilv Anything I need to configure to get UV to work with pdfs? I tried to feed one of the PDF manifests from the demo page into my viewer, and it's not working properly
    I get only a black screen instead of the pdf, even though the metadata seems to load fine
    shouldn't all required libraries follow the bower install?
    Øystein Blixhavn
    @blixhavn

    I fixed it by replacing app.js with the one on the demosite
    Apparently UV directly from bower is not working properly.

    Btw: Is it possible to set initial page to display? Or maybe change page using JS after loading

    Øystein Blixhavn
    @blixhavn
    @edsilv A while ago I asked you about the IIIF search functionality. I see that you've implemented this API at Wellcome Library. How did you do the text extraction (with positioning)?
    Edward Silverton
    @edsilv

    Hi, I just tried a fresh bower install on the demo-site and it's loading one of the Wellcome PDFs without a problem.

    I experimented with using the 'cv' hash parameter to set the initial page, but ran into difficulties with it. I think it was a limitation of the pdf.js api, but not sure. Would be great to have some fresh eyes on it!

    I think the OCR/Alto stuff is probably beyond the scope of this gitter channel. Maybe try posting a question on the UV Google Group:

    https://groups.google.com/forum/#!forum/universalviewer

    I'll see if I can get @tomcrane to write an explanation.

    Øystein Blixhavn
    @blixhavn
    @edsilv: UniversalViewer is on television! https://tv.nrk.no/serie/schrodingers-katt#t=11m50s
    about 3 seconds :P
    Edward Silverton
    @edsilv
    :-D wow!
    fame at last! :-)
    Øystein Blixhavn
    @blixhavn
    @edsilv: We're running Piwik and would like to have it count downloads through UV. Do you see any good solution to this?
    Edward Silverton
    @edsilv

    you can listen for this event in the containing page:

    https://github.com/UniversalViewer/examples/blob/master/examples.js#L358

    you should be able to use that to track using Piwik/Google Analytics etc

    if you try different types of download on http://universalviewer.io/examples/ you can see the events being logged in the console

    Øystein Blixhavn
    @blixhavn
    Great, thanks :)
    Øystein Blixhavn
    @blixhavn
    Do you think it'd be hard to add title to the selectedOption value (for search ordering) in the search angular app?
    I'm replacing the dropdown with some bootstrap dropdown links
    Edward Silverton
    @edsilv
    sorry, what is the search angular app?