3.6. sis4¶
3.6.1. Setup¶
3.6.1.1. Prerequisites¶
GCC >= 7.1
Boost >= 1.67
CMake >= 3.6
3.6.1.2. Build Process¶
tl;dr (with ninja):
git submodule update --init --recursive
make develop
In detail:
First pull the submodules:
git submodule update --init --recursive
Then choose your code generator. The fastest way is to build with ninja:
make develop
For compatibility reasons, there is also the option to
build with the default (make) code generator:
make check
Note that both rules are executing quick tests after the building process.
Lastly, you can switch to your preferred compilers by putting them in the environment like:
make develop CXX=g++-8 CC=gcc-8
3.6.1.3. Generate Documentation¶
pip3 install -r docs/sphinx/requirements.txt
make docs
3.6.2. Usage¶
sis4 provides both a CLI and a Server Feature.
3.6.2.1. Command Line Interface¶
3.6.2.1.1. Full-Text Search¶
Output index as file and query the index (suited for large indices):
./build/bin/sis-index --output=<index_filename> [doc1 doc2 ...]
./build/bin/sis-query --index=<index_filename> --width=<width> <query>
Example:
./build/bin/sis-index -o test_index.bin ./etc/Ts-213_OA_NORM_TEXT.txt
./build/bin/sis-query -i test_index.bin -w 5 mensch
Or do both in one step:
./build/bin/sis-query -q mensch -w 5 ./etc/Ts-213_OA_NORM_TEXT.txt
3.6.2.1.2. Lemma Search¶
Output lemma-index as file and query the index (suited for large indices):
./build/bin/sis-lemmaindex --output=<index_filename> [dict1 dict2 ...]
./build/bin/sis-lemmaindex --index=<index_filename> <query>
Example:
./build/bin/sis-lemmaindex -o test_lemma_index.bin ./etc/frequencies.lemma
./build/bin/sis-lemmaindex -i test_lemma_index.bin mensch
Or do both in one step:
./build/bin/sis-lemmaquery -q mensch ./etc/frequencies.lemma
3.6.2.2. Server Feature¶
Generate lemma-indices specified by config and start server (default port = 8080)
./build/bin/sis-lemmaindex -i ./etc/test_config.json -f ./etc
./build/bin/sis-server -i ./etc/test_config.json
Query without dictionary specification (default dict = default)
http://localhost:<port>/lemmasearch?query=<query>
Query with dictionary specification
http://localhost:<port>/lemmasearch?query=<query>&dict=<dict>
For further usage, make sure to consult
./build/bin/sis-<extension> -h
3.6.3. TODO¶
[X] Case-insensitive lemma search
[ ] Case-insensitive full text search
[ ] Fuzzy search