Skip to content

'float' object cannot be interpreted as an integer #2

@n0thing23333

Description

@n0thing23333

When execute the encode function, the following error occurs:


TypeError Traceback (most recent call last)
in
----> 1 m.encode(['123','456'], tokenize=True)

/apps/dataiku-data/jupyter-run/dku-workdirs/MARRIOTT/SentEncoding/master.py in encode(self, task_data, tokenize, use_norm)
261 for l in ds.keys():
262 numbatches = len(ds[l]) / self.conf['option']['encode_bs'] + 1
--> 263 for minibatch in range(numbatches):
264 caps = ds[l][minibatch::numbatches]
265

TypeError: 'float' object cannot be interpreted as an integer

Solved:
Cannot encode words outside dictionary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions