You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although the examples included in the documentation show absolute frequencies (counts, integers), frequencies can also be expressed in relative form, as a ratio, and then are of type float.
If the dictionary is loaded with relative frequencies, the load_dictionary returns True, but the calls to lookup do not actually work. In fact, the dictionary is not loaded (more precisely: it is empty as shown by a print(list(islice(sym_spell.words.items(), 5)))).
If this issue is related to the type of the frequency data, as I think, then I suggest that it is more clearly indicated in the documentation that the frequencies must be of type integer. It is true that the documentation of the load_dictionary states that the dictionary is a file of word/frequency count pairs , but still my suggestion is that this data type requirement is emphasized.
Alternatively, the loader could be made to convert the frequencies from relative to absolute form.
The text was updated successfully, but these errors were encountered:
Although the examples included in the documentation show absolute frequencies (counts, integers), frequencies can also be expressed in relative form, as a ratio, and then are of type float.
If the dictionary is loaded with relative frequencies, the
load_dictionary
returns True, but the calls tolookup
do not actually work. In fact, the dictionary is not loaded (more precisely: it is empty as shown by aprint(list(islice(sym_spell.words.items(), 5)))
).If this issue is related to the type of the frequency data, as I think, then I suggest that it is more clearly indicated in the documentation that the frequencies must be of type integer. It is true that the documentation of the
load_dictionary
states that the dictionary is a file of word/frequency count pairs , but still my suggestion is that this data type requirement is emphasized.Alternatively, the loader could be made to convert the frequencies from relative to absolute form.
The text was updated successfully, but these errors were encountered: