Summary: Rückgängig gemacht auf den Stand vom 2013-08-24 11:21 UTC
< (defun crossword-WikiModes (pattern)
< "WikiModes for words matching a pattern of letters in a crossword.
> (defun crossword-search (pattern)
> "Search for words matching a pattern of letters in a crossword.
< WikiModeses for matches in the `dict-english' English
> Searches for matches in the `dict-english' English
< (let ((words (dictree-regexp-WikiModes
> (let ((words (dictree-regexp-search
These dictionary tree data structures are a hybrid between Tries and hash tables.
The data is stored in a trie, but results of queries that take particularly long to retrieve are cached in hash tables, which are automatically kept synchronised with the tree. The package also provides persistent storage of the data structures in files, automatic saving, using multiple dictionary trees together as a combined meta-dictionary, and various other convenience features.
The development version is hosted in the same git repository as PredictiveMode. Note that the git repository URL is a git repository, not a web-site. You cannot view it in a web browser. To grab the latest development version, clone the repository using:
git clone http://www.dr-qubit.org/git/predictive.git
Please send bug reports and suggestions to email@example.com (you can post them here as well if you like, of course). I don’t check this page regularly, so anything not emailed to me is likely to languish here unnoticed for some time.
The following command might help when solving crosswords. Note that, for this to work, you’ll either need the English dictionary from the PredictiveMode package, or you’ll need to create your own dictionary and name it dict-english (or modify the code below to use a different dictionary name):
(defun crossword-search (pattern) "Search for words matching a pattern of letters in a crossword. Use \".\" (without quotes) in place of unknown letters. When called interactively, matching words are displayed in the \"*Crossword matches\" buffer. Searches for matches in the `dict-english' English dictionary. Returns a list of words that match the pattern." (interactive "sCrossword pattern (use \".\" in place of unknown letters): ") (unless (dictree-p dict-english) (dictree-load "dict-english")) (setq pattern (replace-regexp-in-string "\\\\\\." "." (regexp-quote pattern))) (let ((words (dictree-regexp-search dict-english pattern nil nil nil nil nil (lambda (key data) key)))) (when (interactive-p) (switch-to-buffer-other-window "*Crossword matches*") (erase-buffer) (dolist (word words) (insert word "\n")) (other-window -1)) words))