Does the ontology file already contain the index number for each class? If not, then this will be difficult.
Richard > On 3 Feb 2021, at 06:41, mnk.ya...@gmail.com <mnk.yadav...@gmail.com> wrote: > > Can we provide index to classes like Class 1 --1, Class 2--2, and then > creating a file which will have set of all instances belongs to which class. > Actually I wanted to retrieve two files from my ontology. lets say one is > ontology list and other is ontology id. Ontology id contains sets of > instances in the form of indexes. If instance 1 belongs to class 1and > instance 2 is also belongs to class1 1 them ontology id contains 1,1 > > ontology_list2 is all concepts and subconcepts in the ontology, such as > "Symptom" (Concept) or name of symptom (sub-concept) in Figure 2 > and ontology_idx is the concept that a word/term in ontology_list2 belongs > to. This one depends on how you define your ontology's concept. For example, > if I define "Symptom" is concept 1, so all words/ terms belong to "Symptom" > equals 1 in the ontology_idx. > Example are attached > > Actually I am new to ontology and SPARQL. If you can provide me link then > that will be helpful > On Monday, 1 February 2021 at 14:44:17 UTC+5:30 Richard Cyganiak wrote: > Composer doesn't have an output format like this. > > If you know SPARQL, you should be able to write a query that achieves this. > Step 1, write a query that selects the label or URI of all the classes you > want (1 class per line). Step 2, change the query to use SPARQL string > functions to get each line into the 'xxx' format including the single quotes. > Step 3, change the query to use SPARQL's GROUP_CONCAT feature to join all > Iines to one line. > > Richard > > > > >> On 1 Feb 2021, at 06:14, mnk.ya...@gmail.com <http://gmail.com/> >> <mnk.ya...@gmail.com <applewebdata://97FAABEF-ECFA-47C5-BC08-379C2C5CF152>> >> wrote: >> > >> Hello Everyone, >> I am using top braid composer maestro edition and I want to extract all >> classes or subclasses from ontology in a .py file . Content of file should >> be as shown in screen shot attached. >> Anyone Please suggest!! >> > >> -- >> You received this message because you are subscribed to the Google Groups >> "TopBraid Suite Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to topbraid-user...@googlegroups.com >> <applewebdata://97FAABEF-ECFA-47C5-BC08-379C2C5CF152>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/topbraid-users/c09ae5d5-a983-4aa7-811c-6ec1754c7ea6n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/topbraid-users/c09ae5d5-a983-4aa7-811c-6ec1754c7ea6n%40googlegroups.com?utm_medium=email&utm_source=footer>. >> <ontology_list.png> > > > -- > You received this message because you are subscribed to the Google Groups > "TopBraid Suite Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to topbraid-users+unsubscr...@googlegroups.com > <mailto:topbraid-users+unsubscr...@googlegroups.com>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/topbraid-users/7e4a84f2-f1d7-4180-89a2-faacb6d3e8e5n%40googlegroups.com > > <https://groups.google.com/d/msgid/topbraid-users/7e4a84f2-f1d7-4180-89a2-faacb6d3e8e5n%40googlegroups.com?utm_medium=email&utm_source=footer>. > <ontology_list.png><ontology_idx.png> -- You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/85C8C50D-F025-47E4-BC72-AC02C4FE1E15%40topquadrant.com.