Update README.md
Browse files33 unmodified lines34353633 unmodified lines```See the files here: https://huggingface.co/ontocord/riverbed/tree/main33 unmodified lines3435363738394041424344454647484950515253545556575859606162636465666733 unmodified lines```See the files here: https://huggingface.co/ontocord/riverbed/tree/mainThis includes a a small whoosh search index of wikidata useful for background knowledge for LLMs.installation:```import osif not os.path.exists("./wikidata_bm25_whoosh"):!git clone https://huggingface.co/ontocord/riverbed!pip install -q whooshimport whoosh.index as whoosh_indexfrom whoosh.qparser import QueryParserfrom whoosh.analysis import StemmingAnalyzer, Filterclass MyFilter(Filter):def __call__(self, tokens):for t in tokens:t.text = t.text.lower()if len(t.text) > 5:yield tt.text = t.text[:5]yield ttry:if qp is None: assert Falseexcept:bm25_dir = "./riverbed"index = whoosh_index.open_dir(bm25_dir)searcher = index.searcher()qp = QueryParser("content", schema=index.schema)```
README.md+31