Skip to content

Commit 4c5dbff

Browse files
authored
Merge pull request #65 from QuantGov/hotfix-0.6.1
Hotfix 0.6.1
2 parents fc23324 + 810ef1f commit 4c5dbff

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

quantgov/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
from . import corpus, nlp, ml, utils
55
from .utils import load_driver
66

7-
__version__ = '0.6.0'
7+
__version__ = '0.6.1'

quantgov/nlp.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,9 @@ def get_columns(args):
260260
@check_textblob
261261
def process_document(doc, precision):
262262
sentences = textblob.TextBlob(doc.text).sentences
263+
# Returns sentence_length = 0 if no complete sentences are found
264+
if len(sentences) == 0:
265+
return doc.index + (0,)
263266
# Allows for rounding to a specified number of decimals
264267
if precision:
265268
return doc.index + (round(sum(len(

0 commit comments

Comments
 (0)