Sort by Word LengthΒΆ

Example

>>> # TEST PREPARATION
>>> import sys
>>> from io import StringIO
>>> from techminer2.thesaurus.organizations import InitializeThesaurus
>>> # Redirecting stderr to avoid messages
>>> original_stderr = sys.stderr
>>> sys.stderr = StringIO()
>>> # Create thesaurus
>>> InitializeThesaurus(root_directory="examples/fintech/", quiet=True).run()
>>> # Create and run the sorter
>>> from techminer2.thesaurus.organizations import SortByWordLength
>>> sorter = (
...     SortByWordLength()
...     #
...     # DATABASE:
...     .where_root_directory("examples/fintech/")
... )
>>> sorter.run()
>>> from techminer2.thesaurus.organizations import PrintHeader
>>> (
...     PrintHeader()
...     .using_colored_output(False)
...     .where_root_directory("examples/fintech/")
... ).run()