vector_space_model/Int/VSM-master/vsm.py
def imp(term,id):
    """Returns the importance of term in document id.  If the term
    isn't in the document, then return 0."""
    if id in postings[term]:
        return postings[term][id]*inverse_document_frequency(term)
    else:
        return 0.0
Returns the importance of term in document id.  If the term
    isn't in the document, then return 0.
Returns the importance of term in document id.  If the term
isn't in the document, then return 0.
Returns the importance of term in document id . If the term isn ' t in the document then return 0 .
def imp(term,id):
    if id in postings[term]:
        return postings[term][id]*inverse_document_frequency(term)
    else:
        return 0.0
def imp ( term , id ) : if id in postings [ term ] : return postings [ term ] [ id ] * inverse_document_frequency ( term ) else : return 0.0
Returns the importance of term in document id.
Returns the importance of term in document id .
"""Returns the importance of term in document id.  If the term
    isn't in the document, then return 0."""
term
id