Skip to content

Releases: LlmKira/fast-langdetect

pypi_1.0.0 Reduce implicit fallbacks

17 Sep 06:32
9a828e4

Choose a tag to compare

⚠️ Breaking change

Please check README for details of the changes.

Keep it simple, keep it stupid.

from fast_langdetect import detect

-result = detect("Olá mundo", low_memory=False)
-print(code_to_english_name(result["lang"]))  # Portuguese (Brazil) or Portuguese

+result = detect("Olá mundo", model='full', k=1) # Just use it!
+print(code_to_english_name(result[0]["lang"]))  # Portuguese (Brazil) or Portuguese
config = LangDetectConfig(
-allow_fallback=False,  # It introduces unnecessary confusion
custom_model_path=None,
cache_dir=tempfile.gettempdir(),
)

I miss allow_fallback...

You can implement the old allow_fallback func through composition, so that you can freely control the error handling logic.

try:
   return detect("Olá mundo", model='full', k=1) 
except: 
   return detect("Olá mundo", model='lite', k=1) 

What's Changed

  • fix: wrongly fallback to low memory model when model corrupted by @JackyHe398 in #20
  • 🔧 fix: bump version to 0.4.0 for new features and improvements by @sudoskys in #21
  • ♻️ refactor(tests/infer): Unify detect functions, make the API more intuitive and avoid implicit fallbacks by @sudoskys in #22

New Contributors

Full Changelog: pypi_0.3.2...pypi_1.0.0

pypi_0.3.2 Improve predictions for uppercase English input

29 Mar 06:51
f4fc032

Choose a tag to compare

No breaking changes, but added deprecation warnings

What's Changed

  • ✨ feat(app): improve language detection by normalizing input by @sudoskys in #15
  • ✨ feat(app): [Compatibility] add input normalization to language detection by @sudoskys in #16

thanks to @benmayersohn

Full Changelog: pypi_0.3.1...pypi_0.3.2

pypi_0.3.1 Optimize model loading

04 Mar 02:33
39426da

Choose a tag to compare

What's Changed

  • 🔧 fix(model): enhance Windows model loading with robust path handling by @sudoskys in #13

thanks @KamioRinn

Full Changelog: pypi_0.3.0...pypi_0.3.1

pypi_0.3.0 More user-friendly customization

03 Mar 03:07
4fffd3a

Choose a tag to compare

Breaking Changes in v0.3.0 🔄

A significant update focused on improving Windows compatibility and configuration management.

Major Changes

  • Configuration System Overhaul
    • Replaced environment variables with a dedicated configuration class
    • Please refer to the README or unit tests for migration details

Windows Compatibility Enhancement 🪟

To address FastText's ASCII path limitation on Windows, we've implemented a more robust solution:

  • Now using tempfile to create a temporary copy of the model
  • Model loading from temp location ensures compatibility regardless of Windows username or path
  • This change prevents FastText path-related issues commonly encountered on Windows systems

Migration Required(?) ⚠️

Backwards compatibility implemented.
But if you were using hack methods for operations, please update your implementation to use the new configuration class.

For detailed implementation examples, check our test cases

Full Changelog: pypi_0.2.5...pypi_0.3.0

pypi_0.2.5 support Python313

28 Jan 02:14
2f82a1a

Choose a tag to compare

pypi_0.2.4 logger.warn when MD5 mismatch

11 Jan 12:36
364d4f5

Choose a tag to compare

What's Changed

  • ✨ feat(app): add MD5 verification for FastText model integrity by @sudoskys in #9

Full Changelog: pypi_0.2.3...pypi_0.2.4

pypi_0.2.3 No `numpy` required

09 Jan 10:22
2de37bb

Choose a tag to compare

pypi_0.2.2 Support offlilne usage

29 Sep 05:07
5728ba9

Choose a tag to compare

What's Changed

  • (feat): Add small model lid.176.ftz to library resources, for offline use by @sudoskys in #5

New Contributors

Full Changelog: pypi_0.2.1...pypi_0.2.2

pypi_0.2.1 numpy <2.0.0

08 Jul 08:30
525a675

Choose a tag to compare

pypi_0.2.0 Trim the unnecessary modules.

06 Jul 08:44
17b159a

Choose a tag to compare