def search_ontology_name(ontology_splited):
    """
    Find the 'name' of the ontology.
    """
    names = []
    for i in range(ontology_splited.__len__()):
        if ontology_splited[i][0] == '!--':
            try:
                variable = ontology_splited[i][1].split('_')[0]
                name = str(variable.split('/')[-1]) + '_'
                try:
                    name = str(name.split('#')[1])
                    names.append(name)
                except:
                    names.append(name)
            except:
                continue
    repetitions = {}
    for j in range(len(names)):
        if names[j] not in repetitions:
            repetitions[names[j]] = 1
        elif names[j] in repetitions:
            value = repetitions[names[j]]
            repetitions[names[j]] = value + 1
    current_value = 0
    for key, value in repetitions.items():
        if value > current_value:
            current_value = value
            ontologyname = key
    return ontologyname
