Skip to content

Commit

Permalink
added test for space
Browse files Browse the repository at this point in the history
  • Loading branch information
dmmiller612 committed Jan 4, 2022
1 parent 7aaa934 commit f1d7c60
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
from setuptools import find_packages

setup(name='bert-extractive-summarizer',
version='0.10.0',
version='0.10.1',
description='Extractive Text Summarization with BERT',
keywords=['bert', 'pytorch', 'machine learning',
'deep learning', 'extractive summarization', 'summary'],
long_description=open("README.md", "r", encoding='utf-8').read(),
long_description_content_type="text/markdown",
url='https://github.com/dmmiller612/bert-extractive-summarizer',
download_url='https://github.com/dmmiller612/bert-extractive-summarizer/archive/0.10.0.tar.gz',
download_url='https://github.com/dmmiller612/bert-extractive-summarizer/archive/0.10.1.tar.gz',
author='Derek Miller',
author_email='[email protected]',
install_requires=['transformers', 'scikit-learn', 'spacy'],
Expand Down
5 changes: 5 additions & 0 deletions tests/test_summary_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ def passage():
'''


def test_space_in_sentences(summarizer, passage):
result = summarizer(passage, num_sentences=3)
assert result == 'The Chrysler Building, the famous art deco New York skyscraper, will be sold for a small fraction of its previous sales price. Mubadala, an Abu Dhabi investment fund, purchased 90% of the building for $800 million in 2008. He kept secret the plans for the spire that would grace the top of the building, building it inside the structure and out of view of the public until 40 Wall Street was complete.'


def test_transformer_summarizer(transformer_summarizer, passage):
result = transformer_summarizer(passage, num_sentences=2, return_as_list=True)
assert len(result) == 2
Expand Down

0 comments on commit f1d7c60

Please sign in to comment.