From fb3616e06ca20ffe78dfb00b962a2599a46b2a5f Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sat, 29 Jun 2019 18:51:00 +0200 Subject: Clean up 1992 post processing --- src/postprocess/map_plz.c | 4 ++-- src/postprocess/merge_entries.c | 5 +++-- src/postprocess/postprocess-1992.sh | 15 ++++++--------- 3 files changed, 11 insertions(+), 13 deletions(-) (limited to 'src/postprocess') diff --git a/src/postprocess/map_plz.c b/src/postprocess/map_plz.c index ab0db71..9dec6bb 100644 --- a/src/postprocess/map_plz.c +++ b/src/postprocess/map_plz.c @@ -18,7 +18,7 @@ int main(int argc, char **args) { FILE *bfile, *streetfile_out; char *ptr, *input = malloc(65335); char *ort = malloc(65335), vorwahl_block[16]; - int i, brutes_count = 0, report = 0; + unsigned int i, brutes_count = 0, report = 0; brute_t *brutes = malloc(200000*sizeof(brute_t)); /* prepare io */ @@ -63,7 +63,7 @@ int main(int argc, char **args) { g_book_by_name = (entry_t*)malloc(g_book_size * sizeof(entry_t)); /* Split pointers into input files into our arrays */ - for (i = 0, ptr = (char*)tbuch->addr; i < g_book_size; ++i) { + for (i=0, ptr=(char*)tbuch->addr; i 1995-voshnvrp.bin -# To debug in lldb -process launch -i 1992_testfile.txt -- 1995-vorwahl-ort-strasse-hnr-name-vorname-rufnummer-plz.bin - # Compile plz mapper cc -O3 -o map_plz map_plz.c -I ../src/export/ ../src/export/mystdlib.c +# To debug in lldb +# cc -O0 -g -o map_plz map_plz.c -I ../src/export/ ../src/export/mystdlib.c +# process launch -i 1992_testfile.txt -- 1995-vorwahl-ort-strasse-hnr-name-vorname-rufnummer-plz.bin + # outputs mapped plz, generates brutemap.txt touch brutemap_input.bin zip_simple_map.bin -./map_plz 1995-voshnvrp.bin zip_simple_map.bin brutemap_input.bin < 1992-fvvoshnvrpp.txt > 10_Postleitzahl - -# generate street name translation table from brutemap, -# only taking into account similar street names -# cut -f 3,4 brutemap.txt | tr '[:upper:]' '[:lower:]' | paste brutemap.txt - | cut -f 1-4,6,7 | ./jaro | cut -f 1-5 > brutemap_filtered.txt +./map_plz 1995-voshnvrp.bin zip_simple_map.bin brutemap_input.bin < 1992-fvvoshnvrpp.txt > 1992_Q2/10_Postleitzahl # generate street name translation table from brutemap, # only taking into account similar street names, new style @@ -29,4 +26,4 @@ cut -f 1-5 brutemap_simifiltered.txt | sort | uniq -c | sed -E $'s:^ *([[:digit: sort -u zip_mapfile.txt | tr '\n' '\0' > zip_simple_map.bin # Redo the mapping with the data from brutemap and zipmap -./map_plz 1995-voshnvrp.bin zip_simple_map.bin brutemap_input.bin < 1992-fvvoshnvrpp.txt > 10_Postleitzahl +./map_plz 1995-voshnvrp.bin zip_simple_map.bin brutemap_input.bin < 1992-fvvoshnvrpp.txt > 1992_Q2/10_Postleitzahl -- cgit v1.2.3