Get ContextsΒΆ
Example
>>> # Redirecting stderr to avoid messages during doctests
>>> import sys
>>> from io import StringIO
>>> original_stderr = sys.stderr
>>> sys.stderr = StringIO()
>>> # Reset the thesaurus to initial state
>>> from techminer2.thesaurus.descriptors import InitializeThesaurus
>>> InitializeThesaurus(
... root_directory="examples/fintech/",
... quiet=True,
... ).run()
>>> # Creates, configures, an run the exploder
>>> from techminer2.thesaurus.descriptors import GetContexts
>>> contexts = (
... GetContexts()
... .with_patterns(["FINTECH"])
... .having_n_contexts(10)
... .where_root_directory("examples/fintech/")
... .run()
... )
>>> from pprint import pprint
>>> pprint(contexts[:5])
['- this research represents a stepping stone in exploring the interaction '
'between fintech and its yet unfolding social and political context .',
'- it also discusses policy implications for china fintech industry , '
'focusing on the changing role of the state in fostering the growth of '
'national industry within and outside of china .',
'- financial technologies ( fintech ) have become an integral part of banking '
', and nowadays banks have started to compete beyond financial services '
'facing increasing competition from nonfinancial institutions providing , for '
'example , payment services .',
'- the rapid rise of fintech has changed the business landscape in banking '
'asking for more innovative solutions .',
'- these recent tendencies require the banks to increase investment in '
'fintech , rethink service distribution channels , especially the business to '
'consumers models , increase further standardization of backoffice functions '
', etc .']