Return score.

pull/120/head
maomao905 5 years ago
parent de20908e57
commit b21235d0a0

@ -33,11 +33,11 @@ Usage
'Example Domain'
>>> doc.summary()
u'<html><body><div><body id="readabilityBody">\n<div>\n <h1>Example Domain</h1>\n
(u'<html><body><div><body id="readabilityBody">\n<div>\n <h1>Example Domain</h1>\n
<p>This domain is established to be used for illustrative examples in documents. You may
use this\n domain in examples without prior coordination or asking for permission.</p>
\n <p><a href="http://www.iana.org/domains/example">More information...</a></p>\n</div>
\n</body>\n</div></body></html>'
\n</body>\n</div></body></html>', 31.43)
Change Log
----------

@ -227,7 +227,7 @@ class Document:
# Loop through and try again.
continue
else:
return cleaned_article
return cleaned_article, best_candidate['content_score']
except Exception as e:
log.exception('error getting summary: ')
if sys.version_info[0] == 2:

Loading…
Cancel
Save