Fixing confused bayesian matching data?

Jim DeLaHunt from.gnucash at jdlh.com
Fri Jul 29 05:55:50 EDT 2016


Philip:

Sorry for the delay in responding to your message. I waited until I had 
something useful posted where you could see it.

I was in exactly your situation back in February.

On Sun, 17 Jul 2016 21:24:56 -0400, Philip Matthews 
<philip_matthews at magma.ca> wrote:
> Just wondering if anyone has any advice on what to do with some very confused bayesian matching data?
>
> Right now, when I import new transactions (either CSV or QFX), they mostly don't find a match anymore. Only around 20 - 30% match.   This is probably because I like to rejig my accounts from time to time as I continue to figure out what works best for me.  Looking through the ".gnucash" file, I see lots of slot entries with account names that don't exist any more....
>
> ...Write a Python program that goes through the .gnucash file and deletes slot entries that point at accounts that don't exist any more.
>
> Comments?  Other thoughts?
>
> Running GnuCash 2.6.11 on a Mac.

My solution? XSLT processing <https://en.wikipedia.org/wiki/XSLT>. 
GnuCash files can be saved as XML format data, and XSLT is a tool for 
modifying XML data in a controlled, reliable way. I wrote a set of XSLT 
filters which:

 1. lists the Bayes mapping data for each account in a gnucash XML file;
 2. resets the import mapping, by deleting all the Bayes mapping data
    for every account in a gnucash XML file; and
 3. prunes the import mapping data for certain target accounts in a
    gnucash XML file.

A rather brief explanation of the situation and the GnuCash file format, 
with listings of all the XSLT filters, is in my freshly-written blog 
post, /Resetting GnuCash’s import transaction matching/ 
<http://blog.jdlh.com/en/2016/07/29/resetting-gnucashs-import-transaction-matching/>. 
Take a look. I hope it's helpful.

-- 
     --Jim DeLaHunt, jdlh at jdlh.com     http://blog.jdlh.com/ (http://jdlh.com/)
       multilingual websites consultant

       157-2906 West Broadway, Vancouver BC V6K 2G8, Canada
          Canada mobile +1-604-376-8953



More information about the gnucash-user mailing list