Skip to content

Commit

Permalink
Merge pull request #342 from ales-erjavec/fixes/bow-binary
Browse files Browse the repository at this point in the history
[FIX] bagofwords: Use vectorized 'BINARY' local weighting
  • Loading branch information
ajdapretnar authored May 4, 2018
2 parents abcec40 + 1aa8ff2 commit ec1745a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion orangecontrib/text/vectorization/bagofwords.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class BowVectorizer(BaseVectorizer):

wlocals = OrderedDict((
(COUNT, lambda tf: tf),
(BINARY, lambda tf: int(tf > 0)),
(BINARY, lambda tf: np.greater(tf, 0, dtype=np.int)),
(SUBLINEAR, lambda tf: 1 + np.log(tf)),
))

Expand Down

0 comments on commit ec1745a

Please sign in to comment.