Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1.     lista=[]
  2.     temp = None
  3.     for concept in uql:
  4.         print concept
  5.         for element in dckf:
  6.             print element
  7.             conid=element["con_id"]
  8.             docid=element["doc_id"]
  9.             keyid=element["key_id"]
  10.         if not temp:
  11.         temp={"doc_id": 0}
  12.             if conid==concept["con_id"] and keyid in concept.keys():
  13.                 if docid!=temp["doc_id"] :
  14.                     temp={"doc_id": docid, "con_id": conid}
  15.                     lista.append(temp)
  16.                 temp[keyid]=concept[keyid]*element["freq"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement