Python script to count the occurrence of a word over one or more documents.
python3 occurrences.py file [file ...]
Say we have three files:
test1.txt
apple
banana
cake, cake
test2.txt
apple, apple
banana
cake
test3.txt
apple
banana
$ python3 occurrences.py test1.txt
apple 1
banana 1
cake 2
$ python3 occurrences.py test1.txt test2.txt
banana 2
apple 3
cake 3
$ python3 occurrences.py test1.txt test2.txt --maxcount 2
banana 2
$ python3 occurrences.py test1.txt test2.txt test3.txt
banana 3
apple 4
$ python3 occurrences.py test1.txt test2.txt -i test3.txt
cake 3
This project is licensed under the GNU General Public License v3.0