This is a helper program for solving wordle.
Just execute the make
command.
- Get English text data to construct the wolper's dictionary.
- Assuming the input texts are located in
input
directory, you can build the dictionary file nameddict.txt
by the following command../wolper build [-i input] [-o dict.txt]
- Run the wolper server as follows.
./wolper server [-i dict.txt] [-p TCP port#]
- Run the wolper client as follows.
The sample output is shown below.
./wolper query [-k key] [-i included characters] [-e excluded characters] [--pos_exclude colon-separated characters] [-a IP address] [-p TCP port#] [-u] [--entsort]
$ ./wolper query -k fi.er -e powghtl address: localhost port: 8080 include: exclude: powghtl key: fi.er Connection succeeded. fiber finer fixer $ ./wolper query -k .z..e --entsort --pos_exclude bmj:::f: address: localhost port: 8081 key: .z..e include: exclude: posExclude: bmj:::f: uniq: false entsort: true Connection succeeded. ozone ozzie azure
If the unique search is enabled by "--uniq" flag, the result only includes words which consists of unique characters, that is, words not including the duplicated characters.
For example, a word "crane" is good, but "hello" is not allowed since it contains two "l"s in a single word.
If the entropy based sorting is enabled by "--entsort" flag, the result is sorted according to the entropy score. If you choose the first word from the result, which has the highest entropy score, you can expect to get the correct word in the fastest way.
For the theoretical background, please check this blog post.
Sometimes you might want to search words which include some characters, but you would not like the characters to sit in a specific position. In that case, you can use "--pos_exclude" option. You should specify the colon-separated characters as a value of the option. Each characters are then split with the colon and work as a exclusion list for each position.
For example, if you specify "ab:c::d:", the result does not contains the words which starts with "a" or "b", or contains "c" as a second character, or contains "d" for a fourth position.
The way to start the wolper server is the same with that of CLI. Web interface can be used by the following steps.
- Run the wolper web server as follows.
Note that the IP address here is wolper server's one, not web server's. Also note that the TCP port# is for the web server whcich your are about to start.
./wolper web [-a IP address] [-p TCP port#] [--wolper_port TCP port# of wolper server]
- Access to
http://localhost:"TCP port#"
on your web browser.