fabricatio_anki.actions.topic_analysis
AppendTopicAnalysis adds topic analysis to a CSV file as a new column.
Classes
Appends topic analysis results as a new column to a given CSV file. |
Module Contents
- class fabricatio_anki.actions.topic_analysis.AppendTopicAnalysis(/, **data: Any)
Bases:
fabricatio_core.Action,fabricatio_anki.capabilities.generate_analysis.GenerateAnalysisAppends topic analysis results as a new column to a given CSV file.
This class reads the specified CSV file, generates topic analysis for each row, and appends it as a new column. The result is either saved in a new file or overwrites the original if no output path is provided.
- csv_file: str | pathlib.Path
Path to the CSV file where topic analysis should be applied.
- output_file: str | pathlib.Path | None = None
Path to the output CSV file. If None, the input file will be overwritten.