Question: write a program that takes as input a plain text file containing natural language, and produces a list of each normalized type ( unique token

write a program that takes as input a plain text file containing natural
language, and produces a list of each normalized type (unique token) and the
number of times it appears in the file, sorted from largest to smallest.
The user should be able to type:
myfile.txt ()
And the results should be printed to the screen. E.g.,
$ python normalize_text.py myfile.txt --lower --stem
should produce something like:
the 5000
dog 1204
ran 506
...
and so on. Options that the user can control must include: lowercasing, one of
either stemming or lemmatization, stopword removal, and at least one additional
option you added.In python and CANNOT use external libraries!!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!