Sort by AlphabetΒΆ

Example

>>> import sys
>>> from io import StringIO
>>> from techminer2.thesaurus.system.descriptors import SortByAlphabet
>>> # Redirecting stderr to avoid messages
>>> original_stderr = sys.stderr
>>> sys.stderr = StringIO()
>>> # Configure and run the sorter
>>> SortByAlphabet(use_colorama=False).run()
>>> # Capture and print stderr output
>>> output = sys.stderr.getvalue()
>>> sys.stderr = StringIO()
>>> print(output)  
Sorting thesaurus alphabetically...
  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

    ANALYSIS
      ANALYZES
    APPLICATION
      APPLICATIONS
    APPROACH
      APPROACHES
    ARTICLE
      ARTICLES
    ARTIFICIAL_NEURAL_NETWORK
      ARTIFICIAL_NEURAL_NETWORKS; ARTIFICIAL_NEURAL_NETWORK_MODEL; ARTIFICIAL_N...
    AUTHOR
      AUTHORS
    BIBLIOMETRICS
      BIBLIOMETRIC
    BLOCK_CHAIN
      BLOCK_CHAINS; BLOCKCHAIN; BLOCKCHAINS