Proagate word counts and save them for files.

This commit is contained in:
Veronica K. B. Olsen
2019-04-22 17:02:52 +02:00
parent 2727ade4a0
commit 3631b239fc
10 changed files with 103 additions and 91 deletions
-25
View File
@@ -31,11 +31,6 @@ class NWDoc():
self.theItem = None
self.docHandle = None
# Document Info
self.charCount = None
self.lineCount = None
self.wordCount = None
return
def openDocument(self, tHandle):
@@ -83,28 +78,8 @@ class NWDoc():
if path.isfile(docTemp): unlink(docTemp)
docAna = TextAnalysis(docText,"en_GB")
wC, sC, pC = docAna.getStats()
# rScr, gLev = docAna.getReadabilityScore()
self.theItem.setWordCount(wC)
self.theItem.setSentCount(sC)
self.theItem.setParaCount(pC)
return True
##
# Setters
##
def setCharCount(self, theCount):
self.charCount = theCount
return
def setLineCount(self, theCount):
self.lineCount = theCount
return
##
# Internal Functions
##