Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fast text example ValueError: could not convert string to float: #1582

Closed
yogendrasoni opened this issue Nov 15, 2017 · 2 comments
Closed

fast text example ValueError: could not convert string to float: #1582

yogendrasoni opened this issue Nov 15, 2017 · 2 comments
Labels
examples Code examples in /examples

Comments

@yogendrasoni
Copy link
Contributor

yogendrasoni commented Nov 15, 2017

 vector = numpy.asarray([float(v) for v in pieces[1:]], dtype='f')

ValueError: could not convert string to float:

rtrim line before rsplit is solving this issue
pieces = line.rstrip().rsplit(' ',nr_dim)

Info about spaCy

  • Python version: 2.7.13
  • Platform: Linux-4.4.75-loc-x86_64-Intel-R-_Xeon-R-CPU_E5-2630_v3@_2.40GHz-with-slackware-14.2
  • spaCy version: 2.0.2
  • Models: en-1.1.0, en_core_web_lg, en_vectors_web_lg, en_glove_cc_300_1m_vectors-1.0.0, en, cache, en_core_web_md
@yogendrasoni yogendrasoni changed the title fast text example is showing error fast text example ValueError: could not convert string to float: Nov 15, 2017
@ines ines added the examples Code examples in /examples label Nov 15, 2017
@ines
Copy link
Member

ines commented Nov 15, 2017

Thanks for the report and solution! Do you want to submit a pull request for this?
(If not, we're also happy to take care of fixing this later.)

@ines ines closed this as completed in 9177c7d Nov 15, 2017
@lock
Copy link

lock bot commented May 8, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
examples Code examples in /examples
Projects
None yet
Development

No branches or pull requests

2 participants