renard-pipeline 0.6.0__py3-none-any.whl → 0.6.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of renard-pipeline might be problematic. Click here for more details.

renard/graph_utils.py CHANGED
@@ -124,6 +124,15 @@ def dynamic_graph_to_gephi_graph(graphs: List[nx.Graph]) -> nx.Graph:
124
124
  G = nx.Graph()
125
125
 
126
126
  for H_i, H in enumerate(graphs):
127
+
128
+ # update node attributes
129
+ for u in H.nodes:
130
+ G.add_node(u)
131
+ for key, value in H.nodes[u].items():
132
+ # format : (VALUE, START, END)
133
+ series = G.nodes[u].get(key, [])
134
+ G.nodes[u][key] = series + [(value, H_i, H_i + 1)]
135
+
127
136
  for u, v in H.edges:
128
137
  # create a new edge between two characters if it doesn't
129
138
  # exist yet
@@ -306,8 +306,11 @@ class CoOccurrencesGraphExtractor(PipelineStep):
306
306
 
307
307
  # * Construct graph from co-occurence matrix
308
308
  G = nx.Graph()
309
- for character, _ in mentions:
310
- G.add_node(character)
309
+ for character, mention in mentions:
310
+ # NOTE: we add an 'entity_type' attribute. This is useful
311
+ # when using the 'additional_ner_classes' option, to
312
+ # differentiate between different entity types.
313
+ G.add_node(character, entity_type=mention.tag)
311
314
 
312
315
  for i, (char1, mention1) in enumerate(mentions):
313
316
  for j, (char2, mention2) in enumerate(mentions):
@@ -37,6 +37,7 @@ class NLTKTokenizer(PipelineStep):
37
37
 
38
38
  def __init__(self):
39
39
  nltk.download("punkt", quiet=True)
40
+ nltk.download("punkt_tab", quiet=True)
40
41
  self.word_tokenizer = None
41
42
  self.sent_tokenizer = None
42
43
  super().__init__()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: renard-pipeline
3
- Version: 0.6.0
3
+ Version: 0.6.2
4
4
  Summary: Relationships Extraction from NARrative Documents
5
5
  Home-page: https://github.com/CompNet/Renard
6
6
  License: GPL-3.0-only
@@ -52,7 +52,7 @@ You can install the latest version using pip:
52
52
 
53
53
  > pip install renard-pipeline
54
54
 
55
- Currently, Renard supports Python 3.8, 3.9 and 3.10.
55
+ Currently, Renard supports Python>=3.8,<=3.11
56
56
 
57
57
 
58
58
  # Documentation
@@ -1,5 +1,5 @@
1
1
  renard/gender.py,sha256=HDtJQKOqIkV8F-Mxva95XFXWJoKRKckQ3fc93OBM6sw,102
2
- renard/graph_utils.py,sha256=EV0_56KtI3VOElCu7wxd2kL8QVPsOu7itE6wGJAJsNA,6073
2
+ renard/graph_utils.py,sha256=fcxXXcpzOkUJNgps0zgdoWJNydwkWwJJLJ6OlViNxTA,6373
3
3
  renard/ner_utils.py,sha256=SFZoyJM6c2avE7-NDkCSzkx-O8ppzS00a8EyHt64iGI,11628
4
4
  renard/nltk_utils.py,sha256=mUJiwMrEDZV4Fla7WuMR-hA_OC2ZIwSXgW_0Ew18VSo,977
5
5
  renard/pipeline/__init__.py,sha256=8Yim2mmny8YGvM7N5-na5zK-C9UDxUb77K9ml-VirUA,35
@@ -8,7 +8,7 @@ renard/pipeline/characters_extraction.py,sha256=bMic8dtlYKUmAlTzQqDPraYy5VsGWoGk
8
8
  renard/pipeline/core.py,sha256=LILUIQZp9f3FzqjBocUS7dKzX7lHQQVdL29jyqU1UeY,27754
9
9
  renard/pipeline/corefs/__init__.py,sha256=9c9AaXBcRrDBf1jhTtJ7DyjOJhX_Zej3FjlcGak7MK8,44
10
10
  renard/pipeline/corefs/corefs.py,sha256=d47Sd8ekwhQQV6rQ0F9QyAX2GOTqUnkDUA-eKgMtMS4,11417
11
- renard/pipeline/graph_extraction.py,sha256=Ga3wfUW9tDtatcTv2taLrNky9jz2wUwZ8uzoXJoSVk8,22928
11
+ renard/pipeline/graph_extraction.py,sha256=CsQTdTKj2JmePgiw37_yF0SHcGTRmp62-8Faouaoty4,23154
12
12
  renard/pipeline/ner/__init__.py,sha256=Dqxcf_EKhK1UwiCscZ3gGHInlcxJyvpR4o-ZCLEyV48,38
13
13
  renard/pipeline/ner/ner.py,sha256=8zUtaqaGNirfGFRyMpDzdqtO3abrRLyLtjmwnqBNwUI,9893
14
14
  renard/pipeline/ner/retrieval.py,sha256=JIU3fi0Q1gl_YGP6kYx6zC9xz4UN6gnqdVuzWVXzzyM,12853
@@ -19,7 +19,7 @@ renard/pipeline/quote_detection.py,sha256=FyldJhynIT843fB7rwVtHmDZJqTKkjGml6qTLj
19
19
  renard/pipeline/sentiment_analysis.py,sha256=76MPin4L1-vSswJe5yGrbCSSDim1LYxSEgNj_BdQDvk,1464
20
20
  renard/pipeline/speaker_attribution.py,sha256=Uts6JdUo_sbWyIb2AJ6SO5JuUbgROIpcbUNTg4dHo4U,4329
21
21
  renard/pipeline/stanford_corenlp.py,sha256=14b6Ee6oPz1EL-bNRT688aNxVTk_Jwa_vJ20FiBODC4,8189
22
- renard/pipeline/tokenization.py,sha256=BzLBG_QndbLLf2VtZtkIsFSbB0whvgrI4_hzVw_jxZY,2910
22
+ renard/pipeline/tokenization.py,sha256=gZP0ZpAa0rhtUDPk6W0PiXRxmiC3IcSyRF_E7KaP19A,2957
23
23
  renard/plot_utils.py,sha256=qsQI-wbk_5KCXDvt1tPerq4UW4VWLrJpoCet4qkONwE,3344
24
24
  renard/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
25
  renard/resources/determiners/__init__.py,sha256=dAcx2hWb_aAd5Rv9rif7CQOvjKcSdIY_mCXJBQQtw60,55
@@ -33,7 +33,7 @@ renard/resources/pronouns/pronouns.py,sha256=YJ8hM6H8QHrF2Xx6O5blqc-Sqe1D1YFL0sR
33
33
  renard/resources/titles/__init__.py,sha256=Jcg4B7stsWiAaXbFgNl_L3ICtCQmFe9bo3YjdkVL50w,45
34
34
  renard/resources/titles/titles.py,sha256=GsFccVJuTkgDWiAqWZpFd2R9pGvFKQZBOk4RWWuWDkw,968
35
35
  renard/utils.py,sha256=WL6djr3iu5Kzo2Jq6qDllHXgvZcEnmqBxPkQf1drq7c,4072
36
- renard_pipeline-0.6.0.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
37
- renard_pipeline-0.6.0.dist-info/METADATA,sha256=e-pQfaGqbCfJ0ObiQBYhMY1WMwXCFm69t6Q31AwC_DA,4381
38
- renard_pipeline-0.6.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
39
- renard_pipeline-0.6.0.dist-info/RECORD,,
36
+ renard_pipeline-0.6.2.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
37
+ renard_pipeline-0.6.2.dist-info/METADATA,sha256=RtmfdAq8MeMrekPY_6CHjwkQAesrvAAGCclA_jLxRaM,4374
38
+ renard_pipeline-0.6.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
39
+ renard_pipeline-0.6.2.dist-info/RECORD,,