def calculateWordVector(self, corpus, tokenizer=Tokenizer().tokenize_word,
                            stemmer=PorterStemmer().stem,
                            stopwords=[], pmids=None):
        wordVector = {}

        if not corpus:
            print "Not corpus is given, " \
                  "so a word vector can not be calculated."

        else:
            if not pmids:
                pmids = self.getPropagatedPMIDs()

            for pmid, qualifier in pmids:
                # Checks to make sure the PubMed article is in the corpus
                # and the qualifier does not contain the word 'NOT'
                if pmid in corpus.docs and "NOT" not in qualifier:
                    # Adds each word to the word vector
                    pmidWordVector = corpus.docs[pmid].getWordVector(
                        tokenizer, stemmer, stopwords)
                    for word in pmidWordVector:
                        # if word not in stopwords:
                        if wordVector in word:
                            wordVector[word] += pmidWordVector[word]
                        else:
                            wordVector[word] = pmidWordVector[word]
        self.wordVector = wordVector

    # Returns the word vector for the node calculated using propagated
    # PubMed IDs
    # @param corpus The corpus that contains the information on the
    # PubMed article
dataset/ETHPy150Open CGATOxford/cgat/scripts/revigo.py/GONode.calculateWordVector/swapped operands of `in`