Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a section classifier for new transactions #5

Open
blais opened this issue Mar 26, 2018 · 1 comment
Open

Create a section classifier for new transactions #5

blais opened this issue Mar 26, 2018 · 1 comment

Comments

@blais
Copy link
Member

blais commented Mar 26, 2018

Original report by Martin Blais (Bitbucket: blais, GitHub: blais).


There's nothing like that in the Beancount codebase. I've thought about building something to automatically insert imported transactions in the right "section" (I personally use org-mode, where each section corresponds to an institution and its related group of accounts) but it's unclear whether that would generalize.

I think you could turn this into a simple classification problem. Given some syntax for splitting up an input file into sections (e.g., some regular expression matching on a title or separator), you now have groups of transactions and inputs. Somehow reduce this to a simple model for classifying which section an incoming transaction matches with highest probability and insert it there. Or more appropriately - since transactions are imported in groups - find the section that best matches all the transactions in the imported files and insert at the end there.

On Sun, Mar 11, 2018 at 12:28 PM, Michael Droogleever [email protected] wrote:
I believe it is against the design of beancount, but is there any existing code which attempts to add transactions to an existing beancount file. Assuming the entries in the file are grouped by asset account, it would need to append the entry to the subsection of entries all from the same account.

@blais
Copy link
Member Author

blais commented Mar 27, 2018

Original comment by Dominik Aumayr (GitHub: aumayr).


Fava already does have this functionality (and code), see the "insert-entry" option: https://fava.pythonanywhere.com/example-with-budgets/help/options/

How it works: You can add custom "insert-entry" entries with a RegEx as the value, which determines where in the file new transactions will be added. I use this constantly, and added these custom entries in different sections in my beancount files, corresponding to different accounts.

@blais blais transferred this issue from beancount/beancount Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant