Extend StopwordsΒΆ

Example

>>> from techminer2.io import ExtendStopwords
>>> (
...     ExtendStopwords()
...     .with_patterns(["finance", "investment"])
...     .where_root_directory("examples/fintech/")
...     .run()
... )
>>> from pprint import pprint
>>> with open("examples/fintech/data/my_keywords/stopwords.txt", "r", encoding="utf-8") as file:
...     stopwords = [line.strip() for line in file.readlines()]
...     pprint(stopwords)
['finance', 'investment']