Skip to content

Commit

Permalink
Directional Relations supported
Browse files Browse the repository at this point in the history
  • Loading branch information
HashamUlHaq committed Nov 15, 2022
1 parent 47b6d36 commit d2f6483
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build/lib/sparknlp_display/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.1
4.2
4 changes: 2 additions & 2 deletions build/lib/sparknlp_display/relation_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Binary file removed dist/spark-nlp-display-4.1.tar.gz
Binary file not shown.
Binary file added dist/spark-nlp-display-4.2.tar.gz
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion spark_nlp_display.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion sparknlp_display/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.1
4.2
4 changes: 2 additions & 2 deletions sparknlp_display/relation_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit d2f6483

Please sign in to comment.