'Creates a broad histogram of the document to determine whether it incorporates hard
line breaks.  Lines are sorted into 20 \'buckets\' based on length.
percent is the percentage of lines that should be in a single bucket to return true
The majority of the lines will exist in 1-2 buckets in typical docs with hard line breaks'

def line_histogram(self, percent):

    minLineLength = 20
    maxLineLength = 1900
    buckets = 20
    hRaw = [0 for i in range(0, buckets)]
    for line in self.lines:
        l = len(line)
        if ((l > minLineLength) and (l < maxLineLength)):
            l = int((l / 100))
            hRaw[l] += 1
    totalLines = len(self.lines)
    if (totalLines > 0):
        h = [(float(count) / totalLines) for count in hRaw]
    else:
        h = []
    maxValue = 0
    for i in range(0, len(h)):
        if (h[i] > maxValue):
            maxValue = h[i]
    if (maxValue < percent):
        return False
    else:
        return True
