Skip to content
This repository was archived by the owner on Aug 19, 2020. It is now read-only.
This repository was archived by the owner on Aug 19, 2020. It is now read-only.

error in Sentiment140_W2V_Pipeline.py label is 1 when used as str  #82

@Sandy4321

Description

@Sandy4321

File "C:\Sander\my_code\sunny-side-up-master_mar7\src\Baseline\Word2Vec\Sentiment140_W2V_Pipeline.py", line 215, in
main(sys.argv[1:])
File "C:\Sander\my_code\sunny-side-up-master_mar7\src\Baseline\Word2Vec\Sentiment140_W2V_Pipeline.py", line 188, in main
model = train_d2v_model(all_data, epoch_num=10)
File "C:\Sander\my_code\sunny-side-up-master_mar7\src\Baseline\Word2Vec\Sentiment140_W2V_Pipeline.py", line 50, in train_d2v_model
ls = LabeledSentence(preprocess_tweet(sentence).split(), [label + '_%d' % neg_count])

TypeError: unsupported operand type(s) for +: 'int' and 'str'

seems to be
label is 1
when used as str
if label == 'pos':
for example
['qqq' + '_%d' % neg_count]
['qqq_0']

is ok

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions