Search code examples
sparqlsemantic-webfreebasedbpedia

Fashion related content queries (DBpedia or Freebase)


I'm trying to figure out how to make some queries through which I should get fashion related content, like an list of known cloth types, or cloth manufactures, or well known fashion designers. I have spent the last few days trying to figure out to make such an query through DBpedia or Freebase, but I couldn't seem to figure it out. Examples that kinda match what I need I couldn't find...

Can someone help me with this, some short example on which I can start to work on or some tutorials that explain how can I achieve something like this?

Thank you


Later Edit


I have also found that DBpedia contains an ontology property "dressCode" and I've found these pages: http://en.wikipedia.org/wiki/Dress_code_(Western) and http://en.wikipedia.org/wiki/Dress_code which lists some basic dress codes, like "Formal", "Casual"... Now my idea is to get properties from each one of these sub-categories (or what they are defined as on DBpedia, as I see they differ from one other). Any suggestion on how to do this ?


Later Edit


I have managed to make some queries to display some information that could actually help me:

SPARQL - list of social events

SELECT DISTINCT (?label as ?sub) WHERE { { ?sub skos:broader <http://dbpedia.org/resource/Category:Social_events> . ?sub rdfs:label ?label. OPTIONAL {?subsub dcterms:subject ?sub} }
}

SPARQL - list of dress codes

SELECT DISTINCT (?label as ?dressCode) WHERE { { ?dressCode dcterms:subject <http://dbpedia.org/resource/Category:Dress_codes> . ?dressCode rdfs:label ?label. filter(langMatches(lang(?label),"EN")) }
}

Now I would like to retrieve the "subject of" for each dress code so that I can connect somehow the dress codes to the social events, but I'm having issues to do that.


Later Edit


I got to the conclusion that I can't find an ontology that actually matches my needs. Basically I need to get cloth properties based on event types so I can make cloth recommendations. Except the restrictions from the event types I also want to add other properties like the current fashion trend, the season in which the event will take place, geo-location (if possible), and other small details like these. Now I'm trying to use existing ontologies and data that exists on DBpedia & Freebase, like: 'Dress code', 'Event type', 'Colors', 'Fashion designer', 'Fabric', 'Texture', 'Manufacturer', 'Size' and combine them into an ontology which I can actually use in my project to actually make cloth recommendations.

Can anyone help me with some guidelines on how I can do this ? I tried to use Protege to combine some ontologies and extend them after that, but finally I failed to do this.


Solution

  • May be one of the first places you can start with is the DBpedia ontology. When I search for keywords like Fashion, I can see that there are classes like FashionDesigner. So I can check about about the information about fashion designers in DPpedia with a simple SPARQL query like the following using the DPpedia public SPARQL endpoint.

    (a) a list of fashion designers:

    select distinct ?fashionDesigner 
    where {
     ?fashionDesigner a dbpedia-owl:FashionDesigner
    } 
    LIMIT 100
    

    (b) what are the information generally available about a fashion designer

    select distinct ?property
    where {
     ?fashionDesigner a dbpedia-owl:FashionDesigner;
                      ?property ?value .
    
    }
    

    I can also select one of the results of query (a) such as Donna Karan take a look what kind of information she has.

    So now, my task is to see who the well-known fashion designers. I don't know much about fashion but I see some of them have awards. So I can query for the fashion designers who have won awards.

    (c) Fashion designers who have won awards

       select distinct ?fashionDesigner ?award
        where {
         ?fashionDesigner a dbpedia-owl:FashionDesigner;
                 dbpprop:awards ?award .
        } 
    

    I was only using very basic SPARQL queries but you can use more complex queries when you get to know more about the fashion related concepts and properties in the data.

    You can follow a similar approach for classes such as LineOfFashion, Clothing, etc.

    For example (d) a list of clothing manufactures

    select distinct ?company where { ?company dbpedia-owl:product dbpedia:Clothing; dcterms:subject category:Clothing_brands . } LIMIT 100

    The more you explore, you can build better queries. I hope this will help you to get started.