example

mail@pastecode.io avatar
unknown
python
2 years ago
488 B
5
Indexable
Never
query = 'football'

documents = [

    ['Why I love Football', 'Football is my life and ...', 'http://blah.blah/blah'],

    ['My sporting interests', 'Tennis, football and rugby are sports I love...', 'http://blah.blah/blah'],

    ['Football, football, football', 'This is a guide to the best things about...', 'http://blah.blah/blah']

]


class SearchEngine:

    def __init__(self, documents: list):
        self._documents = documents

    def search(self, query: str):
        pass