File size: 461 Bytes
c07f34c
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import pandas as pd

from model.search.hybrid import HybridSearchClient
from model.data.notion_db import fetch_sakurap_corpus


if __name__ == "__main__":
    # Load dataset
    sakurap_df = fetch_sakurap_corpus("./data/sakurap_corpus.csv")
    # sakurap_df = pd.read_csv("./data/sakurap_corpus.csv")

    # hybrid search
    search_client = HybridSearchClient.from_dataframe(sakurap_df, "content")
    results = search_client.search_top_n("嵐 5人の歴史")