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

Support multiple textualBodies in a single annotation #436

Open
elynema opened this issue Feb 23, 2024 · 2 comments
Open

Support multiple textualBodies in a single annotation #436

elynema opened this issue Feb 23, 2024 · 2 comments
Assignees

Comments

@elynema
Copy link

elynema commented Feb 23, 2024

Is your feature request related to a problem? Please describe.
Sometimes AVAnnotate manifests have annotations that have multiple TextualBody elements within the annotation.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@Dananji
Copy link
Collaborator

Dananji commented Nov 18, 2024

Ramp parsing process should identify these TextualBody typed values identify them as needed using the provided purpose/motivation values.
These annotations can be probably built into a data-structure similar to playlist markers data-structure we are building in the playlist-parser.js module, with additional properties to carry tagging information.

Example manifest: https://tanyaclement.github.io/znh-1939/manifests/manifest.json

      "annotations": [
        {
          "@context": "http://iiif.io/api/presentation/3/context.json",
          "id": "https://tanyaclement.github.io/znh-1939/manifests/field_recordings_t86_243-canvas2-1",
          "type": "AnnotationPage",
          "label": {
            "en": [
              "Default"
            ]
          },
          "items": [
            {
              "@context": "http://www.w3.org/ns/anno.jsonld",
              "type": "Annotation",
              "motivation": "supplementing",
              "id": "https://tanyaclement.github.io/znh-1939/field_recordings_t86_243/canvas-2/canvas/page1",
              "body": [
                {
                  "type": "TextualBody",
                  "value": "Men singing",
                  "format": "text/plain",
                  "motivation": [
                    "commenting",
                    "tagging"
                  ]
                },
                {
                  "type": "TextualBody",
                  "value": "Unknown",
                  "format": "text/plain",
                  "purpose": "tagging",
                  "motivation": "tagging"
                },
                {
                  "type": "TextualBody",
                  "value": "Song",
                  "format": "text/plain",
                  "purpose": "tagging",
                  "motivation": "tagging"
                }
              ],
              "target": "https://ia801304.us.archive.org/11/items/WPA_1939_Jacksonville_Halpert/T86-243.mp3#t=0,39"
            }, ...

The above Annotation is displayed in AVAnnotate as follows;
Screenshot 2024-11-18 at 11 31 48 AM

Suggested solution:
Parse each TextualBody annotation value in each Annotation, using purpose and motivation of the annotation to derive the appropriate display each value in the UI.

  • Parse multiple TextualBody typed values in a single annotation into one node in the data structure built for the UI component
  • Use purpose and/or motivation value on each element in the body array to distinguish how the values are displayed in the UI. Ramp can extract these values similar to AVAnnotate;
    • purpose: "tagging" => display as a visual tag in the annotation
    • motivation: ["commenting", "tagging"] => display the text value in the annotation
  • The values with purpose: "tagging" are displayed as filter(s) in the Annotation component

@Dananji
Copy link
Collaborator

Dananji commented Dec 16, 2024

Parsing multiple TextualBody typed annotations was implemented as part of the work done in #431.

I have a little bit more work done related to parsing and adjusting the overall data format of the parsed annotations (a554a60). This work is not specifically related to multiple TextualBody annotations, but more of a cleanup of the annotation parser.

This is not in a PR yet. Once the outstanding PR for external annotations is merged, I will bring this work into a PR.

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

No branches or pull requests

2 participants