I am using win32com to extract a Word document Flesch score directly instead of through the editor, because I would like to automate and store in bulk all the Flesch scores for multiple Word documents.
word = win32.gencache.EnsureDispatch('Word.Application')
word.Visible = False
doc = word.Documents.Open(file_path)
# Get Word's internal statistics
doc.Content.ComputeStatistics(win32.constants.wdStatisticWords) # Trigger recalculation
# Get readability statistics
stats = doc.ReadabilityStatistics
flesch_reading_ease = stats.Item('Flesch Reading Ease').Value
flesch_kincaid_grade_level = stats.Item('Flesch-Kincaid Grade Level').Value
However, when using the above Python script, the values printed are not the same as the Flesch score shown in the Word editor Readability Statistics.
Why are they different if win32com is directly using the object from the Word Application? Is this an issue with how Word calculates the scores, or does Word not fully give the values like expected?