albertvillanova HF Staff commited on
Commit
c8337f5
·
verified ·
1 Parent(s): d152b54

Remove filters

Browse files
Files changed (1) hide show
  1. wikipedia.py +4 -3
wikipedia.py CHANGED
@@ -187,7 +187,7 @@ def html_to_text(article: mwparserfromhtml.Article):
187
  exclude_para_context=exclude_para_context,
188
  exclude_elements=exclude_elements,
189
  )
190
- if len(paragraph.strip()) > 15
191
  ]
192
 
193
  # final check that more than a single paragraph and at least 20 characters.
@@ -195,6 +195,7 @@ def html_to_text(article: mwparserfromhtml.Article):
195
  # formatted redirects manage to slip through still.
196
  if paragraphs:
197
  plaintext = "\n".join(paragraphs)
198
- if len(plaintext) > 20:
199
- return plaintext
 
200
  return None
 
187
  exclude_para_context=exclude_para_context,
188
  exclude_elements=exclude_elements,
189
  )
190
+ # if len(paragraph.strip()) > 15
191
  ]
192
 
193
  # final check that more than a single paragraph and at least 20 characters.
 
195
  # formatted redirects manage to slip through still.
196
  if paragraphs:
197
  plaintext = "\n".join(paragraphs)
198
+ # if len(plaintext) > 20:
199
+ # return plaintext
200
+ return plaintext
201
  return None