fix: [punct] analysis is now using the proper token value

This commit is contained in:
Alexandre Dulaunoy 2020-10-19 08:56:28 +02:00
parent afc06a3850
commit b1ddcfa53c
Signed by: adulau
GPG key ID: 09E2CD4944E6CBCD

View file

@ -123,7 +123,7 @@ for token in doc:
redisdb.hincrby("stats", "noun", 1)
continue
if token.pos_ == "PUNCT" and not token.is_oov:
redisdb.zincrby("punct", 1, value)
redisdb.zincrby("punct", 1, "{}".format(token))
redisdb.hincrby("stats", "punct", 1)
continue