renard-pipeline 0.4.0__tar.gz → 0.4.1__tar.gz

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.

Files changed (35) hide show
  1. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/PKG-INFO +32 -2
  2. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/README.md +28 -1
  3. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/pyproject.toml +4 -1
  4. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/pipeline/core.py +7 -0
  5. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/LICENSE +0 -0
  6. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/gender.py +0 -0
  7. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/graph_utils.py +0 -0
  8. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/ner_utils.py +0 -0
  9. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/nltk_utils.py +0 -0
  10. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/pipeline/__init__.py +0 -0
  11. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/pipeline/character_unification.py +0 -0
  12. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/pipeline/characters_extraction.py +0 -0
  13. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/pipeline/corefs/__init__.py +0 -0
  14. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/pipeline/corefs/corefs.py +0 -0
  15. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/pipeline/graph_extraction.py +0 -0
  16. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/pipeline/ner.py +0 -0
  17. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/pipeline/preconfigured.py +0 -0
  18. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/pipeline/preprocessing.py +0 -0
  19. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/pipeline/progress.py +0 -0
  20. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/pipeline/quote_detection.py +0 -0
  21. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/pipeline/sentiment_analysis.py +0 -0
  22. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/pipeline/speaker_attribution.py +0 -0
  23. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/pipeline/stanford_corenlp.py +0 -0
  24. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/pipeline/tokenization.py +0 -0
  25. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/plot_utils.py +0 -0
  26. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/py.typed +0 -0
  27. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/resources/hypocorisms/__init__.py +0 -0
  28. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/resources/hypocorisms/datas/License.txt +0 -0
  29. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/resources/hypocorisms/datas/hypocorisms.csv +0 -0
  30. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/resources/hypocorisms/hypocorisms.py +0 -0
  31. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/resources/pronouns/__init__.py +0 -0
  32. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/resources/pronouns/pronouns.py +0 -0
  33. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/resources/titles/__init__.py +0 -0
  34. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/resources/titles/titles.py +0 -0
  35. {renard_pipeline-0.4.0 → renard_pipeline-0.4.1}/renard/utils.py +0 -0
@@ -1,7 +1,8 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: renard-pipeline
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: Relationships Extraction from NARrative Documents
5
+ Home-page: https://github.com/CompNet/Renard
5
6
  License: GPL-3.0-only
6
7
  Author: Arthur Amalvy
7
8
  Author-email: arthur.amalvy@univ-avignon.fr
@@ -31,6 +32,8 @@ Requires-Dist: tibert (>=0.3.0,<0.4.0)
31
32
  Requires-Dist: torch (>=2.0.0,!=2.0.1)
32
33
  Requires-Dist: tqdm (>=4.62.3,<5.0.0)
33
34
  Requires-Dist: transformers (>=4.36.0,<5.0.0)
35
+ Project-URL: Documentation, https://compnet.github.io/Renard/
36
+ Project-URL: Repository, https://github.com/CompNet/Renard
34
37
  Description-Content-Type: text/markdown
35
38
 
36
39
  # Renard
@@ -46,6 +49,8 @@ You can install the latest version using pip:
46
49
 
47
50
  > pip install renard-pipeline
48
51
 
52
+ Currently, Renard supports Python 3.8, 3.9 and 3.10.
53
+
49
54
 
50
55
  # Documentation
51
56
 
@@ -56,7 +61,32 @@ If you need local documentation, it can be generated using `Sphinx`. From the `d
56
61
 
57
62
  # Tutorial
58
63
 
59
- `renard_tutorial.py` is a tutorial in the `jupytext` format. You can open it as a notebook in Jupyter Notebook (or export it as a notebook with `jupytext --to ipynb renard-tutorial.py`).
64
+ Renard's central concept is the `Pipeline`.A `Pipeline` is a list of `PipelineStep` that are run sequentially in order to extract a character graph from a document. Here is a simple example:
65
+
66
+ ```python
67
+ from renard.pipeline import Pipeline
68
+ from renard.pipeline.tokenization import NLTKTokenizer
69
+ from renard.pipeline.ner import NLTKNamedEntityRecognizer
70
+ from renard.pipeline.character_unification import GraphRulesCharacterUnifier
71
+ from renard.pipeline.graph_extraction import CoOccurrencesGraphExtractor
72
+
73
+ with open("./my_doc.txt") as f:
74
+ text = f.read()
75
+
76
+ pipeline = Pipeline(
77
+ [
78
+ NLTKTokenizer(),
79
+ NLTKNamedEntityRecognizer(),
80
+ GraphRulesCharacterUnifier(min_appearance=10),
81
+ CoOccurrencesGraphExtractor(co_occurrences_dist=25)
82
+ ]
83
+ )
84
+
85
+ out = pipeline(text)
86
+ ```
87
+
88
+ For more information, see `renard_tutorial.py`, which is a tutorial in the `jupytext` format. You can open it as a notebook in Jupyter Notebook (or export it as a notebook with `jupytext --to ipynb renard-tutorial.py`).
89
+
60
90
 
61
91
 
62
92
  # Running tests
@@ -11,6 +11,8 @@ You can install the latest version using pip:
11
11
 
12
12
  > pip install renard-pipeline
13
13
 
14
+ Currently, Renard supports Python 3.8, 3.9 and 3.10.
15
+
14
16
 
15
17
  # Documentation
16
18
 
@@ -21,7 +23,32 @@ If you need local documentation, it can be generated using `Sphinx`. From the `d
21
23
 
22
24
  # Tutorial
23
25
 
24
- `renard_tutorial.py` is a tutorial in the `jupytext` format. You can open it as a notebook in Jupyter Notebook (or export it as a notebook with `jupytext --to ipynb renard-tutorial.py`).
26
+ Renard's central concept is the `Pipeline`.A `Pipeline` is a list of `PipelineStep` that are run sequentially in order to extract a character graph from a document. Here is a simple example:
27
+
28
+ ```python
29
+ from renard.pipeline import Pipeline
30
+ from renard.pipeline.tokenization import NLTKTokenizer
31
+ from renard.pipeline.ner import NLTKNamedEntityRecognizer
32
+ from renard.pipeline.character_unification import GraphRulesCharacterUnifier
33
+ from renard.pipeline.graph_extraction import CoOccurrencesGraphExtractor
34
+
35
+ with open("./my_doc.txt") as f:
36
+ text = f.read()
37
+
38
+ pipeline = Pipeline(
39
+ [
40
+ NLTKTokenizer(),
41
+ NLTKNamedEntityRecognizer(),
42
+ GraphRulesCharacterUnifier(min_appearance=10),
43
+ CoOccurrencesGraphExtractor(co_occurrences_dist=25)
44
+ ]
45
+ )
46
+
47
+ out = pipeline(text)
48
+ ```
49
+
50
+ For more information, see `renard_tutorial.py`, which is a tutorial in the `jupytext` format. You can open it as a notebook in Jupyter Notebook (or export it as a notebook with `jupytext --to ipynb renard-tutorial.py`).
51
+
25
52
 
26
53
 
27
54
  # Running tests
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "renard-pipeline"
3
- version = "0.4.0"
3
+ version = "0.4.1"
4
4
  description = "Relationships Extraction from NARrative Documents"
5
5
  authors = ["Arthur Amalvy <arthur.amalvy@univ-avignon.fr>"]
6
6
  license = "GPL-3.0-only"
@@ -8,6 +8,9 @@ readme = "README.md"
8
8
  packages = [
9
9
  { include = "renard" }
10
10
  ]
11
+ homepage = "https://github.com/CompNet/Renard"
12
+ repository = "https://github.com/CompNet/Renard"
13
+ documentation = "https://compnet.github.io/Renard/"
11
14
 
12
15
  [tool.poetry.dependencies]
13
16
  # optional dependencies
@@ -50,6 +50,13 @@ class Mention:
50
50
  self_dict["end_idx"] = self.end_idx + shift
51
51
  return self.__class__(**self_dict)
52
52
 
53
+ def __eq__(self, other: Mention) -> bool:
54
+ return (
55
+ self.tokens == other.tokens
56
+ and self.start_idx == other.start_idx
57
+ and self.end_idx == other.end_idx
58
+ )
59
+
53
60
  def __hash__(self) -> int:
54
61
  return hash(tuple(self.tokens) + (self.start_idx, self.end_idx))
55
62
 
File without changes