Clump KeysΒΆ
Example
>>> import sys
>>> from io import StringIO
>>> from techminer2.thesaurus.descriptors import ClumpKeys, InitializeThesaurus
>>> # Redirect stderr to capture output
>>> original_stderr = sys.stderr
>>> sys.stderr = StringIO()
>>> # Create the thesaurus
>>> InitializeThesaurus(root_directory="examples/fintech/", quiet=True).run()
>>> # Clump the thesaurus
>>> (
... ClumpKeys(tqdm_disable=True, use_colorama=False)
... .where_root_directory_is("examples/fintech/")
... .run()
... )
>>> # Capture and print stderr output
>>> output = sys.stderr.getvalue()
>>> sys.stderr = original_stderr
>>> print(output)
Clumping thesaurus keys...
File : examples/fintech/data/thesaurus/descriptors.the.txt
Keys reduced from 1724 to 1724
Clumping process completed successfully