Hi, everybody
I am doing a systematic literature review and I copied all the references used in my sample. I would like to identify the most common words in order to identify the authors most citted. I did this so far:
I am doing a systematic literature review and I copied all the references used in my sample. I would like to identify the most common words in order to identify the authors most citted. I did this so far:
import sys
print(sys.argv[1])
f = open(sys.argv[1])
my_file_contents = f.read()
#print(f.read())
def word_count(str):
counts = dict()
words = str.split()
for word in words:
if word in counts:
counts[word] += 1
else:
counts[word] = 1
return counts
print(word_count(my_file_contents))I was able to identify every word's number, but I do not know how to present from the terms with the most frequent to the fewer ones. Can somebody help me?
nilamo write Feb-05-2021, 08:30 PM:
Please use python tags in the future
Please use python tags in the future
