def select_authors_by_epithet(query): """Pass exact name (case insensitive) of epithet name, return ordered set of author ids. """ for epithet, ids in AUTHOR_EPITHET.items(): if epithet.casefold() == query.casefold(): return set(ids)
def get_epithet_index(): """Return dict of epithets (key) to a set of all author ids of that epithet (value). """ _dict = {} for k, v in AUTHOR_EPITHET.items(): _dict[k] = set(v) return _dict
def select_authors_by_epithet(query): """Pass exact name (case insensitive) of epithet name, return ordered set of author ids. """ for epithet, ids in AUTHOR_EPITHET.items(): if epithet.casefold() == query.casefold(): return set(ids)
def get_epithet_index(): """Return dict of epithets (key) to a set of all author ids of that epithet (value). """ _dict = {} for k, v in AUTHOR_EPITHET.items(): _dict[k] = set(v) return _dict
def get_geo_index(): """Get entire index of geographic name (key) and set of associated authors (value). """ _dict = {} for k, v in AUTHOR_EPITHET.items(): _dict[k] = set(v) return _dict
def get_geo_index(): """Get entire index of geographic name (key) and set of associated authors (value). """ _dict = {} for k, v in AUTHOR_EPITHET.items(): _dict[k] = set(v) return _dict
def get_epithet_of_author(_id): """Pass author id and return the name of its associated epithet.""" for epithet, ids in AUTHOR_EPITHET.items(): if _id in ids: return epithet
def get_epithets(): """Return a list of all the epithet labels.""" return sorted(AUTHOR_EPITHET.keys())
def get_epithet_of_author(_id): """Pass author id and return the name of its associated epithet.""" for epithet, ids in AUTHOR_EPITHET.items(): if _id in ids: return epithet
def get_epithets(): """Return a list of all the epithet labels.""" return sorted(AUTHOR_EPITHET.keys())