Update app.py
Browse files
app.py
CHANGED
|
@@ -304,7 +304,7 @@ class BM25Index(InvertedIndex):
|
|
| 304 |
|
| 305 |
@classmethod
|
| 306 |
def build_from_documents(
|
| 307 |
-
cls: Type[BM25Index],
|
| 308 |
documents: Iterable[Document],
|
| 309 |
store_raw: bool = True,
|
| 310 |
output_dir: Optional[str] = None,
|
|
@@ -312,7 +312,7 @@ class BM25Index(InvertedIndex):
|
|
| 312 |
show_progress_bar: bool = True,
|
| 313 |
k1: float = 0.9,
|
| 314 |
b: float = 0.4,
|
| 315 |
-
) -> BM25Index:
|
| 316 |
# Counting TFs, DFs, doc_lengths, etc.:
|
| 317 |
counting = run_counting(
|
| 318 |
documents=documents,
|
|
@@ -428,7 +428,7 @@ class CSCBM25Index(CSCInvertedIndex):
|
|
| 428 |
|
| 429 |
@classmethod
|
| 430 |
def build_from_documents(
|
| 431 |
-
cls: Type[CSCBM25Index],
|
| 432 |
documents: Iterable[Document],
|
| 433 |
store_raw: bool = True,
|
| 434 |
output_dir: Optional[str] = None,
|
|
@@ -436,7 +436,7 @@ class CSCBM25Index(CSCInvertedIndex):
|
|
| 436 |
show_progress_bar: bool = True,
|
| 437 |
k1: float = 0.9,
|
| 438 |
b: float = 0.4,
|
| 439 |
-
) -> CSCBM25Index:
|
| 440 |
# Counting TFs, DFs, doc_lengths, etc.:
|
| 441 |
counting = run_counting(
|
| 442 |
documents=documents,
|
|
|
|
| 304 |
|
| 305 |
@classmethod
|
| 306 |
def build_from_documents(
|
| 307 |
+
cls: Type["BM25Index"],
|
| 308 |
documents: Iterable[Document],
|
| 309 |
store_raw: bool = True,
|
| 310 |
output_dir: Optional[str] = None,
|
|
|
|
| 312 |
show_progress_bar: bool = True,
|
| 313 |
k1: float = 0.9,
|
| 314 |
b: float = 0.4,
|
| 315 |
+
) -> "BM25Index":
|
| 316 |
# Counting TFs, DFs, doc_lengths, etc.:
|
| 317 |
counting = run_counting(
|
| 318 |
documents=documents,
|
|
|
|
| 428 |
|
| 429 |
@classmethod
|
| 430 |
def build_from_documents(
|
| 431 |
+
cls: Type["CSCBM25Index"],
|
| 432 |
documents: Iterable[Document],
|
| 433 |
store_raw: bool = True,
|
| 434 |
output_dir: Optional[str] = None,
|
|
|
|
| 436 |
show_progress_bar: bool = True,
|
| 437 |
k1: float = 0.9,
|
| 438 |
b: float = 0.4,
|
| 439 |
+
) -> "CSCBM25Index":
|
| 440 |
# Counting TFs, DFs, doc_lengths, etc.:
|
| 441 |
counting = run_counting(
|
| 442 |
documents=documents,
|