switch to collocatordb 1.3.2

Change-Id: I77420c7ef3b9184fa78107c42575c3f162c1ce20
diff --git a/Changelog.md b/Changelog.md
index 23529ef..16b81ee 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,5 +1,7 @@
 # Changelog
 
+- fixed calculation of total token count by using collocatordb 1.3.2
+
 ## [0.93.1] - 2024-09-13
 
 - usage call warning fixed
diff --git a/Makefile.PL b/Makefile.PL
index 160fbf1..e095a24 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -3,6 +3,17 @@
 use strict;
 use warnings;
 use ExtUtils::MakeMaker;
+use lib qw(inc);
+use Devel::CheckLib;
+
+check_lib_or_exit(
+    cflags => '-Wall -Wno-unused-result -fno-rtti -O4 -I/usr/local/include',
+    header => ['unistd.h', 'stdio.h', 'stdlib.h', 'string.h', 'collocatordb.h'],
+    function => 'char *min_v = "1.3.2"; char *v = get_version(); if(strcmp(min_v, v) <= 0) { return 0; } else { fprintf(stderr, "Installed collocatordb version %s is too low. Minimally %s is required.\n", v, min_v); return(1); }',
+    libpath => ['/usr/lib', '/usr/local/lib64', '/usr/local/lib'],
+    incpath => ['/usr/include', '/usr/local/include'],
+    # debug => 1,
+    lib => 'collocatordb');
 
 WriteMakefile(
     NAME           => 'derekovecs::server',
@@ -15,6 +26,7 @@
      'Test::TempFile' => 0,
      "REST::Client" => 0,
      "Data::Dump" => 0,
+     "Devel::CheckLib" => ">=1.16",
     },
     PREREQ_PM      => {
         'Inline::C'                               => '0.82',
diff --git a/README.md b/README.md
index 437a35c..e4d348e 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@
 
 ### Dependencies
 
-* [libcollocaltordb](https://korap.ids-mannheim.de/gerrit/plugins/gitiles/ids-kl/collocatordb) >= v1.3.0
+* [libcollocaltordb](https://korap.ids-mannheim.de/gerrit/plugins/gitiles/ids-kl/collocatordb) >= v1.3.2
 
 ### Build and install
 
diff --git a/lib/IDS/DeReKoVecs/Read.pm b/lib/IDS/DeReKoVecs/Read.pm
index edf0b55..fb11fe9 100644
--- a/lib/IDS/DeReKoVecs/Read.pm
+++ b/lib/IDS/DeReKoVecs/Read.pm
@@ -26,7 +26,7 @@
 use Mojo::JSON qw(decode_json encode_json to_json);
 use Exporter qw(import);
 
-our @EXPORT = qw(init_net load_sprofiles getVocabSize getDowntimeCalendar getCollocationAssociation getClassicCollocatorsCached getSimilarProfiles getSimilarProfilesCached getBiggestMergedDifferences filter_garbage get_neighbours getWordNumber dump_vecs dump_for_numpy cos_similarity_as_json);
+our @EXPORT = qw(init_net load_sprofiles getVocabSize getDowntimeCalendar getCollocationAssociation getClassicCollocatorsCached getSimilarProfiles getSimilarProfilesCached getBiggestMergedDifferences filter_garbage get_neighbours getWordNumber dump_vecs dump_for_numpy cos_similarity_as_json get_version);
 
 sub getDowntimeCalendar {
   my ($url) = @_;