carpentries-incubator / workflows-snakemake

One-day Snakemake workshop.
https://carpentries-incubator.github.io/workflows-snakemake/
Other
9 stars 12 forks source link

wordcount.py files counts words ~twice #84

Open KasperThystrup opened 3 years ago

KasperThystrup commented 3 years ago

Minor issue: It seems that wordcount.py doubles the frequency of each word. e.g. for isles.txt the word me exists 16 times, while its frequency is registered to 33 in isles.dat.

ammaraziz commented 3 years ago

Hi,

I think the wordcount.py is counting correctly. If you search for me (note the spaces) then the count is 16. However, if you search for me but match whole word the count is 33. We can use grep to double check the counts:

grep -wc "me" isles.txt 
33

Thanks,

Ammar