mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
remove unused codes, seperate layout detection out as a new api. Add new rag methed 'table' (#55)
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import copy
|
||||
import random
|
||||
|
||||
from .pdf_parser import HuParser as PdfParser
|
||||
from .docx_parser import HuDocxParser as DocxParser
|
||||
@ -38,6 +39,9 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user