carpedm20 / carpedm20/word2vec-tensorflow

TypeError: unorderable types: str() > int()

Open
#2 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
45
Forks
24
PR merge metrics
No merged PRs in 30d

Description

Traceback (most recent call last):
File "model.py", line 31, in
w2v.build_vocab(config['corpus'])
File "/home/shark_s/avishkar/deep /example1/Word2Vec.py", line 32, in build_vocab
self.counter.extend([list(item) for item in Counter(words).most_common()
File "/home/shark_s/avishkar/deep /example1/Word2Vec.py", line 33, in
if item[0] > self.min_frequency])
TypeError: unorderable types: str() > int()

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the traceback from model.py line 31, then inspect the comparison in Word2Vec.py lines 32-33 within build_vocab. Confirm what values are compared there and verify that the vocabulary-building run completes without the reported TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.