comparison process_document/app.py @ 9:bf19235a9636

minor bugs and add sample reports
author Dennis C. M. <dennis@denniscm.com>
date Wed, 07 Jun 2023 11:07:14 +0100
parents d15ccf5f1373
children
comparison
equal deleted inserted replaced
8:f2442b8f43de 9:bf19235a9636
150 amount_formats = ['thousand', 'million', 'billion'] 150 amount_formats = ['thousand', 'million', 'billion']
151 151
152 for amount_format in amount_formats: 152 for amount_format in amount_formats:
153 plural_amount_format = f'{amount_format}s' 153 plural_amount_format = f'{amount_format}s'
154 154
155 if amount_format in phrase or plural_amount_format in phrase: 155 if amount_format in phrase.lower() or plural_amount_format in phrase.lower():
156 return amount_format 156 return amount_format
157 157
158 158
159 def clean_text(text, text_type='default'): 159 def clean_text(text, text_type='default'):
160 """" 160 """"