core: Add a dictionary search function
Context
Add a function to search in a dictionary, independent of the dictionary provider/dictionary actual format.
Similar to a grep -E
.
Can be useful to print the possible words when constructing the grid. For CLI application, it might be useful for platforms without grep
. For GUI application, it may be used to display word candidates in live, although it might be a bit slow since it only relies on the Dictionary
SPI, i.e. a Set<String>
, i.e. not a data structure optimised for fast retrieval, like a Trie
or a pattern cache.
What has changed?
Main Changes
cli
- Added a new
dictionary grep
command
core
- Added a new
SearchDictionaryEntriesUsecase
tests
- Added tests for the new
dictionary-grep
feature
Side Effects
common
- Tackled a TODO in
ProvidedDictionaryDescription
- Introduced a new
Either
class (see Vavr)
core
- Introduced a new
DictionarySelector
to share the dictionary selection logic betweenSearchDictionaryEntriesUsecase
andListDictionaryEntriesUsecase
Edited by Antoine Belvire