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

ValueError with fasttext dependency #7

Open
lucpotage opened this issue Sep 5, 2024 · 0 comments
Open

ValueError with fasttext dependency #7

lucpotage opened this issue Sep 5, 2024 · 0 comments

Comments

@lucpotage
Copy link

I got this error when using the lib:

File "/opt/venv/lib/python3.11/site-packages/fastlangid/langid.py", line 105, in predict
  return self._predict_text(text, supplement_threshold=supplement_threshold, k=k, prob=prob, force_second=force_second)
File "/opt/venv/lib/python3.11/site-packages/fastlangid/langid.py", line 62, in _predict_text
  labels, probs = self.model.predict(text, k=max(3, k))
File "/opt/venv/lib/python3.11/site-packages/fasttext/FastText.py", line 239, in predict
  return labels, np.array(probs, copy=False)
ValueError: Unable to avoid copy while creating an array as requested.
If using `np.array(obj, copy=False)` replace it with `np.asarray(obj)` to allow a copy when needed (no behavior change in NumPy 1.x).
For more details, see https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword.

But I see that the dependency was archived. What are the alternatives to detect languages?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant