Sort by Word LengthΒΆ
Example
>>> import sys
>>> from io import StringIO
>>> from techminer2.thesaurus.system.descriptors import SortByWordLength
>>> # Redirecting stderr to avoid messages
>>> original_stderr = sys.stderr
>>> sys.stderr = StringIO()
>>> # Configure and run the sorter
>>> SortByWordLength(use_colorama=False).run()
>>> # Capture and print stderr output
>>> output = sys.stderr.getvalue()
>>> sys.stderr = original_stderr
>>> print(output)
Sorting thesaurus by word length...
File : /Volumes/GitHub/techminer2/techminer2/package_data/thesaurus/system/descriptors.the.txt
Sorting process completed successfully
Printing thesaurus header
File : /Volumes/GitHub/techminer2/techminer2/package_data/thesaurus/system/descriptors.the.txt
BIBLIOMETRICS
BIBLIOMETRIC
ORGANIZATION
BUSINESS; BUSINESSES; COMPANIES; COMPANY; ENTERPRISE; ENTERPRISES; FIRM; ...
APPLICATION
APPLICATIONS
MULTI_TRANSFORMER
MULTI_TRANSFORMERS
SYNTHESIZER_TRANSFORMER
SYNTHESIZER_TRANSFORMERS
TEMPORAL_FUSION_TRANSFORMER
TEMPORAL_FUSION_TRANSFORMERS
TRANSFORMER_NETWORK
TRANSFORMER_NETWORKS
ARTIFICIAL_NEURAL_NETWORK
ARTIFICIAL_NEURAL_NETWORKS; ARTIFICIAL_NEURAL_NETWORK_MODEL; ARTIFICIAL_N...