I want to make a Name Entity Recognizer using wikipedia Data, I need to get all the super classes of a word to see in which category (Place, Human, Organization or None) the word is. I surfed the Internet a lot and find some pages like :
which when I execute the query results "No matching records found" even with the word mentioned in the page and trying other namespaces. and:
which is very similar to my work, but I get the "No matching records found" result too.
I think the queries mentioned in these links are logically correct, but I have no idea why they results nothing for me. I also tried to learn SPARQL by examples mentioned in these sites :
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries
and I didn't find anything for finding super classes of a word.
There are some examples of the codes which I didn't get result:
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX ns:<http://dbpedia.org/>
SELECT ?subClass ?label WHERE {
?subClass rdfs:subClassOf ns:Albert .
?subClass rdfs:label ?label . }
or:
SELECT * WHERE {
dbpedia:Albert a ?c1 ; a ?c2 .
?c1 rdfs:subClassOf ?c2 .
}