code: def index_ontology(self, ont):
          
          self.merged_ontology.merge([ont])
          syns = ont.all_synonyms(include_label=True)
          
          include_id = self._is_meaningful_ids()
          logging.info("Include IDs as synonyms: {}".format(include_id))
          if include_id:
              for n in ont.nodes():
                  v = n
                  # Get fragment
                  if v.startswith('http'):
                      v = re.sub('.*/','',v)
                      v = re.sub('.*#','',v)
                  syns.append(Synonym(n, val=v, pred='label'))
          
          logging.info("Indexing {} syns in {}".format(len(syns),ont))
          logging.info("Distinct lexical values: {}".format(len(self.lmap.keys())))
          for syn in syns:
              self.index_synonym(syn, ont)
          for nid in ont.nodes():
              self.id_to_ontology_map[nid].append(ont)
docs: Adds an ontology to the index
  
          This iterates through all labels and synonyms in the ontology, creating an index