Hoctar77 commited on
Commit
3f295ef
·
verified ·
1 Parent(s): e95fe5e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -24
app.py CHANGED
@@ -1757,7 +1757,7 @@ class DocumentCheckResultsFormatter:
1757
  self.issue_categories = {
1758
  'heading_title_check': {
1759
  'title': 'Required Headings Check',
1760
- 'description': 'Document must contain all required headings for its type.',
1761
  'solution': 'Add all required headings in the correct order',
1762
  'example_fix': {
1763
  'before': 'Missing required heading "PURPOSE."',
@@ -1766,7 +1766,7 @@ class DocumentCheckResultsFormatter:
1766
  },
1767
  'heading_title_period_check': {
1768
  'title': 'Heading Period Format',
1769
- 'description': 'Headings must follow document type period requirements',
1770
  'solution': 'Format heading periods according to document type requirements',
1771
  'example_fix': {
1772
  'before': 'Purpose',
@@ -1775,11 +1775,11 @@ class DocumentCheckResultsFormatter:
1775
  },
1776
  'table_figure_reference_check': {
1777
  'title': 'Table and Figure References',
1778
- 'description': 'References to tables and figures must be properly capitalized',
1779
  'solution': 'Capitalize references at start of sentences, use lowercase within sentences',
1780
  'example_fix': {
1781
- 'before': 'Table 1 shows... The Table 2 indicates...',
1782
- 'after': 'Table 1 shows... The table 2 indicates...'
1783
  }
1784
  },
1785
  'acronym_check': {
@@ -1787,8 +1787,8 @@ class DocumentCheckResultsFormatter:
1787
  'description': 'Acronyms must be defined at their first use in the document.',
1788
  'solution': 'Define each acronym at its first use, e.g., "Federal Aviation Administration (FAA)"',
1789
  'example_fix': {
1790
- 'before': 'The FAA published new guidelines.',
1791
- 'after': 'The Federal Aviation Administration (FAA) published new guidelines.'
1792
  }
1793
  },
1794
  'terminology_check': {
@@ -1811,20 +1811,20 @@ class DocumentCheckResultsFormatter:
1811
  },
1812
  'caption_check_table': {
1813
  'title': 'Table Caption Format Issues',
1814
- 'description': 'Table captions do not follow the required format.',
1815
  'solution': 'Use consistent table numbering format',
1816
  'example_fix': {
1817
- 'before': 'Table 5. | Table A | Tables',
1818
- 'after': 'Table 5-1. | Table 1-1 | Table 2-1'
1819
  }
1820
  },
1821
  'caption_check_figure': {
1822
  'title': 'Figure Caption Format Issues',
1823
- 'description': 'Figure captions do not follow the required format.',
1824
  'solution': 'Use consistent figure numbering format',
1825
  'example_fix': {
1826
- 'before': 'Figure 5. | Figure A | Figures',
1827
- 'after': 'Figure 5-1. | Figure 1-1 | Figure 2-1'
1828
  }
1829
  },
1830
  'document_title_check': {
@@ -2081,8 +2081,8 @@ class DocumentCheckResultsFormatter:
2081
  'description': 'Table captions in Advisory Circulars and Orders must use X-Y numbering format.',
2082
  'solution': 'Use the format "Table X-Y" where X is the chapter number and Y is the sequence number',
2083
  'example_fix': {
2084
- 'before': 'Table 5. | Table A | Tables',
2085
- 'after': 'Table 5-1. | Table 1-1 | Table 2-1'
2086
  }
2087
  }
2088
  figure_format = {
@@ -2090,8 +2090,8 @@ class DocumentCheckResultsFormatter:
2090
  'description': 'Figure captions in Advisory Circulars and Orders must use X-Y numbering format.',
2091
  'solution': 'Use the format "Figure X-Y" where X is the chapter number and Y is the sequence number',
2092
  'example_fix': {
2093
- 'before': 'Figure 5. | Figure A | Figures',
2094
- 'after': 'Figure 5-1. | Figure 1-1 | Figure 2-1'
2095
  }
2096
  }
2097
  else:
@@ -2100,8 +2100,8 @@ class DocumentCheckResultsFormatter:
2100
  'description': f'Table captions in {doc_type}s must use sequential numbering.',
2101
  'solution': 'Use the format "Table X" where X is a sequential number',
2102
  'example_fix': {
2103
- 'before': 'Table A. | Tables | Table 1-1',
2104
- 'after': 'Table 1 | Table 2 | Table 3'
2105
  }
2106
  }
2107
  figure_format = {
@@ -2109,8 +2109,8 @@ class DocumentCheckResultsFormatter:
2109
  'description': f'Figure captions in {doc_type}s must use sequential numbering.',
2110
  'solution': 'Use the format "Figure X" where X is a sequential number',
2111
  'example_fix': {
2112
- 'before': 'Figure A. | Figures | Figure 1-1',
2113
- 'after': 'Figure 1 | Figure 2 | Figure 3'
2114
  }
2115
  }
2116
 
@@ -2521,7 +2521,7 @@ def create_interface():
2521
  - Chicago Manual of Style
2522
 
2523
  <h2 style="color: #ea580c; font-size: 1.25rem; font-weight: 600; margin-top: 1rem;">Validation Checks Include</h2>
2524
-
2525
  - Required heading structure and organization
2526
 
2527
  - Standard terminology usage
@@ -2542,11 +2542,11 @@ def create_interface():
2542
 
2543
 
2544
  <h2 style="color: #ea580c; font-size: 1.25rem; font-weight: 600; margin-top: 1rem;">How to Use</h2>
2545
-
2546
  1. Upload your Word document (.docx format)
2547
 
2548
  2. Select the document type
2549
-
2550
  3. Click "Check Document"
2551
 
2552
  > **Note:** Please ensure your document is clean (no track changes or comments)
 
1757
  self.issue_categories = {
1758
  'heading_title_check': {
1759
  'title': 'Required Headings Check',
1760
+ 'description': 'Document must contain all required headings for its document type.',
1761
  'solution': 'Add all required headings in the correct order',
1762
  'example_fix': {
1763
  'before': 'Missing required heading "PURPOSE."',
 
1766
  },
1767
  'heading_title_period_check': {
1768
  'title': 'Heading Period Format',
1769
+ 'description': 'Headings must follow document type period requirements.',
1770
  'solution': 'Format heading periods according to document type requirements',
1771
  'example_fix': {
1772
  'before': 'Purpose',
 
1775
  },
1776
  'table_figure_reference_check': {
1777
  'title': 'Table and Figure References',
1778
+ 'description': 'References to tables and figures must be properly capitalized.',
1779
  'solution': 'Capitalize references at start of sentences, use lowercase within sentences',
1780
  'example_fix': {
1781
+ 'before': 'The DTR values are specified in Table 3-1 and Figure 3-2.',
1782
+ 'after': 'The DTR values are specified in table 3-1 and figure 3-2.'
1783
  }
1784
  },
1785
  'acronym_check': {
 
1787
  'description': 'Acronyms must be defined at their first use in the document.',
1788
  'solution': 'Define each acronym at its first use, e.g., "Federal Aviation Administration (FAA)"',
1789
  'example_fix': {
1790
+ 'before': 'This order establishes general FAA organizational policies.',
1791
+ 'after': 'This order establishes general Federal Aviation Administration (FAA) organizational policies.'
1792
  }
1793
  },
1794
  'terminology_check': {
 
1811
  },
1812
  'caption_check_table': {
1813
  'title': 'Table Caption Format Issues',
1814
+ 'description': 'Table captions do not follow the required format for the document type you selected.',
1815
  'solution': 'Use consistent table numbering format',
1816
  'example_fix': {
1817
+ 'before': 'Table 5. | Table A.',
1818
+ 'after': 'Table 5-1. | Table A-1.'
1819
  }
1820
  },
1821
  'caption_check_figure': {
1822
  'title': 'Figure Caption Format Issues',
1823
+ 'description': 'Figure captions do not follow the required format for the document type you selected.',
1824
  'solution': 'Use consistent figure numbering format',
1825
  'example_fix': {
1826
+ 'before': 'Figure 5. | Figure A.',
1827
+ 'after': 'Figure 5-1. | Figure A-1.'
1828
  }
1829
  },
1830
  'document_title_check': {
 
2081
  'description': 'Table captions in Advisory Circulars and Orders must use X-Y numbering format.',
2082
  'solution': 'Use the format "Table X-Y" where X is the chapter number and Y is the sequence number',
2083
  'example_fix': {
2084
+ 'before': 'Table 5. | Table A.',
2085
+ 'after': 'Table 5-1. | Table A-1.'
2086
  }
2087
  }
2088
  figure_format = {
 
2090
  'description': 'Figure captions in Advisory Circulars and Orders must use X-Y numbering format.',
2091
  'solution': 'Use the format "Figure X-Y" where X is the chapter number and Y is the sequence number',
2092
  'example_fix': {
2093
+ 'before': 'Figure 5. | Figure A.',
2094
+ 'after': 'Figure 5-1. | Figure A-1.'
2095
  }
2096
  }
2097
  else:
 
2100
  'description': f'Table captions in {doc_type}s must use sequential numbering.',
2101
  'solution': 'Use the format "Table X" where X is a sequential number',
2102
  'example_fix': {
2103
+ 'before': 'Table 5-1. | Table A-1',
2104
+ 'after': 'Table 5. | Table 1.'
2105
  }
2106
  }
2107
  figure_format = {
 
2109
  'description': f'Figure captions in {doc_type}s must use sequential numbering.',
2110
  'solution': 'Use the format "Figure X" where X is a sequential number',
2111
  'example_fix': {
2112
+ 'before': 'Figure 5-1. | Figure A-1.',
2113
+ 'after': 'Figure 5. | Figure 3.'
2114
  }
2115
  }
2116
 
 
2521
  - Chicago Manual of Style
2522
 
2523
  <h2 style="color: #ea580c; font-size: 1.25rem; font-weight: 600; margin-top: 1rem;">Validation Checks Include</h2>
2524
+
2525
  - Required heading structure and organization
2526
 
2527
  - Standard terminology usage
 
2542
 
2543
 
2544
  <h2 style="color: #ea580c; font-size: 1.25rem; font-weight: 600; margin-top: 1rem;">How to Use</h2>
2545
+
2546
  1. Upload your Word document (.docx format)
2547
 
2548
  2. Select the document type
2549
+
2550
  3. Click "Check Document"
2551
 
2552
  > **Note:** Please ensure your document is clean (no track changes or comments)