Liyan06
commited on
Commit
·
67a6912
1
Parent(s):
09efa05
handle small chunk size
Browse files
minicheck_web/inference.py
CHANGED
@@ -104,6 +104,8 @@ class Inferencer():
|
|
104 |
|
105 |
doc_chunks = [chunk.replace(" \n ", '\n').strip() for chunk in chunks(doc_sents, self.chunk_size)]
|
106 |
|
|
|
|
|
107 |
'''
|
108 |
[chunk_1, chunk_2, chunk_3, chunk_4, ...]
|
109 |
[claim]
|
|
|
104 |
|
105 |
doc_chunks = [chunk.replace(" \n ", '\n').strip() for chunk in chunks(doc_sents, self.chunk_size)]
|
106 |
|
107 |
+
doc_chunks = [chunk for chunk in doc_chunks if chunk != ''] # this should be added to the real code to remove empty chunks
|
108 |
+
|
109 |
'''
|
110 |
[chunk_1, chunk_2, chunk_3, chunk_4, ...]
|
111 |
[claim]
|