Skip to content

Commit

Permalink
Merge pull request #65 from QuantGov/hotfix-0.6.1
Browse files Browse the repository at this point in the history
Hotfix 0.6.1
  • Loading branch information
jnelson16 committed Sep 12, 2019
2 parents fc23324 + 810ef1f commit 4c5dbff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion quantgov/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
from . import corpus, nlp, ml, utils
from .utils import load_driver

__version__ = '0.6.0'
__version__ = '0.6.1'
3 changes: 3 additions & 0 deletions quantgov/nlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@ def get_columns(args):
@check_textblob
def process_document(doc, precision):
sentences = textblob.TextBlob(doc.text).sentences
# Returns sentence_length = 0 if no complete sentences are found
if len(sentences) == 0:
return doc.index + (0,)
# Allows for rounding to a specified number of decimals
if precision:
return doc.index + (round(sum(len(
Expand Down

0 comments on commit 4c5dbff

Please sign in to comment.