Dears, I have a query like this: ----------- SELECT DISTINCT ?o WHERE { ?s ?p "Notebook". ?s <http://www.w3.org/TR/html4/Class1> | <http://www.w3.org/TR/html4/Class2> ?o .} -----------
This way I can query all classes related to class "Notebook". e.g, Notebook - Teacher, Notebook - Student, etc. And, when I run the same query with "Teacher" I get all the classes related to class "Teacher", e.g Teacher-Notebook, Teacher-Evaluation, etc. My question here is if I can query in a form of 2-grams here, I mean how can I get all the classes that comes after Teacher - Notebook - *, or for example Evaluation - Teacher - * . I am trying to use 2-grams in order to get domain-relevant classes, because when querying related classes only with one class returns not relevant classes as well, for instance, Notebook - Accountant, Evaluation - Movie (classes that are not relevant to education in this case), etc. So I want to use -grams here to get domain-relevant classes. Thank you for your support.