renard-pipeline 0.6.1__py3-none-any.whl → 0.6.3__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):
@@ -72,7 +72,7 @@ class StanfordCoreNLPPipeline(PipelineStep):
72
72
  .. note::
73
73
 
74
74
  The Stanford CoreNLP pipeline requires the ``stanza`` library.
75
- You can install it with poetry using ``poetry install -E stanza``.
75
+ You can install it with poetry using ``pip install stanza``.
76
76
 
77
77
  .. warning::
78
78
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: renard-pipeline
3
- Version: 0.6.1
3
+ Version: 0.6.3
4
4
  Summary: Relationships Extraction from NARrative Documents
5
5
  Home-page: https://github.com/CompNet/Renard
6
6
  License: GPL-3.0-only
@@ -13,9 +13,6 @@ Classifier: Programming Language :: Python :: 3.8
13
13
  Classifier: Programming Language :: Python :: 3.9
14
14
  Classifier: Programming Language :: Python :: 3.10
15
15
  Classifier: Programming Language :: Python :: 3.11
16
- Provides-Extra: spacy
17
- Provides-Extra: stanza
18
- Requires-Dist: coreferee (>=1.4,<2.0) ; extra == "spacy"
19
16
  Requires-Dist: datasets (>=3.0,<4.0)
20
17
  Requires-Dist: grimbert (>=0.1,<0.2)
21
18
  Requires-Dist: matplotlib (>=3.5,<4.0)
@@ -26,13 +23,10 @@ Requires-Dist: nltk (>=3.9,<4.0)
26
23
  Requires-Dist: pandas (>=2.0,<3.0)
27
24
  Requires-Dist: pytest (>=8.3.0,<9.0.0)
28
25
  Requires-Dist: rank-bm25 (>=0.2.2,<0.3.0)
29
- Requires-Dist: spacy (>=3.5,<4.0) ; extra == "spacy"
30
- Requires-Dist: spacy-transformers (>=1.3,<2.0) ; extra == "spacy"
31
- Requires-Dist: stanza (>=1.3,<2.0) ; extra == "stanza"
32
26
  Requires-Dist: tibert (>=0.5,<0.6)
33
27
  Requires-Dist: torch (>=2.0.0,!=2.0.1)
34
28
  Requires-Dist: tqdm (>=4.62.3,<5.0.0)
35
- Requires-Dist: transformers (>=4.36,<5.0)
29
+ Requires-Dist: transformers (>=4.37,<5.0)
36
30
  Project-URL: Documentation, https://compnet.github.io/Renard/
37
31
  Project-URL: Repository, https://github.com/CompNet/Renard
38
32
  Description-Content-Type: text/markdown
@@ -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
@@ -18,7 +18,7 @@ renard/pipeline/progress.py,sha256=PJ174ssaqr5qHaTrVQ8HqJtvpvX6QhtHM5PHT893_Xk,2
18
18
  renard/pipeline/quote_detection.py,sha256=FyldJhynIT843fB7rwVtHmDZJqTKkjGml6qTLjsIhMA,2045
19
19
  renard/pipeline/sentiment_analysis.py,sha256=76MPin4L1-vSswJe5yGrbCSSDim1LYxSEgNj_BdQDvk,1464
20
20
  renard/pipeline/speaker_attribution.py,sha256=Uts6JdUo_sbWyIb2AJ6SO5JuUbgROIpcbUNTg4dHo4U,4329
21
- renard/pipeline/stanford_corenlp.py,sha256=14b6Ee6oPz1EL-bNRT688aNxVTk_Jwa_vJ20FiBODC4,8189
21
+ renard/pipeline/stanford_corenlp.py,sha256=xfauQk5aPLz0xdRbQVeD9x-sL8uqEzxPRhqJtqvDVGg,8183
22
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
@@ -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.1.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
37
- renard_pipeline-0.6.1.dist-info/METADATA,sha256=vijGA3DMBq0Tkn2SJxMKacOw8zI5Z4IDSmIBWBuMEuM,4374
38
- renard_pipeline-0.6.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
39
- renard_pipeline-0.6.1.dist-info/RECORD,,
36
+ renard_pipeline-0.6.3.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
37
+ renard_pipeline-0.6.3.dist-info/METADATA,sha256=70oB4i5Pe74ZUBMTv84qt30o5EcpqtYUYotBUeS2Wyw,4098
38
+ renard_pipeline-0.6.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
39
+ renard_pipeline-0.6.3.dist-info/RECORD,,