Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you refactor the source code? #2

Closed
boratonAJ opened this issue Apr 26, 2019 · 1 comment
Closed

Can you refactor the source code? #2

boratonAJ opened this issue Apr 26, 2019 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@boratonAJ
Copy link
Owner

boratonAJ commented Apr 26, 2019

I need to restructure the source code and make it readable. Doing this will improve the quality of the program and optimize the design for agile programming.

#freq[''.join(char for char in word if char.isalnum())] += 1
#print(freq)
#del freq['']
#fo = open(filename[:-3]+'freq', 'w')

# for word_ct in freq.most_common():
# #my_file.write(word_ct[0] + ' ' + str(word_ct[1]) + '\n')
# print(word_ct[0], word_ct[1])
# #for word in sorted(freq.items(), key=freq.get, reverse=True):
# #print(word, freq[word])
# #fo.close()

#
# if len(argv) == 1:
# print('\n\tUsage:\t./wordfreq.py *.txt\n')
# exit()
#
# #for filename in argv[1:]:
# #freq = defaultdict(int)
# #for line in open(filename, encoding='utf-8'):
# #words = line.strip().lower().split(' ')
# #for word in words:
# #freq[''.join(char for char in word if char.isalnum())] += 1
# #for word_ct in freq.most_common():
# #print(word_ct[0], word_ct[1])
# #for word in sorted(freq.items(), key=freq.get, reverse=True):
# #print(word, freq[word])
# #for word_count in sorted(freq.items(), key=lambda kv: kv[1])
# #print(freq)
#

@boratonAJ boratonAJ self-assigned this Apr 26, 2019
@boratonAJ boratonAJ added the enhancement New feature or request label Apr 26, 2019
@boratonAJ
Copy link
Owner Author

Refactoring completed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant