Apply ThesaurusΒΆ
Example
>>> import sys
>>> from io import StringIO
>>> from techminer2.thesaurus.references import ApplyThesaurus
>>> # Redirecting stderr to avoid messages
>>> original_stderr = sys.stderr
>>> sys.stderr = StringIO()
>>> # Applying thesaurus
>>> ApplyThesaurus(root_directory="example/").run()
>>> # Capture and print stderr output
>>> output = sys.stderr.getvalue()
>>> sys.stderr = original_stderr
>>> print(output)
Applying user thesaurus to database
File : example/thesaurus/references.the.txt
Source field : raw_global_references
Target field : global_references
Thesaurus application completed successfully