pbouda/qlc — Issue #15: "print" statement in ngrams.py
Author: pbouda
Created: 2012-02-07 10:31:53+00:00
State: open

Lines 59-63 of ngram.py, function "ngrams_from_graphemes()" print an error message:

if len(graphemes) < 3:
print()
print("WARNING: the qlc.ngram class says that you have a word (inclusive of word boundaries '#') that is less than length 3. That's bad!")
print("word: "+graphemes+"\nExiting...\n")
sys.exit(1)

Can we change this into an exception? Then the caller can decide what to do. When I run nosetests I get a bad error here, because nose can't collect the output, for some reason.