shigureui commited on
Commit
eff5a71
·
1 Parent(s): 839493b
Files changed (1) hide show
  1. app.py +14 -0
app.py CHANGED
@@ -68,6 +68,20 @@ def search(query_info):
68
 
69
 
70
  def lunyu_search(query):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  return search(query_info=query)
72
 
73
 
 
68
 
69
 
70
  def lunyu_search(query):
71
+ """
72
+ Search for relevant critical commentary entries based on an input query from the Analects.
73
+
74
+ This function parses the input query, performs a fuzzy search in the indexed original text field,
75
+ and extracts related critiques. If any numeric index references (e.g., '3·2') are found in the
76
+ commentary, it will further retrieve related entries using these references.
77
+
78
+ Args:
79
+ query (str): The input text (a line from the Analects, possibly fuzzy or partial) to search.
80
+
81
+ Returns:
82
+ List[dict]: A list of result entries. Each entry contains the original hit and a list of related entries
83
+ under the key "extra", retrieved via index references mentioned in the commentary.
84
+ """
85
  return search(query_info=query)
86
 
87