%global _empty_manifest_terminate_build 0
Name: python-pytextrank
Version: 3.2.4
Release: 1
Summary: Python implementation of TextRank as a spaCy pipeline extension, for graph-based natural language work plus related knowledge graph practices; used for for phrase extraction and lightweight extractive summarization of text documents.
License: MIT
URL: https://derwen.ai/docs/ptr/
Source0: https://mirrors.nju.edu.cn/pypi/web/packages/b0/37/407ec5ea479e13d0230d333c4b645c786eb7f56e44e1203055b3a89ddd5d/pytextrank-3.2.4.tar.gz
BuildArch: noarch
Requires: python3-graphviz
Requires: python3-icecream
Requires: python3-networkx[default]
Requires: python3-pygments
Requires: python3-scipy
Requires: python3-spacy
Requires: python3-graphviz
Requires: python3-icecream
Requires: python3-networkx[default]
Requires: python3-pygments
Requires: python3-scipy
Requires: python3-spacy
Requires: python3-bandit
Requires: python3-check-manifest
Requires: python3-codespell
Requires: python3-coverage
Requires: python3-flask
Requires: python3-grayskull
Requires: python3-jupyterlab
Requires: python3-mistune
Requires: python3-mkdocs-git-revision-date-plugin
Requires: python3-mkdocs-material
Requires: python3-mknotebooks
Requires: python3-mkrefs
Requires: python3-mypy
Requires: python3-nbconvert
Requires: python3-nbmake
Requires: python3-notebook
Requires: python3-pipdeptree
Requires: python3-pre-commit
Requires: python3-pylint
Requires: python3-pytest
Requires: python3-pymdown-extensions
Requires: python3-selenium
Requires: python3-twine
Requires: python3-wheel
Requires: python3-altair
%description
# PyTextRank
[](https://doi.org/10.5281/zenodo.4637885)



[](http://mypy-lang.org/)
[](https://github.com/PyCQA/bandit)
[](https://lgtm.com/projects/g/DerwenAI/pytextrank/context:python)



**PyTextRank** is a Python implementation of *TextRank* as a
[spaCy pipeline extension](https://spacy.io/universe/project/spacy-pytextrank),
for graph-based natural language work -- and related knowledge graph practices.
This includes the family of
[*textgraph*](https://derwen.ai/docs/ptr/glossary/#textgraphs) algorithms:
- *TextRank* by [[mihalcea04textrank]](https://derwen.ai/docs/ptr/biblio/#mihalcea04textrank)
- *PositionRank* by [[florescuc17]](https://derwen.ai/docs/ptr/biblio/#florescuc17)
- *Biased TextRank* by [[kazemi-etal-2020-biased]](https://derwen.ai/docs/ptr/biblio/#kazemi-etal-2020-biased)
- *TopicRank* by [[bougouin-etal-2013-topicrank]](https://derwen.ai/docs/ptr/biblio/#bougouin-etal-2013-topicrank)
Popular use cases for this library include:
- *phrase extraction*: get the top-ranked phrases from a text document
- low-cost *extractive summarization* of a text document
- help infer concepts from unstructured text into more structured representation
See our full documentation at:
## Getting Started
See the ["Getting Started"](https://derwen.ai/docs/ptr/start/)
section of the online documentation.
To install from [PyPi](https://pypi.python.org/pypi/pytextrank):
```
python3 -m pip install pytextrank
python3 -m spacy download en_core_web_sm
```
If you work directly from this Git repo, be sure to install the
dependencies as well:
```
python3 -m pip install -r requirements.txt
```
Alternatively, to install dependencies using `conda`:
```
conda env create -f environment.yml
conda activate pytextrank
```
Then to use the library with a simple use case:
```python
import spacy
import pytextrank
# example text
text = "Compatibility of systems of linear constraints over the set of natural numbers. Criteria of compatibility of a system of linear Diophantine equations, strict inequations, and nonstrict inequations are considered. Upper bounds for components of a minimal set of solutions and algorithms of construction of minimal generating sets of solutions for all types of systems are given. These criteria and the corresponding algorithms for constructing a minimal supporting set of solutions can be used in solving all the considered types systems and systems of mixed types."
# load a spaCy model, depending on language, scale, etc.
nlp = spacy.load("en_core_web_sm")
# add PyTextRank to the spaCy pipeline
nlp.add_pipe("textrank")
doc = nlp(text)
# examine the top-ranked phrases in the document
for phrase in doc._.phrases:
print(phrase.text)
print(phrase.rank, phrase.count)
print(phrase.chunks)
```
See the **tutorial notebooks** in the `examples` subdirectory for
sample code and patterns to use in integrating **PyTextTank** with
related libraries in Python:
Contributing Code
We welcome people getting involved as contributors to this open source
project!
For detailed instructions please see:
[CONTRIBUTING.md](https://github.com/DerwenAI/pytextrank/blob/main/CONTRIBUTING.md)
Build Instructions
Note: unless you are contributing code and updates,
in most use cases won't need to build this package locally.
Instead, simply install from
[PyPi](https://pypi.python.org/pypi/pytextrank)
or use [Conda](https://docs.conda.io/).
To set up the build environment locally, see the
["Build Instructions"](https://derwen.ai/docs/ptr/build/)
section of the online documentation.
Semantic Versioning
Generally speaking the major release number of PyTextRank
will track with the major release number of the associated spaCy
version.
See:
[CHANGELOG.md](https://github.com/DerwenAI/pytextrank/blob/main/CHANGELOG.md)
## License and Copyright
Source code for **PyTextRank** plus its logo, documentation, and examples
have an [MIT license](https://spdx.org/licenses/MIT.html) which is
succinct and simplifies use in commercial applications.
All materials herein are Copyright © 2016-2022 Derwen, Inc.
## Attribution
Please use the following BibTeX entry for citing **PyTextRank** if you
use it in your research or software:
```bibtex
@software{PyTextRank,
author = {Paco Nathan},
title = {{PyTextRank, a Python implementation of TextRank for phrase extraction and summarization of text documents}},
year = 2016,
publisher = {Derwen},
doi = {10.5281/zenodo.4637885},
url = {https://github.com/DerwenAI/pytextrank}
}
```
Citations are helpful for the continued development and maintenance of
this library.
For example, see our citations listed on
[Google Scholar](https://scholar.google.com/scholar?q=related:5tl6J4xZlCIJ:scholar.google.com/&scioq=&hl=en&as_sdt=0,5).
## Kudos
Many thanks to our open source [sponsors](https://github.com/sponsors/ceteri);
and to our contributors:
[@ceteri](https://github.com/ceteri),
[@louisguitton](https://github.com/louisguitton),
[@Ankush-Chander](https://github.com/Ankush-Chander),
[@tomaarsen](https://github.com/tomaarsen),
[@CaptXiong](https://github.com/CaptXiong),
[@Lord-V15](https://github.com/Lord-V15),
[@anna-droid-beep](https://github.com/anna-droid-beep),
[@dvsrepo](https://github.com/dvsrepo),
[@clabornd](https://github.com/clabornd),
[@dayalstrub-cma](https://github.com/dayalstrub-cma),
[@kavorite](https://github.com/kavorite),
[@htmartin](https://github.com/htmartin),
[@williamsmj](https://github.com/williamsmj/),
[@mattkohl](https://github.com/mattkohl),
[@vanita5](https://github.com/vanita5),
[@HarshGrandeur](https://github.com/HarshGrandeur),
[@mnowotka](https://github.com/mnowotka),
[@kjam](https://github.com/kjam),
[@SaiThejeshwar](https://github.com/SaiThejeshwar),
[@laxatives](https://github.com/laxatives),
[@dimmu](https://github.com/dimmu),
[@JasonZhangzy1757](https://github.com/JasonZhangzy1757),
[@jake-aft](https://github.com/jake-aft),
[@junchen1992](https://github.com/junchen1992),
[@shyamcody](https://github.com/shyamcody),
[@chikubee](https://github.com/chikubee);
also to [@mihalcea](https://github.com/mihalcea) who leads outstanding NLP research work,
encouragement from the wonderful folks at Explosion who develop [spaCy](https://github.com/explosion/spaCy),
plus general support from [Derwen, Inc.](https://derwen.ai/)
## Star History
[](https://star-history.com/#derwenai/pytextrank&Date)
%package -n python3-pytextrank
Summary: Python implementation of TextRank as a spaCy pipeline extension, for graph-based natural language work plus related knowledge graph practices; used for for phrase extraction and lightweight extractive summarization of text documents.
Provides: python-pytextrank
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-pytextrank
# PyTextRank
[](https://doi.org/10.5281/zenodo.4637885)



[](http://mypy-lang.org/)
[](https://github.com/PyCQA/bandit)
[](https://lgtm.com/projects/g/DerwenAI/pytextrank/context:python)



**PyTextRank** is a Python implementation of *TextRank* as a
[spaCy pipeline extension](https://spacy.io/universe/project/spacy-pytextrank),
for graph-based natural language work -- and related knowledge graph practices.
This includes the family of
[*textgraph*](https://derwen.ai/docs/ptr/glossary/#textgraphs) algorithms:
- *TextRank* by [[mihalcea04textrank]](https://derwen.ai/docs/ptr/biblio/#mihalcea04textrank)
- *PositionRank* by [[florescuc17]](https://derwen.ai/docs/ptr/biblio/#florescuc17)
- *Biased TextRank* by [[kazemi-etal-2020-biased]](https://derwen.ai/docs/ptr/biblio/#kazemi-etal-2020-biased)
- *TopicRank* by [[bougouin-etal-2013-topicrank]](https://derwen.ai/docs/ptr/biblio/#bougouin-etal-2013-topicrank)
Popular use cases for this library include:
- *phrase extraction*: get the top-ranked phrases from a text document
- low-cost *extractive summarization* of a text document
- help infer concepts from unstructured text into more structured representation
See our full documentation at:
## Getting Started
See the ["Getting Started"](https://derwen.ai/docs/ptr/start/)
section of the online documentation.
To install from [PyPi](https://pypi.python.org/pypi/pytextrank):
```
python3 -m pip install pytextrank
python3 -m spacy download en_core_web_sm
```
If you work directly from this Git repo, be sure to install the
dependencies as well:
```
python3 -m pip install -r requirements.txt
```
Alternatively, to install dependencies using `conda`:
```
conda env create -f environment.yml
conda activate pytextrank
```
Then to use the library with a simple use case:
```python
import spacy
import pytextrank
# example text
text = "Compatibility of systems of linear constraints over the set of natural numbers. Criteria of compatibility of a system of linear Diophantine equations, strict inequations, and nonstrict inequations are considered. Upper bounds for components of a minimal set of solutions and algorithms of construction of minimal generating sets of solutions for all types of systems are given. These criteria and the corresponding algorithms for constructing a minimal supporting set of solutions can be used in solving all the considered types systems and systems of mixed types."
# load a spaCy model, depending on language, scale, etc.
nlp = spacy.load("en_core_web_sm")
# add PyTextRank to the spaCy pipeline
nlp.add_pipe("textrank")
doc = nlp(text)
# examine the top-ranked phrases in the document
for phrase in doc._.phrases:
print(phrase.text)
print(phrase.rank, phrase.count)
print(phrase.chunks)
```
See the **tutorial notebooks** in the `examples` subdirectory for
sample code and patterns to use in integrating **PyTextTank** with
related libraries in Python:
Contributing Code
We welcome people getting involved as contributors to this open source
project!
For detailed instructions please see:
[CONTRIBUTING.md](https://github.com/DerwenAI/pytextrank/blob/main/CONTRIBUTING.md)
Build Instructions
Note: unless you are contributing code and updates,
in most use cases won't need to build this package locally.
Instead, simply install from
[PyPi](https://pypi.python.org/pypi/pytextrank)
or use [Conda](https://docs.conda.io/).
To set up the build environment locally, see the
["Build Instructions"](https://derwen.ai/docs/ptr/build/)
section of the online documentation.
Semantic Versioning
Generally speaking the major release number of PyTextRank
will track with the major release number of the associated spaCy
version.
See:
[CHANGELOG.md](https://github.com/DerwenAI/pytextrank/blob/main/CHANGELOG.md)
## License and Copyright
Source code for **PyTextRank** plus its logo, documentation, and examples
have an [MIT license](https://spdx.org/licenses/MIT.html) which is
succinct and simplifies use in commercial applications.
All materials herein are Copyright © 2016-2022 Derwen, Inc.
## Attribution
Please use the following BibTeX entry for citing **PyTextRank** if you
use it in your research or software:
```bibtex
@software{PyTextRank,
author = {Paco Nathan},
title = {{PyTextRank, a Python implementation of TextRank for phrase extraction and summarization of text documents}},
year = 2016,
publisher = {Derwen},
doi = {10.5281/zenodo.4637885},
url = {https://github.com/DerwenAI/pytextrank}
}
```
Citations are helpful for the continued development and maintenance of
this library.
For example, see our citations listed on
[Google Scholar](https://scholar.google.com/scholar?q=related:5tl6J4xZlCIJ:scholar.google.com/&scioq=&hl=en&as_sdt=0,5).
## Kudos
Many thanks to our open source [sponsors](https://github.com/sponsors/ceteri);
and to our contributors:
[@ceteri](https://github.com/ceteri),
[@louisguitton](https://github.com/louisguitton),
[@Ankush-Chander](https://github.com/Ankush-Chander),
[@tomaarsen](https://github.com/tomaarsen),
[@CaptXiong](https://github.com/CaptXiong),
[@Lord-V15](https://github.com/Lord-V15),
[@anna-droid-beep](https://github.com/anna-droid-beep),
[@dvsrepo](https://github.com/dvsrepo),
[@clabornd](https://github.com/clabornd),
[@dayalstrub-cma](https://github.com/dayalstrub-cma),
[@kavorite](https://github.com/kavorite),
[@htmartin](https://github.com/htmartin),
[@williamsmj](https://github.com/williamsmj/),
[@mattkohl](https://github.com/mattkohl),
[@vanita5](https://github.com/vanita5),
[@HarshGrandeur](https://github.com/HarshGrandeur),
[@mnowotka](https://github.com/mnowotka),
[@kjam](https://github.com/kjam),
[@SaiThejeshwar](https://github.com/SaiThejeshwar),
[@laxatives](https://github.com/laxatives),
[@dimmu](https://github.com/dimmu),
[@JasonZhangzy1757](https://github.com/JasonZhangzy1757),
[@jake-aft](https://github.com/jake-aft),
[@junchen1992](https://github.com/junchen1992),
[@shyamcody](https://github.com/shyamcody),
[@chikubee](https://github.com/chikubee);
also to [@mihalcea](https://github.com/mihalcea) who leads outstanding NLP research work,
encouragement from the wonderful folks at Explosion who develop [spaCy](https://github.com/explosion/spaCy),
plus general support from [Derwen, Inc.](https://derwen.ai/)
## Star History
[](https://star-history.com/#derwenai/pytextrank&Date)
%package help
Summary: Development documents and examples for pytextrank
Provides: python3-pytextrank-doc
%description help
# PyTextRank
[](https://doi.org/10.5281/zenodo.4637885)



[](http://mypy-lang.org/)
[](https://github.com/PyCQA/bandit)
[](https://lgtm.com/projects/g/DerwenAI/pytextrank/context:python)



**PyTextRank** is a Python implementation of *TextRank* as a
[spaCy pipeline extension](https://spacy.io/universe/project/spacy-pytextrank),
for graph-based natural language work -- and related knowledge graph practices.
This includes the family of
[*textgraph*](https://derwen.ai/docs/ptr/glossary/#textgraphs) algorithms:
- *TextRank* by [[mihalcea04textrank]](https://derwen.ai/docs/ptr/biblio/#mihalcea04textrank)
- *PositionRank* by [[florescuc17]](https://derwen.ai/docs/ptr/biblio/#florescuc17)
- *Biased TextRank* by [[kazemi-etal-2020-biased]](https://derwen.ai/docs/ptr/biblio/#kazemi-etal-2020-biased)
- *TopicRank* by [[bougouin-etal-2013-topicrank]](https://derwen.ai/docs/ptr/biblio/#bougouin-etal-2013-topicrank)
Popular use cases for this library include:
- *phrase extraction*: get the top-ranked phrases from a text document
- low-cost *extractive summarization* of a text document
- help infer concepts from unstructured text into more structured representation
See our full documentation at:
## Getting Started
See the ["Getting Started"](https://derwen.ai/docs/ptr/start/)
section of the online documentation.
To install from [PyPi](https://pypi.python.org/pypi/pytextrank):
```
python3 -m pip install pytextrank
python3 -m spacy download en_core_web_sm
```
If you work directly from this Git repo, be sure to install the
dependencies as well:
```
python3 -m pip install -r requirements.txt
```
Alternatively, to install dependencies using `conda`:
```
conda env create -f environment.yml
conda activate pytextrank
```
Then to use the library with a simple use case:
```python
import spacy
import pytextrank
# example text
text = "Compatibility of systems of linear constraints over the set of natural numbers. Criteria of compatibility of a system of linear Diophantine equations, strict inequations, and nonstrict inequations are considered. Upper bounds for components of a minimal set of solutions and algorithms of construction of minimal generating sets of solutions for all types of systems are given. These criteria and the corresponding algorithms for constructing a minimal supporting set of solutions can be used in solving all the considered types systems and systems of mixed types."
# load a spaCy model, depending on language, scale, etc.
nlp = spacy.load("en_core_web_sm")
# add PyTextRank to the spaCy pipeline
nlp.add_pipe("textrank")
doc = nlp(text)
# examine the top-ranked phrases in the document
for phrase in doc._.phrases:
print(phrase.text)
print(phrase.rank, phrase.count)
print(phrase.chunks)
```
See the **tutorial notebooks** in the `examples` subdirectory for
sample code and patterns to use in integrating **PyTextTank** with
related libraries in Python:
Contributing Code
We welcome people getting involved as contributors to this open source
project!
For detailed instructions please see:
[CONTRIBUTING.md](https://github.com/DerwenAI/pytextrank/blob/main/CONTRIBUTING.md)
Build Instructions
Note: unless you are contributing code and updates,
in most use cases won't need to build this package locally.
Instead, simply install from
[PyPi](https://pypi.python.org/pypi/pytextrank)
or use [Conda](https://docs.conda.io/).
To set up the build environment locally, see the
["Build Instructions"](https://derwen.ai/docs/ptr/build/)
section of the online documentation.
Semantic Versioning
Generally speaking the major release number of PyTextRank
will track with the major release number of the associated spaCy
version.
See:
[CHANGELOG.md](https://github.com/DerwenAI/pytextrank/blob/main/CHANGELOG.md)
## License and Copyright
Source code for **PyTextRank** plus its logo, documentation, and examples
have an [MIT license](https://spdx.org/licenses/MIT.html) which is
succinct and simplifies use in commercial applications.
All materials herein are Copyright © 2016-2022 Derwen, Inc.
## Attribution
Please use the following BibTeX entry for citing **PyTextRank** if you
use it in your research or software:
```bibtex
@software{PyTextRank,
author = {Paco Nathan},
title = {{PyTextRank, a Python implementation of TextRank for phrase extraction and summarization of text documents}},
year = 2016,
publisher = {Derwen},
doi = {10.5281/zenodo.4637885},
url = {https://github.com/DerwenAI/pytextrank}
}
```
Citations are helpful for the continued development and maintenance of
this library.
For example, see our citations listed on
[Google Scholar](https://scholar.google.com/scholar?q=related:5tl6J4xZlCIJ:scholar.google.com/&scioq=&hl=en&as_sdt=0,5).
## Kudos
Many thanks to our open source [sponsors](https://github.com/sponsors/ceteri);
and to our contributors:
[@ceteri](https://github.com/ceteri),
[@louisguitton](https://github.com/louisguitton),
[@Ankush-Chander](https://github.com/Ankush-Chander),
[@tomaarsen](https://github.com/tomaarsen),
[@CaptXiong](https://github.com/CaptXiong),
[@Lord-V15](https://github.com/Lord-V15),
[@anna-droid-beep](https://github.com/anna-droid-beep),
[@dvsrepo](https://github.com/dvsrepo),
[@clabornd](https://github.com/clabornd),
[@dayalstrub-cma](https://github.com/dayalstrub-cma),
[@kavorite](https://github.com/kavorite),
[@htmartin](https://github.com/htmartin),
[@williamsmj](https://github.com/williamsmj/),
[@mattkohl](https://github.com/mattkohl),
[@vanita5](https://github.com/vanita5),
[@HarshGrandeur](https://github.com/HarshGrandeur),
[@mnowotka](https://github.com/mnowotka),
[@kjam](https://github.com/kjam),
[@SaiThejeshwar](https://github.com/SaiThejeshwar),
[@laxatives](https://github.com/laxatives),
[@dimmu](https://github.com/dimmu),
[@JasonZhangzy1757](https://github.com/JasonZhangzy1757),
[@jake-aft](https://github.com/jake-aft),
[@junchen1992](https://github.com/junchen1992),
[@shyamcody](https://github.com/shyamcody),
[@chikubee](https://github.com/chikubee);
also to [@mihalcea](https://github.com/mihalcea) who leads outstanding NLP research work,
encouragement from the wonderful folks at Explosion who develop [spaCy](https://github.com/explosion/spaCy),
plus general support from [Derwen, Inc.](https://derwen.ai/)
## Star History
[](https://star-history.com/#derwenai/pytextrank&Date)
%prep
%autosetup -n pytextrank-3.2.4
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-pytextrank -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Tue Apr 11 2023 Python_Bot - 3.2.4-1
- Package Spec generated