ParenthesesΒΆ

Example

>>> import sys
>>> from io import StringIO
>>> from techminer2.thesaurus.descriptors import InitializeThesaurus, RemoveParentheses
>>> # Redirecting stderr to avoid messages
>>> original_stderr = sys.stderr
>>> sys.stderr = StringIO()
>>> # Create the thesaurus
>>> InitializeThesaurus(root_directory="examples/fintech/", quiet=True).run()
>>> # Remove parentheses
>>> RemoveParentheses(root_directory="examples/fintech/", use_colorama=False).run()
>>> # Capture and print stderr output
>>> output = sys.stderr.getvalue()
>>> sys.stderr = original_stderr
>>> print(output)
Removing parentheses from thesaurus keys...
  File : examples/fintech/data/thesaurus/descriptors.the.txt
  6 removals made successfully
  Removal process completed successfully

Printing thesaurus header
  File : examples/fintech/data/thesaurus/descriptors.the.txt

    CLASSIFICATION
      CLASSIFICATION (OF_INFORMATION)
    COMPETITION
      COMPETITION; COMPETITION (ECONOMICS)
    FINANCIAL_TECHNOLOGY
      FINANCIAL_TECHNOLOGIES; FINANCIAL_TECHNOLOGY; FINANCIAL_TECHNOLOGY (FINTECH)
    INTERNET_OF_THING
      INTERNET_OF_THING (IOT); INTERNET_OF_THINGS
    NETWORKS
      NETWORKS; NETWORKS (CIRCUITS)
    PRESSES
      PRESSES (MACHINE_TOOLS)
    A_A_THEORY
      A_A_THEORY
    A_BASIC_RANDOM_SAMPLING_STRATEGY
      A_BASIC_RANDOM_SAMPLING_STRATEGY