deduce
deduce copied to clipboard
Add configurable path to lookup tables
Add key "lookup_table_path" to config.json that points to the directory where 'cache' en 'src' are located. Path is absolute ('C:/data/base-config.json' , '/data/baseconfig.json') or relative to the location of the base-config.json (up or down the tree e.g. './data/lookup' or '../../configs/version-1')
Also changed the 'all_lists' variable definition which pointed to a fixed location in deduce. 'all_lists' is now also placed in the config file as key "all_lists".
-Does not break previous configuration settings -Priority order:
- use values from base-config.json
- when not found in config.json, use old default behavior 3) when old version of all_lists AND the one from config.json are '[]', generate all _lists dynamically from directory structure.
base-config.json: { "lookup_table_path": "./data/lookup", "all_lists": [ "institutions/lst_healthcare_institution", "institutions/lst_hospital", "institutions/lst_hospital_abbr", "locations/lst_placename", "locations/lst_street", "names/lst_first_name", "names/lst_initial", "names/lst_interfix", "names/lst_interfix_surname", "names/lst_prefix", "names/lst_surname", "whitelist/lst_common_word", "whitelist/lst_eponymous_disease", "whitelist/lst_medical_term", "whitelist/lst_stop_word" ], "adjacent_annotations_slack": "[\. \-]?[\. ]?", ... [snip] ... }
@tomgw I finally found the time to look at it, thanks for the additions. I reviewed and left some comments to resolve. Also, can you add some documentation on how to use (where appropriate), and some test cases so we know this works (and keeps working)? Then finally please also add the changes you made to the changelog. Let me know if you need any help!