Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- self.__docs_words = {}
- self.__index = {}
- # wewnatrz indeksu sa listy jak tutaj: self.__index['sell'] = [{'somedoc': 5, 'otherdoc': 13, ...}, 156]
- # przed (wolne!):
- for word in self.__docs_words[doc]:
- try:
- sum_of_mult_wages += (self.__index[word][0][doc]*self.__index[word][0][idoc])
- except KeyError:
- pass
- # po (duuuuzo szybciej):
- for word in self.__docs_words[doc]:
- sum_of_mult_wages += (self.__index[word][0][doc]*self.__index[word][0][idoc])
Add Comment
Please, Sign In to add comment