tribler.test_unit.core.database.test_augmenter
Classes
Tests for augmenting queries. |
Module Contents
- class tribler.test_unit.core.database.test_augmenter.TestAugmentedSearch
Bases:
ipv8.test.base.TestBaseTests for augmenting queries.
- async test_write_cache_on_shutdown() None
Test if an incomplete title window is flushed to disk before shutting down.
- test_schedule_study_from_cache() None
Test if the cache file is checked after a restart for pending training data.
- async test_study() None
Test if learning is actually taking place. Warning: id assignment and exact vocabulary are non-deterministic!
- test_needs_kickstart_initialized_empty() None
Test if an initialized-but-empty augmenter asks for a kickstart.
- async test_needs_kickstart_initialized() None
Test if an initialized augmenter signals no need for a kickstart.
- test_augment() None
Test if a full e2e enhancement works. With a fixed vocabulary/model, this is deterministic!
- Explanation for the “test_augment is testing!” transformation:
We load the vocabulary from test_study, which is trained on the unigram “test”. However, note that “augm” and “ing!” have also snuck their way into the vocabulary.
1. We parse three words (into as many phrases) “test_augment”, “is”, “testing!” and output their conjuction. 2.a. The first disjunction permutates [“test”, “_”, “augm”, “e”, “n”, “t”]. 2.b. The second is [“i”, “s”]. Both symbols are completely unknown to our vocabulary. 2.c. The third is [“test”, “ing!”].