1jamesthompson1 / TAIC-report-summary

Using LLM technologies to analyze transport accident investigation reports
GNU General Public License v3.0
0 stars 0 forks source link

Engine crashing in the reference checking stage #110

Open 1jamesthompson1 opened 11 months ago

1jamesthompson1 commented 11 months ago

Problem

There seems to be a problem that sometimes when tryingto check a citation it crashes as a nontype is non interatble.

Ideas and suggestions

Links and references

Hre is the error message:

Summarizing 2019_001 I am going to be reading these pages: [15, 16, 17, 18, 19, 20, 21, 22, 23] Cant find any references in There is no mention of fatigue or alertness issues in the document. The pilot's physical and mental state was not cited as a contributing factor to the accident. No references found No refrences in this theme: Human Factors - Fatigue and Alertness to validate. Validating citation: 3.4 with reference and not filling correctly could indicate a level of situational awareness that was not sufficient to prevent the accident Validated citation Cant find any references in There is no evidence in the document to suggest that the pilot was distracted during the operation. No references found No refrences in this theme: Distracted Operation to validate. Validating citation: 3.14 with reference human error may have played a role in the incorrect installation of the bucket's top ring in a previous incident Validated citation Validating citation: 3.46 with reference error management systems may not have been sufficient to capture and address the earlier incident involving the same bucket Validated citation Validating citation: 3.46 with reference the operator's internal quality and safety management system did not capture or action the earlier incident with the same bucket Validated citation Cant find any references in There is no mention of communication issues or crew resource management problems contributing to the accident. No references found No refrences in this theme: Communication and Crew Resource Management to validate. Cant find any references in The document does not provide information suggesting that a lack of training or preparedness for emergency procedures contributed to the accident. No references found No refrences in this theme: Training and Preparedness for Emergency Procedures to validate. Cant find any references in Emergency response planning and coordination are not discussed as factors in the accident. No references found No refrences in this theme: Emergency Response Planning and Coordination to validate. Cant find any references in There is no indication that maintenance procedures and compliance were a factor in the accident. No references found No refrences in this theme: Maintenance Procedures and Compliance to validate. Cant find any references in Fire detection and suppression systems are not relevant to the accident as described in the document. No references found No refrences in this theme: Fire Detection and Suppression Systems to validate. Validating citation: 3.32 with reference the lack of regulatory requirements for manufacturers to promulgate operational information or limitations Validated citation Validating citation: 3.8, 3.42 with reference and the absence of specific guidance on the appropriate line length for monsoon bucket operations Validated citation Traceback (most recent call last): File "", line 1, in File "/home/james/code/TAIC-report-summary/engine/cli.py", line 104, in cli summarize(engine_settings.get('output'), File "/home/james/code/TAIC-report-summary/engine/cli.py", line 49, in summarize modes, refresh).summarize_reports() File "/home/james/code/TAIC-report-summary/engine/Extract_Analyze/Summarizer.py", line 135, in summarize_reports self.report_reader.process_reports(self.summarize_report, self.modes) File "/home/james/code/TAIC-report-summary/engine/Extract_Analyze/OutputFolderReader.py", line 59, in process_reports self._read_file_from_each_report_dir(self.output_config.get("reports").get("text_file_name"), processing_function, lambda report_id: Modes.get_report_mode_from_id(report_id) in modes) File "/home/james/code/TAIC-report-summary/engine/Extract_Analyze/OutputFolderReader.py", line 50, in _read_file_from_each_report_dir processing_function(report_id, report_text) File "/home/james/code/TAIC-report-summary/engine/Extract_Analyze/Summarizer.py", line 159, in summarize_report summary = self.summarize_text(text_to_be_summarized, Modes.get_report_mode_from_id(report_id)) File "/home/james/code/TAIC-report-summary/engine/Extract_Analyze/Summarizer.py", line 276, in summarize_text result = referenceCheckor.validate_references(theme['explanation']) File "/home/james/code/TAIC-report-summary/engine/Extract_Analyze/ReferenceChecking.py", line 174, in validate_references processed_reference = self._validate_reference(reference, True) File "/home/james/code/TAIC-report-summary/engine/Extract_Analyze/ReferenceChecking.py", line 235, in _validate_reference source_sections = list(map(lambda reference: reportExtractor.extract_section(reference), reference.reference)) TypeError: 'NoneType' object is not iterable

1jamesthompson1 commented 11 months ago

Not solved as still having problems

i.e

uting factor to the derailment in the document (4.1.3-4.4.15, 5.1-5.4). No references found No refrences in this theme: Emergency Response Preparedness to validate. Traceback (most recent call last): File "", line 1, in File "/home/james/code/TAIC-report-summary/engine/cli.py", line 104, in cli summarize(engine_settings.get('output'), File "/home/james/code/TAIC-report-summary/engine/cli.py", line 49, in summarize modes, refresh).summarize_reports() File "/home/james/code/TAIC-report-summary/engine/Extract_Analyze/Summarizer.py", line 135, in summarize_reports self.report_reader.process_reports(self.summarize_report, self.modes) File "/home/james/code/TAIC-report-summary/engine/Extract_Analyze/OutputFolderReader.py", line 59, in process_reports self._read_file_from_each_report_dir(self.output_config.get("reports").get("text_file_name"), processing_function, lambda report_id: Modes.get_report_mode_from_id(report_id) in modes) File "/home/james/code/TAIC-report-summary/engine/Extract_Analyze/OutputFolderReader.py", line 50, in _read_file_from_each_report_dir processing_function(report_id, report_text) File "/home/james/code/TAIC-report-summary/engine/Extract_Analyze/Summarizer.py", line 159, in summarize_report summary = self.summarize_text(text_to_be_summarized, Modes.get_report_mode_from_id(report_id)) File "/home/james/code/TAIC-report-summary/engine/Extract_Analyze/Summarizer.py", line 276, in summarize_text result = referenceCheckor.validate_references(theme['explanation']) File "/home/james/code/TAIC-report-summary/engine/Extract_Analyze/ReferenceChecking.py", line 174, in validate_references processed_reference = self._validate_reference(reference, True) File "/home/james/code/TAIC-report-summary/engine/Extract_Analyze/ReferenceChecking.py", line 235, in _validate_reference source_sections = list(map(lambda reference: reportExtractor.extract_section(reference), reference.reference)) TypeError: 'NoneType' object is not iterable