Register KeywordΒΆ

Example

>>> import sys
>>> from io import StringIO
>>> from techminer2.thesaurus.descriptors import InitializeThesaurus, RegisterKeyword
>>> # Redirecting stderr to avoid messages
>>> original_stderr = sys.stderr
>>> sys.stderr = StringIO()
>>> # Register a new keyword
>>> (
...     RegisterKeyword()
...     .having_word("ARTIFICIAL_NEURAL_NETWORK")
...     .run()
... )
>>> # Capture and print stderr output
>>> output = sys.stderr.getvalue()
>>> sys.stderr = original_stderr
>>> print(output)
Registering new keyword...
  Registration process completed successfully