I made a python project based on markov chains to create sentences. Now I have to make the same thing but in processing. Here is the python code I need help with: def createProbabilityHash(words)
:
def createProbabilityHash(words):
numWords = len(words)
wordCount = {}
for word in words:
if wordCount.has_key(word):
wordCount[word] += 1
else:
wordCount[word] = 1