diff --git a/src/processor/ledger/beancount_to_jsonl.py b/src/processor/ledger/beancount_to_jsonl.py index ed6f9b4f..aeb93653 100644 --- a/src/processor/ledger/beancount_to_jsonl.py +++ b/src/processor/ledger/beancount_to_jsonl.py @@ -132,7 +132,7 @@ def convert_beancount_entries_to_jsonl(entries, verbose=0): "Convert each Beancount transaction to JSON and collate as JSONL" jsonl = '' for entry in entries: - entry_dict = {'Title': entry} + entry_dict = {'compiled': entry, 'raw': entry} # Convert Dictionary to JSON and Append to JSONL string jsonl += f'{json.dumps(entry_dict, ensure_ascii=False)}\n' diff --git a/src/search_type/symmetric_ledger.py b/src/search_type/symmetric_ledger.py index 3a8922a3..1e0e4033 100644 --- a/src/search_type/symmetric_ledger.py +++ b/src/search_type/symmetric_ledger.py @@ -38,7 +38,7 @@ def initialize_model(search_config: SymmetricSearchConfig): def extract_entries(notesfile, verbose=0): "Load entries from compressed jsonl" - return [{'raw': f'{entry["Title"]}', 'compiled': f'{entry["Title"]}'} + return [{'compiled': f'{entry["compiled"]}', 'raw': f'{entry["raw"]}'} for entry in load_jsonl(notesfile, verbose=verbose)]