Assign 0 to certain words when the words are not present
This is my first ever post on stackoverflow and am I am total fresher to coding. So, please bear with me. I am working on an experiment which has two sets of data documents. Doc1 is as follows: TOPIC:topic_0 5892.0 site 0.0371690427699 Internet 0.0261371350984 online 0.0229124236253 web 0.0218940936864 say 0.0159538357094 image 0.015105227427 TOPIC:topic_1 12366.0 Mr 0.150331554262 s 0.0517548115801 say 0.0451237263464 TOPIC:topic_2 .... ..... ..... TOPIC:topic_3 1066.0 say 0.062 word 0.182 and so on till 100 topics. In this document, there are words that are either present in all the topics