Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Fix getNN in python bindings to avoid 'utf-8' codec can't decode error. #967

Closed
wants to merge 1 commit into from

Conversation

tmramalho
Copy link

This earlier commit fixed issue #715 by casting all strings to Python strings. However, this functionality was not added to getNN and I was seeing the same error when querying nearest neighbors for Japanese language. This commit simply adapts castToPythonString to the get NN function.

@facebook-github-bot
Copy link
Contributor

Hi tmramalho! Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file.In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Celebio has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@Celebio merged this pull request in 3b25b87.

adrianeboyd pushed a commit to adrianeboyd/fastText that referenced this pull request Aug 4, 2021
…r. (facebookresearch#967)

Summary:
This [earlier commit](facebookresearch@e13484b) fixed issue facebookresearch#715 by casting all strings to Python strings. However, this functionality was not added to getNN and I was seeing the same error when querying nearest neighbors for Japanese language. This commit simply adapts castToPythonString to the get NN function.
Pull Request resolved: facebookresearch#967

Reviewed By: EdouardGrave

Differential Revision: D19287807

Pulled By: Celebio

fbshipit-source-id: 31fb8b4d643848f3f22381ac06f2443eb70c0009
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants