Skip to content

Commit

Permalink
applied filter to avoid None items;
Browse files Browse the repository at this point in the history
  • Loading branch information
ranjan-stha committed Jul 23, 2024
1 parent 7219e8c commit 2765e66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion handlers/ecs/textextraction/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def _common_doc_handler(
"""
entries_with_page_info = self._add_page_info([entries])
entries_list = [item for sublist in entries_with_page_info for item in sublist]

entries_list = filter(lambda item: item is not None, entries_list) # remove None items
extracted_text = "\n\n".join(entries_list)
extracted_text = preprocess_extracted_texts(extracted_text)
total_words_count = get_words_count(extracted_text)
Expand Down

0 comments on commit 2765e66

Please sign in to comment.