diff --git a/build/lib/sparknlp_display/VERSION b/build/lib/sparknlp_display/VERSION index 8a36cd1..8012ebb 100644 --- a/build/lib/sparknlp_display/VERSION +++ b/build/lib/sparknlp_display/VERSION @@ -1 +1 @@ -4.1 \ No newline at end of file +4.2 \ No newline at end of file diff --git a/build/lib/sparknlp_display/relation_extraction.py b/build/lib/sparknlp_display/relation_extraction.py index cfffcd0..00b7545 100644 --- a/build/lib/sparknlp_display/relation_extraction.py +++ b/build/lib/sparknlp_display/relation_extraction.py @@ -356,8 +356,8 @@ def __gen_graph(self, rdf, selected_text, exclude_relations, show_relations): if row.result.lower().strip() not in self.color_dict: self.color_dict[row.result.lower().strip()] = self.__get_color(row.result.lower().strip()) - d_key2 = all_done[int(row.metadata['entity2_begin'])] - d_key1 = all_done[int(row.metadata['entity1_begin'])] + d_key2 = all_done[int(row.metadata['entity1_begin'])] + d_key1 = all_done[int(row.metadata['entity2_begin'])] this_dist = abs(d_key2[0] - d_key1[0]) + abs (d_key2[1]-d_key1[1]) relation_distances.append(this_dist) relation_coordinates.append((d_key2, d_key1, row.result)) diff --git a/dist/spark-nlp-display-4.1.tar.gz b/dist/spark-nlp-display-4.1.tar.gz deleted file mode 100644 index e4aa150..0000000 Binary files a/dist/spark-nlp-display-4.1.tar.gz and /dev/null differ diff --git a/dist/spark-nlp-display-4.2.tar.gz b/dist/spark-nlp-display-4.2.tar.gz new file mode 100644 index 0000000..1431f31 Binary files /dev/null and b/dist/spark-nlp-display-4.2.tar.gz differ diff --git a/dist/spark_nlp_display-4.1-py3-none-any.whl b/dist/spark_nlp_display-4.2-py3-none-any.whl similarity index 96% rename from dist/spark_nlp_display-4.1-py3-none-any.whl rename to dist/spark_nlp_display-4.2-py3-none-any.whl index b3ceced..def7a17 100644 Binary files a/dist/spark_nlp_display-4.1-py3-none-any.whl and b/dist/spark_nlp_display-4.2-py3-none-any.whl differ diff --git a/spark_nlp_display.egg-info/PKG-INFO b/spark_nlp_display.egg-info/PKG-INFO index 6dc5f26..cfc65df 100644 --- a/spark_nlp_display.egg-info/PKG-INFO +++ b/spark_nlp_display.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: spark-nlp-display -Version: 4.1 +Version: 4.2 Summary: Visualization package for Spark NLP Home-page: http://nlp.johnsnowlabs.com Author: John Snow Labs diff --git a/sparknlp_display/VERSION b/sparknlp_display/VERSION index 8a36cd1..8012ebb 100644 --- a/sparknlp_display/VERSION +++ b/sparknlp_display/VERSION @@ -1 +1 @@ -4.1 \ No newline at end of file +4.2 \ No newline at end of file diff --git a/sparknlp_display/relation_extraction.py b/sparknlp_display/relation_extraction.py index cfffcd0..00b7545 100644 --- a/sparknlp_display/relation_extraction.py +++ b/sparknlp_display/relation_extraction.py @@ -356,8 +356,8 @@ def __gen_graph(self, rdf, selected_text, exclude_relations, show_relations): if row.result.lower().strip() not in self.color_dict: self.color_dict[row.result.lower().strip()] = self.__get_color(row.result.lower().strip()) - d_key2 = all_done[int(row.metadata['entity2_begin'])] - d_key1 = all_done[int(row.metadata['entity1_begin'])] + d_key2 = all_done[int(row.metadata['entity1_begin'])] + d_key1 = all_done[int(row.metadata['entity2_begin'])] this_dist = abs(d_key2[0] - d_key1[0]) + abs (d_key2[1]-d_key1[1]) relation_distances.append(this_dist) relation_coordinates.append((d_key2, d_key1, row.result))