def get_paths(corpus, x, y, pattern):
    """
    Returns the paths between (x, y) term-pair
    :param corpus: the corpus resource object
    :param x: the X entity
    :param y: the Y entity
    :param pattern: path patterns to exclude (e.g. satellites)
    :return: all paths between (x, y) which do not match the pattern
    """
    x_to_y_paths = corpus.get_relations(x, y)
    paths = [path_id for path_id in x_to_y_paths.keys() if pattern.match(corpus.get_path_by_id(path_id))]
    return paths