diff --git a/quantgov/__init__.py b/quantgov/__init__.py index 29f9d3e..05f32de 100644 --- a/quantgov/__init__.py +++ b/quantgov/__init__.py @@ -4,4 +4,4 @@ from . import corpus, nlp, ml, utils from .utils import load_driver -__version__ = '0.6.0' +__version__ = '0.6.1' diff --git a/quantgov/nlp.py b/quantgov/nlp.py index 0622c21..d76708c 100644 --- a/quantgov/nlp.py +++ b/quantgov/nlp.py @@ -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(