Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ABC(object):
- def __init__(self, query = None, cands = None):
- if query != None and cands != None:
- self.query = query
- self.cands = cands
- self.getIDF()
- def getIDF(self):
- self.i_dict = {}
- for term in query:
- count = 0
- for cand in cands:
- if term in cand:
- count += 1
- self.i_dict[term] = count
- NameError: name 'query' is not defined
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement