mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
refine admin initialization (#75)
This commit is contained in:
@ -1,7 +1,4 @@
|
||||
from . import search
|
||||
from rag.utils import ELASTICSEARCH
|
||||
|
||||
retrievaler = search.Dealer(ELASTICSEARCH)
|
||||
|
||||
from nltk.stem import PorterStemmer
|
||||
stemmer = PorterStemmer()
|
||||
@ -39,10 +36,12 @@ BULLET_PATTERN = [[
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
def random_choices(arr, k):
|
||||
k = min(len(arr), k)
|
||||
return random.choices(arr, k=k)
|
||||
|
||||
|
||||
def bullets_category(sections):
|
||||
global BULLET_PATTERN
|
||||
hits = [0] * len(BULLET_PATTERN)
|
||||
|
||||
Reference in New Issue
Block a user