I got a crude navigator for the JSON coming out of Pipes here: http://www.ottevanger.plus.com/skos/skos_pipe.html. It doesn't work properly in Mozilla (which won't reload the script when you click a link) but hey, it's a start. There will be much cuter ways to navigate this info but that's not really the point of the test. I will, though, make a pipe that perhaps takes more parameters (e.g. choose to match part vs whole string, look for only broader/narrower/related terms).
Hmm, there are quite a few flaws with the SKOS too (but see above). I fixed some last night - I found that I needed to train Dapper differently for a couple of pages and there was no way of reconciling it without doing two separate dapps. I guess that's not too surprising considering the number and size of some pages, and the fact that there are over 2000 terms each with multiple relationships. It precludes Dapper from being part of a live service, but I already established that there wasn't much sense in that - better to use it as screen scraper and then move on.
Incidentally I, as a total JSON noob, had problems accessing what looked like arrays within the JSON array - for narrower and related terms. I couldn't treat them as arrays but finally, using a tip I found on the O'Reilly forums, took the element, did toString() and split it into a proper array at the commas (I'd tried split before, but it failed without toString()), then I could cycle through the terms. Perhaps repeating the problem here will help others with the same issue.
No comments:
Post a Comment