def check_word(p, tok=None, dep=None, up_tok=None, up_dep=None, precede=None):
    """
    Returns an indicator and a marker
    If parameters match any word in the sentence:
        returns 1, markers for each occurance
    Else:
        returns 0, []
    """
    toks = []
    for ind, x in enumerate(p):
        if tok != None and x['tok'].lower() not in tok:
            continue
        if dep != None and x['dep'] not in dep:
            continue
        if up_tok != None and ('up' not in x or p[x['up']]['tok'].lower()
             not in up_tok):
            continue
        if up_dep != None and p[x['up']]['dep'] not in up_dep:
            continue
        if precede != None and (len(p) <= ind + 1 or p[ind + 1]['tok'] not in
            precede):
            continue
        if up_tok != None:
            toks += [[(x['tok'], ind), (p[x['up']]['tok'].lower(), x['up'])]]
        else:
            toks += [[(x['tok'], ind)]]
    if toks != []:
        return 1, toks
    else:
        return 0, []
