VDT / tutorial.py
CreatorPhan's picture
Upload 14 files
e011405
raw
history blame
360 Bytes
from retrieval.retrieval import Retrieval, BM25
# retrieval = Retrieval(k=4)
# contexts = retrieval.get_context()
docs = open('../document2.txt', encoding='utf-8').read()
retrieval = Retrieval(docs=docs)
# retrieval.tuning(docs)
contexts = retrieval.get_context("Khi nào bệnh nhên nên đến bệnh viện?")
for context in contexts:
print(context)