Skip to content

Commit

Permalink
Merge pull request #125 from dmmiller612/test-space
Browse files Browse the repository at this point in the history
added test for space
  • Loading branch information
dmmiller612 committed Jan 4, 2022
2 parents 7aaa934 + f1d7c60 commit 84f2733
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions setup.py
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='dmmiller612@gmail.com',
install_requires=['transformers', 'scikit-learn', 'spacy'],
Expand Down
5 changes: 5 additions & 0 deletions tests/test_summary_items.py
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 84f2733

Please sign in to comment.