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

some nodes don't expand; use gvp:narrower #1

Closed
VladimirAlexiev opened this issue Feb 24, 2014 · 6 comments
Closed

some nodes don't expand; use gvp:narrower #1

VladimirAlexiev opened this issue Feb 24, 2014 · 6 comments

Comments

@VladimirAlexiev
Copy link

@VladimirAlexiev VladimirAlexiev commented Feb 24, 2014

Hi Matthew!
When I expand Styles and Periods, I see 2 dark nodes that expand, and 2 light nodels that don't expand.

So which predicate do you use to navigate? You should use gvp:narrower.

@mdlincoln

This comment has been minimized.

Copy link
Owner

@mdlincoln mdlincoln commented Feb 24, 2014

Thanks for pointing this out. I am indeed using gvp:narrower to navigate the AAT hierarchy. Unfortunately the problem goes a bit deeper than using the correct predicate.

A strict dendrogram is not actually entirely sufficient for displaying the relationships within the AAT, because individual nodes can have multiple parents. For example, one of the children of node aat:300389850 is node aat:300073708. This child has a separate "parent" (via the gvp:broaderGeneric predicate) in node aat:300055980.

One solution for this problem is to simply allow the same node to be written into the JSON hierarchy multiple times. I originally wrote the program this way, however the script would get stuck in an infinite loop on a troublesome section of the AAT where a node had a "child" (gvp:narrower) that had it's own "parent" (gvp:broaderGeneric) listed as a "child" (gvp:narrower). Because the script is recursive, it would try to write an infinitely deep hierarchy and crash. To avoid this issue, I had the script keep a list of every node that it had already added to the hierarchy. When looking up children nodes, it would skip any that had already been added. This avoided the infinite loop, but raised the issue you describe here.

Solutions may include:

  1. Finding a better way to avoid an infinite loop. Perhaps by checking against the immediate parent rather than all previously added nodes? Nope, it looks like the recursion loop covers several more levels of the hierarchy.
  2. "Reversing" the direction I traverse the hierarchy, starting with nodes at the bottom of the hierarchy (with no gvp:narrower) and following gvp:broaderPreferred) up the hierarchy.

I suspect the former approach would be easier to implement. I will try to address that when I can find the time, but it may take a while. In the meantime, I'll be sure to update my post to reference this issue. It actually raises a very interesting discussion about how to visualize these vocabularies.

@mdlincoln

This comment has been minimized.

Copy link
Owner

@mdlincoln mdlincoln commented Feb 24, 2014

I added some error-logging to the script to see the extent of this problem - a great deal of the hierarchy is actually left out by not repeating nodes.

@mdlincoln

This comment has been minimized.

Copy link
Owner

@mdlincoln mdlincoln commented Feb 25, 2014

After some testing, I've isolated two troublesome nodes whose own children have listed their parent nodes as "narrower", thus causing infinite looping:

  1. bedcovers and bed furniture (linens) reference eachother via gvp:narrower
  2. and motion pictures (visual works) reference each other via gvp:narrower

I'm having the hierarchy script skip these specific nodes until I can find a more elegant way to address the issue.

@VladimirAlexiev

This comment has been minimized.

Copy link
Author

@VladimirAlexiev VladimirAlexiev commented Feb 25, 2014

Hi! Yours is like the 3rd actual use of AAT LOD, so we very much appreciate your detailed feedback to fix these points.

But first: have you read the AAT Semantic Representation Documentation? If so and it leaves things unclear, I'd appreciate if you point out the specific sections that need expanding.

individual nodes can have multiple parents

Sure, AAT is a poly-hierarchy. But each has just one gvp:broaderPreferred

has a separate "parent" (via the gvp:broaderGeneric predicate)

gvp:broaderPartitive, gvp:broaderInstantial, gvp:broaderGeneric are sub-props of gvp:broader so you don't need them.
And as hinted above, you shouldn't work with gvp:broader either, but with gvp:broaderPreferred

a node had a "child" (gvp:narrower) that had it's own "parent" (gvp:broaderGeneric) listed as a "child" (gvp:narrower).

Thanks for the report! This is a data bug.
Recorded as https://jira.getty.edu/browse/ITSLOD-125. I'm sure Getty will fix it pretty soon.
I used this query:
select * {?x gvp:broaderTransitive ?x}
to find the same 4 nodes

  • aat:300197853 bedcovers <-> aat:300216611 bed furniture (linens)
  • aat:300136900 motion pictures (visual works) <-> aat:300263848 motion picture components
@mdlincoln

This comment has been minimized.

Copy link
Owner

@mdlincoln mdlincoln commented Feb 25, 2014

These are very helpful clarifications! And I'm glad we were able to help isolate a data bug. I'll be sure to update the visualization once those nodes have been fixed.

@mdlincoln mdlincoln closed this Feb 25, 2014
@VladimirAlexiev

This comment has been minimized.

Copy link
Author

@VladimirAlexiev VladimirAlexiev commented Feb 25, 2014

I've started a doc section 4.5 Data Quality Queries, and the above is subsection 4.5.3 Check For Loops in the Hierarchy. But Getty hasn't yet decided about this.

We're collecting use stories at an internal confluence. You're at number 3 :-)

Actual Usage
Use 1 Integrating EADitor with Getty linked data AAT
Use 2 Using AAT in VRA XForms editor
Use 3 Visualizing Hierarchies with d3js
Use 4 Visualizing with en.lodlive.it
Use 5 AAT as a Modes web termlist

Potential Usage
Story 1 Using GVP LOD in embedded photo metadata
Story 2 LOD for sharing public information
Story 3 Joining collections
Story 4 Current use of controlled vocabularis enabled future exploration in LOD
Story 5 Enriching an entire culture data ecosystem like Europeana
Story 6 Using GVP LOD for Digital Art History

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.