Depiction vs. Depicts - xhtml

I'm working with FOAF and RDFa, and struggling to figure out whether I should be using foaf:depiction or foaf:depicts and the correct way to use them. Here's what I've already established:
<div class="profile" typeof="foaf:Person">
<p>Employee Name: <span property="foaf:name">Fred Flintstone</span></p>
<p><img src="http://www.example.com/fred.jpg" alt="Photo of Fred Flintstone" /></p>
</div>
I understand that depicts and depiction are inversely related. I've searched across the vast reaches of the Internet but can't find any concrete examples. From what I've read, Image depicts Person, so I'm feeling inclined to use foaf:depiction because my subject is Person, but I'm not sure how to do so correctly. Rel or rev? On the image itself or on the enclosing paragraph?

Looks like I'm dealing with a niche subject. I've done some more searching and reading, and I think I found my answer here: http://www.w3.org/TR/2008/WD-xhtml-rdfa-primer-20080317/#using-src-on-img.
To summarize, my suspicions on the terminology were correct:
Image -> depicts -> Person
Person -> depiction -> Image
However, the foaf:img property is a more specific term than merely depiction specifically for relating a Person to the Image which represents them. So it would have been correct to use rel="foaf:depiction", it is more correct (in my situation) to use rel="foaf:img".
Here's the final code:
<div class="profile" typeof="foaf:Person">
<p>Employee Name: <span property="foaf:name">Fred Flintstone</span></p>
<p rel="foaf:img" rev="foaf:depicts"><img src="http://www.example.com/fred.jpg" alt="Photo of Fred Flintstone" /></p>
</div>
The rev attribute specifies the reverse relationship of the image back to the person. This solidifies that there is a mutual relationship between these objects, and not a one-sided relationship.
So whether it is correct to use rel or rev depends on what your subject is. If I had a foaf:Image and with a list of multiple people in the image, the correct markup would be rel="depicts".
It's a shame that many examples were removed in future version of the RDFa Primer, but fortunately all previous versions are retained for the future.

Scott - the answer is that depicts and depiction are inverse properties of each other, as you found out, it is defined like this in the FOAF spec:
<rdf:Property rdf:about="http://xmlns.com/foaf/0.1/depicts" rdfs:comment="A thing depicted in this representation.">
[...]
<owl:inverseOf rdf:resource="http://xmlns.com/foaf/0.1/depiction"/>
This means that if you have proper inference in your store, it doesn't matter which one you use, they should both appear.
FOAF uses a few things like that, primaryTopic/isTopicOf, topic/page, maker/made, etc.
FOAF also makes use of inverseFunctionalProperties, i.e. properties where a certain value is tied uniquely to a single person. The usual example is mbox, if you find two FOAF Person entities with the same email address, you can infer that they are actually the same person, since they are uniqiuely identified by their email address.

Related

Should screen reader announce short form label or long form value?

I have an Australian state dropdown.
The label is like ACT, VIC, NSW (short form)
But the value is like Australian Capital Territory, Victoria (long form)
Should the screen reader announce the short form or the long form?
First of all, it's nearly always a bad idea to have a difference between what is written and what is spoken, for at least two reasons:
Blind people aren't the only ones to use screen readers. There are also partially sighted people, people with dyslexia or cognitive impairments. For these people you create a useless contradiction in their brain.
In braille, should you consider the written text because braille is a form of writing, or the accessible label (corresponding to the spoken text)? All screen readers don't answer equally to this question and/or have settings to decide
Now, you could certainly ask what is the best to show in your list: the short or the long form, independently of pure design constraints.
For this question, there is no definitive answer best suited for all cases.
In fact you have four possibilities:
Short form alone, i.e. "VIC"
Long form alone, i.e. "Victoria"
Both, short form first, then long form, such as "VIC - Victoria"
Both, long form first, then short form, such as "Victoria (VIC)"
The following points can help you decide:
How many elements there are in the list ? 5, 10, 20, 50, 100, more ? The more elements there are, the less it's intuitive to use short form only
Can the user type the first letters of the short and/or long form in order to quickly find the corresponding element in the list ? Only the very first letter, or several (possibly three or four) ? Above 10 or 15 elements, you should almost always allow full letter navigation and not only the first letter
How well are the abbreviations known to the users ? Are they used to using them ?
What are users usually writing and expect to read?
How similar the short form compared to the long one ? e.g. difficulty to find "Victoria" only based on the abbreviation, if it is "VIC" compared to if it was something less obviously related like "VCT".
You are talking about Australian states. I don't know Australia at all, but I assume that there aren't more than a few dozens options, and if your site is mostly made for Australians, they are certainly used to the short form.
So it shouldn't be a major problem to keep the short form only.
If you want to be more foreigner-friendly, you might have both.

GraceNote - generate playlist with music of a given country

I would like to use GraceNote to generate play-lists which contain songs likely to appeal to, or, at least, be known to, residents of a given country. E.G, Japan, Korea, Turkey, Brazil, France ...
They don't necessarily have to be in the local language, as I don't think that I can do that with GraceNote (can I ?), but local artists would be nice. Is there any way, for instance, to query and generate a playlist using artist origin?
I realize that something like Gangnam Style might be known in most countries ;-) and that play-list generation is inexact when used this way, but I would be happy with a 70 or 80% "I know that song" reaction.
Can it be done? If so, how? #cweichen, can you help?
It seems likely you are referring the the Rhythm API. As you probably can see from the function definition, you cannot create a playlist using 'ARTIST_ORIGIN'.
The closest thing I can think of is creating a playlist (aka radio station) using on a popular song in the given country as a seed.
You may try configuring the 'focus_similarity' value to get a wider variety of songs. This is just a suggestion and I am not sure if this will get you what your looking for.
*Pygn currently does not support 'focus_similarity' configuration but it should not be too difficult to add yourself.

Getting the best category for a topic in Freebase

How to get the best (top) category for a topic ?
For example the movie "Life Is Beautiful" has a notable type "Award-Winning Work". I can not use this category. I'd like to know that, over all categories, the best choice is "/film/film" and not "/award/award_winning_work".
Is it possible to get the top category for a item ?
Thanks for your ideas,
Mickael.
#TomMorris: Yes, "category" in my context, means "type".
But for a particular topic, there could be many many types and I don't know which to choose without actually making some choices, for example decide that if "/film/film" is present, then it is the best category for my topic.
I would have imagined that Freebase would provide this "main type" out of the box. If you read the description of notable_type you can read "The way a topic's notable types is calculated is rather complex." If Freebase provide this service that requires complex calculation, then why not provide another service that would be something like a "main type" that would be the top type, that is, the top of the ontonlogy classification (a caniche is a dog which is a animal, etc... and somewhat stop at a significant level like "animal" that I would consider as my "main type"). Simply put, "Award Work" is not a good description of the topic "Life is beautiful". "Film" is a better description of it.
I am afraid you're right. I need to make my own choices betwwen all the "types" of the topics.
I don't know if you refer to the the dumps or to one of the Api's.
Regarding the API's please check the search API (link below). There results includes score and notable type which attempts to indicate what is the most relevant entity with the name you are looking for. You can also include additional properties in the results but this is the basic result.
Regarding working directly from the dumps - I haven't found a solution for that except of implementing some mechanism myself.
https://www.googleapis.com/freebase/v1/search?query=Life+is+beautiful&limit=10

Categories of tags

I'm starting a pro bono project that is the web interface to the world's largest collection of lute music and it's a challenging collection from several points of view. The pieces are largely from 1400 to 1600, but they range from the mid-1200's to present day. Needless to say, there is tremendous variability in how the pieces are categorized and who they are attributed to. It is obvious that any sort of rigid, DB-enforced hierarchy isn't going to work with this collection, so my thoughts turn to tags.
But not all tags are the same. I'll have tags that represent a person/role (composer, translator, entabulator, etc.), tags that represent the instrument(s) the piece in written for, and tags that represent how the piece has been classified by any one of half a dozen different classification systems used over the centuries.
We will be using a semi-controlled tag vocabulary to prevent runaway tag proliferation (e.g. del.icio.us), but I want to treat the tags as belonging to different groups. People tags should not be offered when the editor is doing instrument tagging, etc.
Has anyone done something like this? I have several ways I can think of to do it, but if there is an existing system that is well-done it would save me time implementing/debugging.
FWIW: This is a Django system and I'm looking at starting with Django-tagging and then hacking from there, possibly adding a category field or ...
There's an issue #14 for django-tagging filed back in 2007 which is trying to address this problem. Don't know whether developers are planning to add this feature or not.
However, there's a machinetags branch of django-tagging mantained by Gregor Müllegger here at https://code.launchpad.net/~gregor-muellegger/django-tagging/machinetags/. It allows to assign tags namespaces (and/or values), and facilitate querying tags by namespace / value. So you'd be able to tag a piece with instrument:<instrument_name> or instrument=<instrument_name>, for example.
It's mostly in sync with the django-tagging trunk (the latest commit is there's a number of commits missing though). I remember myself working on some project using that branch about a year ago; it worked fine. Read the documentation on branch and comments on the issue for more details.

Website Layout Statistics

I have a client who has suggested laying out a long list of categories in a custom order. The order is to be decided by them based on product items they sell the most etc.
I tend to disagree and feel that people browsing the internet prefer to search lists of categories that are in alphabetical order or sorted by something they can take reference of such as a date.
I would like to know others thoughts on this and it would be appreciated if anyone could point me in the direction of any open source surveys that have been taken in this area.
Thanks
Ben
What a silly stance to take regarding a simple customer request. Allow for both orderings, and other ones too. There is no survey that will demonstrate that the client is wrong as they are - by definition - correct.
Code that allows for different orderings has greater utility anyway, and real user data will be able to show them which - if either - should be the default.

Resources