ahmaurya / topics_over_time

Topics over Time implementation
115 stars 46 forks source link

Code duplication issue? #9

Open borice opened 4 years ago

borice commented 4 years ago

Hello,

I am noticing some duplication in the code for tot.py which doesn't seem right.

Lines 32-33 show:

        for line in fileinput.input(stopwords_path):
            stopwords.update(set(line.lower().strip().split()))

which seems to repeat in lines 42-43:

        for line in fileinput.input(stopwords_path):
            stopwords.update(Set(line.lower().strip().split()))

with the difference being the use of Set in line 43 vs the uset of set in line 33.
As far as I know there is no Set construct in Python, so that's likely an error.

I assume the latter code duplicate can be deleted as it's erroneous?