diff --git a/lib/IDS/DeReKoVecs/Read.pm b/lib/IDS/DeReKoVecs/Read.pm
index 378dba8..7bff3af 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 get_version getPosWiseW2VCollocatorsAsTsv);
+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 getPosWiseW2VCollocators);
 
 sub getDowntimeCalendar {
   my ($url) = @_;
diff --git a/lib/IDS/DeReKoVecs/derekovecs-server.c b/lib/IDS/DeReKoVecs/derekovecs-server.c
index 6592bfa..5ef2014 100644
--- a/lib/IDS/DeReKoVecs/derekovecs-server.c
+++ b/lib/IDS/DeReKoVecs/derekovecs-server.c
@@ -747,7 +747,7 @@
   return (fa > fb) - (fa < fb);
 }
 
-char *getPosWiseW2VCollocatorsAsTsv(char *word, long maxPerPos, long cutoff, float threshold) {
+char *getPosWiseW2VCollocators(char *word, long maxPerPos, long cutoff, float threshold, const char *format) {
   HV *result = newHV();
   float *target_sums = NULL;
   long a, b;
@@ -793,14 +793,34 @@
   result = malloc(maxPerPos * 80 * syn_threads);
   char *p = (char *) result;
   *p = 0;
-  for (a = syn_threads - 1; a >= 0; a--) {
-    for (b = 0; b < syn_nbs[a]->length; b++) {
-      p += sprintf(p, "%ld\t%s\t%f\n", syn_nbs[a]->best[b].position, &vocab[syn_nbs[a]->best[b].wordi * max_w], syn_nbs[a]->best[b].activation);
+  if (strcmp(format, "tsv") == 0) {
+    for (a = syn_threads - 1; a >= 0; a--) {
+      for (b = 0; b < syn_nbs[a]->length; b++) {
+        p += sprintf(p, "%ld\t%s\t%f\n", syn_nbs[a]->best[b].position, &vocab[syn_nbs[a]->best[b].wordi * max_w], syn_nbs[a]->best[b].activation);
+      }
     }
+  } else {
+    p += sprintf(p, "[");
+      for (a = syn_threads - 1; a >= 0; a--) {
+        for (b = 0; b < syn_nbs[a]->length; b++) {
+          p += sprintf(p, "{\"pos\": %ld, \"word\":\"%s\",\"activation\": %f},\n", syn_nbs[a]->best[b].position, &vocab[syn_nbs[a]->best[b].wordi * max_w], syn_nbs[a]->best[b].activation);
+        }
+      }
+      p-=2;
+      p += sprintf(p, "\n]");
   }
+
   return ((char *)result);
 }
 
+char *getPosWiseW2VCollocatorsAsTsv(char *word, long maxPerPos, long cutoff, float threshold) {
+  return getPosWiseW2VCollocators(word, maxPerPos, cutoff, threshold, "tsv");
+}
+
+char *getPosWiseW2VCollocatorsAsJson(char *word, long maxPerPos, long cutoff, float threshold) {
+  return getPosWiseW2VCollocators(word, maxPerPos, cutoff, threshold, "json");
+}
+
 SV *get_neighbours(char *st1, int N, int sort_by, int search_backw, long cutoff, int dedupe, int no_similar_profiles) {
   HV *result = newHV();
   float *target_sums = NULL;
