Skip to content

Releases: MycroftAI/lingua-franca

سلام دنیا (Salaam Donya)

23 May 23:44
504897d
Compare
Choose a tag to compare

v0.4.2 contains no breaking changes.

Features

New Languages

Hallo Wereld

05 May 11:08
d876153
Compare
Choose a tag to compare

v0.4.1 is an administrative release. It contains no code changes.

On pypi, it also contains the skipped v0.4.0 release. v0.4.0 release notes follow:

v0.4.0 drops support for Python 3.5, which is EOL. On current versions of Python, this release contains no breaking changes.

Features

New Languages

Functionality

  • lingua_franca.config - will break in v0.5.0 (see note)

    • Adds a config file, currently containing one variable, load_langs_on_demand
    • When lingua_franca.config.load_langs_on_demand is True, LF will allow you to call functions in languages which aren't loaded. In those cases, it will load the language you've called, run the function, and then unload the language. This has pros and cons. Memory consumption is reduced, and you can call LF functions without knowing the language ahead of time, but it's computationally slower than loading the language up front. This is not intended for voice assistants, though a skill or a plugin might use it at its peril.

    NOTE: lingua_franca.config was originally proposed as a proper API, in issue #128. It was temporarily introduced this way because the absence of load_langs_on_demand was blocking certain use cases. Work on the full interface has already begun, and is slated for release in LF v0.5.0. Implementations needing this functionality should expect and be prepared for the interface to change in the future.

    For reference, the permanent API is represented in PR #185, and will likely be: lingua_franca.config.set('load_langs_on_demand', True)

  • (Internal/localization API) New decorator:lingua_franca.internal.lookup_variant() (@lookup_variant(...))

    Native support for enum parameters in localized functions

    A sane parameter in the wrapped function, specified by a sane parameter in the wrapper, will be mapped to an enum, permitting downstream users to call the function without examining a localization's source. The original use case was for localizations that have many ways of expressing the time; coders should be able to specify this using sensibly-named strings, rather than learning about an internal TimeVariant enum and its possible values.

    See the docstring for a clearer demonstration, and lang/format_ca.py for an example in action.

Language-specific:

  • French: Adds support for extract_duration() and datetime formatters (courtesy @bboutier)
  • Dutch: Improves support for extract_duration() (courtesy @bartdw)
  • Polish: Adds support for relative dates, improves support for datetime-related terms (courtesy @r0d0dendr0n)
  • English: Improves support for ordinal numbers: extract_number(n, ordinals=True) returns more intuitive output. Improvements ongoing.

Bugfixes

  • Fixed: parse.extract_datetime() was not normalizing numbers
  • Fixed: parse.extract_duration() was not preserving case
  • Fixed: English normalizer mishandled multi-word numbers, especially as digits ("four thirty seven" --> 437, not [4, 30, 7])
  • Fixed: Localized function wrapper was performing an unnecessary, mildly expensive sanity check every time it was called, even though it only needs to be run when a certain parameter is a nondefault value

Housekeeping

  • Lingua Franca CI moved to GitHub Actions
  • Lingua Franca will no longer install its tests at setup, nor package them on pypi. They remain in source distributions.

Credits

Any contributors to this release who were not mentioned inline should contact the maintainers, so we can edit these release notes (where possible) to reflect your contributions!

Core maintainers for this release cycle were:
@krisgesling
@JarbasAl
@ChanceNCounter

Hola Món

16 Apr 18:13
0adc431
Compare
Choose a tag to compare

v0.4.0 drops support for Python 3.5, which is EOL. On current versions of Python, this release contains no breaking changes.

Features

New Languages

Functionality

  • lingua_franca.config - will break in v0.5.0 (see note)

    • Adds a config file, currently containing one variable, load_langs_on_demand
    • When lingua_franca.config.load_langs_on_demand is True, LF will allow you to call functions in languages which aren't loaded. In those cases, it will load the language you've called, run the function, and then unload the language. This has pros and cons. Memory consumption is reduced, and you can call LF functions without knowing the language ahead of time, but it's computationally slower than loading the language up front. This is not intended for voice assistants, though a skill or a plugin might use it at its peril.

    NOTE: lingua_franca.config was originally proposed as a proper API, in issue #128. It was temporarily introduced this way because the absence of load_langs_on_demand was blocking certain use cases. Work on the full interface has already begun, and is slated for release in LF v0.5.0. Implementations needing this functionality should expect and be prepared for the interface to change in the future.

    For reference, the permanent API is represented in PR #185, and will likely be: lingua_franca.config.set('load_langs_on_demand', True)

  • (Internal/localization API) New decorator:lingua_franca.internal.lookup_variant() (@lookup_variant(...))

    Native support for enum parameters in localized functions

    A sane parameter in the wrapped function, specified by a sane parameter in the wrapper, will be mapped to an enum, permitting downstream users to call the function without examining a localization's source. The original use case was for localizations that have many ways of expressing the time; coders should be able to specify this using sensibly-named strings, rather than learning about an internal TimeVariant enum and its possible values.

    See the docstring for a clearer demonstration, and lang/format_ca.py for an example in action.

Language-specific:

  • French: Adds support for extract_duration() and datetime formatters (courtesy @bboutier)
  • Dutch: Improves support for extract_duration() (courtesy @bartdw)
  • Polish: Adds support for relative dates, improves support for datetime-related terms (courtesy @r0d0dendr0n)
  • English: Improves support for ordinal numbers: extract_number(n, ordinals=True) returns more intuitive output. Improvements ongoing.

Bugfixes

  • Fixed: parse.extract_datetime() was not normalizing numbers
  • Fixed: parse.extract_duration() was not preserving case
  • Fixed: English normalizer mishandled multi-word numbers, especially as digits ("four thirty seven" --> 437, not [4, 30, 7])
  • Fixed: Localized function wrapper was performing an unnecessary, mildly expensive sanity check every time it was called, even though it only needs to be run when a certain parameter is a nondefault value

Housekeeping

  • Lingua Franca CI moved to GitHub Actions
  • Lingua Franca will no longer install its tests at setup, nor package them on pypi. They remain in source distributions.

Credits

Any contributors to this release who were not mentioned inline should contact the maintainers, so we can edit these release notes (where possible) to reflect your contributions!

Core maintainers for this release cycle were:
@krisgesling
@JarbasAl
@ChanceNCounter

v0.3.1 Witaj świecie II

04 Nov 04:41
ebfe39f
Compare
Choose a tag to compare

Hotfix: Patches a severe bug in v0.3.0 causing default arguments to throw DeprecationWarnings.

Also fixed:

  • Czech tests were re-running tests from other languages (@Tony763)
  • Hard-to-reach bug in a warning routine
  • Ensure key files are included in source distribution packages

Version 0.3.0 release notes follow:


v0.3.0 of Lingua Franca brings a significant restructure to the code base courtesy of @ChanceNCounter. This provides a strong basis for adding new languages and expanding the available functions.

Anyone interested in contributing to Lingua Franca, please see the new project-structure.md. This covers the new file structure, how to add localized versions of existing functions, and how to add new top-level functions. The primary README.md also contains a detailed step by step guide to get started contributing to the project.

This version also brings initial support for the Polish language, courtesy of @rafaljanicki.

Breaking change:

  • You must now explicitly load one or more languages. Functions will default to whichever language is loaded first, unless a new default is specified.

    lingua_franca.load_language('en')          # 'primary' lang code (package's terminology)
    lingua_franca.load_language('pt-pt')       # full lang code
    lingua_franca.load_languages(['en', 'es']) # multiple languages at once, first will be default
    lingua_franca.set_default_lang('es')       # self-explanatory

Deprecated:

  • Explicitly passing None for arguments (eg lang=None) in order to fallback to a default is no longer supported. This was previously included to handle some edge case in Mycroft-core that no longer exists. If no lang is passed then the default language will be used.
  • Direct imports from lingua_franca.lang have been deprecated. Getter and setter methods are now available to perform these functions.

Other:

  • Code is now tested against Python 3.9. Please note that Python 3.5 support will soon be dropped as it has reached end of life.
  • Thanks also to @YuukanOO for improvements to extract_number() across a number of languages.

v0.3.0 Witaj świecie

03 Nov 07:29
7ffb650
Compare
Choose a tag to compare

v0.3.0 of Lingua Franca brings a significant restructure to the code base courtesy of @ChanceNCounter. This provides a strong basis for adding new languages and expanding the available functions.

Anyone interested in contributing to Lingua Franca, please see the new project-structure.md. This covers the new file structure, how to add localized versions of existing functions, and how to add new top-level functions. The primary README.md also contains a detailed step by step guide to get started contributing to the project.

This version also brings initial support for the Polish language, courtesy of @rafaljanicki.

Breaking change:

  • You must now explicitly load one or more languages. Functions will default to whichever language is loaded first, unless a new default is specified.

    lingua_franca.load_language('en')          # 'primary' lang code (package's terminology)
    lingua_franca.load_language('pt-pt')       # full lang code
    lingua_franca.load_languages(['en', 'es']) # multiple languages at once, first will be default
    lingua_franca.set_default_lang('es')       # self-explanatory

Deprecated:

  • Explicitly passing None for arguments (eg lang=None) in order to fallback to a default is no longer supported. This was previously included to handle some edge case in Mycroft-core that no longer exists. If no lang is passed then the default language will be used.
  • Direct imports from lingua_franca.lang have been deprecated. Getter and setter methods are now available to perform these functions.

Other:

  • Code is now tested against Python 3.9. Please note that Python 3.5 support will soon be dropped as it has reached end of life.
  • Thanks also to @YuukanOO for improvements to extract_number() across a number of languages.

v0.2.3 Hallo Welt

23 Oct 04:20
85fbc12
Compare
Choose a tag to compare

This is the final v0.2.x release and provides a few improvements and fixes that are fully compatible with prior versions. The next v0.3.0 release will include a major refactor so upgrades from this release should be well tested.

Improvements:

  • extract_duration() runtime reduced by combining regexes (fixed by @maxbachmann in PR #124)
  • Installation instructions clarified to suggest the users install wheel and pytest (by @adocampo in PR #115)

Fixes:

  • A debug print left in the code by mistake (fixed by @maxbachmann in PR #123)
  • SyntaxWarning caused by inappropriate use of 'is' in a formatter (fixed by @PureTryOut in PR #127)

Typos:

  • German translations of "eighteen" and "eighty" were misspelled (fixed by @domcross in PR #129)

v0.2.2 Saluton Mondo

11 Aug 05:12
507a07b
Compare
Choose a tag to compare

This release contains two hotfixes and a new localization. No breaking changes.

Fixes:

  • Bug: In certain languages, parse.extract_datetime() returns 08:00 when no datetime is found, instead of returning None (Issue #117, PR #118)
  • Error: SyntaxWarnings in newer Python releases, caused by misuse of is in lingua_franca.format (PR #112)

New Localizations:

  • parse.extract_duration() localized for German/primary lang code de (PR #119)

Contributors:

and a big thanks to @ChanceNCounter for facilitating the release!

v0.2.1 Hola Mundo

23 Mar 15:57
Compare
Choose a tag to compare

This release fixes a couple of issues regarding extracting numbers.

  • Handle capital letters properly #85
  • Fix issue with leading hundreds #86
  • Fix even multiples of 10 #81
  • Make language versions of extract_number use the same signature #77

In addition a couple of other minor fixes:

  • Fix pronounce_number for numbers < 1.0
  • Fix broken Spanish test #78

v0.2.0 Hej världen

13 Jan 07:53
Compare
Choose a tag to compare

Sync with mycroft-core changes.

  • Improved Swedish datetime parsing
  • Fix handling % characters for English and Portuguese
  • Improved Spanish datetime parsing

v0.1.0 Bom Dia

30 Oct 06:32
2f66518
Compare
Choose a tag to compare

The first official release of Lingua Franca as a stand alone package.