Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

String frequency support #1989

Merged

Conversation

toasted-nutbread
Copy link
Collaborator

@toasted-nutbread toasted-nutbread commented Oct 15, 2021

This change restores support for importing and using* string frequencies which was previously removed in #1943.
* If the string does not contain a number that can be parsed, the numeric frequency value will be 0.

Additionally, dictionary authors can now specify frequency values in the form {"value": (number), "displayValue": (string)}, which allows for providing an explicit numeric value to go with the string value that is presented to the user. See the updated frequency definitions in:

Examples:

Resolves #1984.

@toasted-nutbread toasted-nutbread merged commit 75aabd9 into FooSoft:master Oct 15, 2021
toasted-nutbread added a commit that referenced this pull request Oct 15, 2021
* Restore support for string frequency values

* Add support for {value, displayValue} frequencies

* Update test data

* Improve number parsing of string frequencies

* Improve reading detection

* Expose a displayValue property for frequency information

* Update docs

* Expose displayValue to Anki note data

* Fix translator

* Update display generation

* Update test data

* Update counts
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some frequency dictionaries no longer working
1 participant