def skos_hierarchical_mappings(rdf, narrower=True):
for s, o in rdf.subject_objects(SKOS.broadMatch):<EOL><INDENT>rdf.add((s, SKOS.broader, o))<EOL>if narrower:<EOL><INDENT>rdf.add((o, SKOS.narrowMatch, s))<EOL>rdf.add((o, SKOS.narrower, s))<EOL><DEDENT><DEDENT>for s, o in rdf.subject_objects(SKOS.narrowMatch):<EOL><INDENT>rdf.add((o, SKOS.broadMatch, s))<EOL>rdf.add((o, SKOS.broader, s))<EOL>if narrower:<EOL><INDENT>rdf.add((s, SKOS.narrower, o))<EOL><DEDENT>else:<EOL><INDENT>rdf.remove((s, SKOS.narrowMatch, o))<EOL><DEDENT><DEDENT>
Infer skos:broadMatch/skos:narrowMatch (S43) and add the super-properties
    skos:broader/skos:narrower (S41).

    :param bool narrower: If set to False, skos:narrowMatch will not be added,
        but rather removed.