使用维基百科 Python 库检索 k 篇最相关的文章背后的方法是什么?

What is methodology behind retrieving k most relevant articles using Wikipedia Python library?

Wikipedia python 库是否会根据给定的查询自动检索最相关的 k 个文档?检索这些文件的底层结构是什么?它使用 TF-IDF 还是任何其他方法?

the module's source code, wikipedia queries the Wikipedia API and returns its results. The order of documents returned is therefore determined by Wikipedia's own CirrusSearch, which is built on Elasticsearch. You can find more information in the Wikipedia API documentation可以看出。