TextGraphCrafts
Python-based summary, keyphrase and relation extractor from text documents using dependency graphs.
HOME: https://github.com/ptarau/TextGraphCrafts
Project Description
** The system uses dependency links for building Text Graphs, that with help of a centrality algorithm like PageRank, extract relevant keyphrases, summaries and relations from text documents. Developed with Python 3, on OS X, but portable to Linux.**
Dependencies:
- python 3.7 or newer, pip3, java 9.x or newer. Also, having git installed is recommended for easy updates
pip3 install nltk- also, run in python3 something like
import nltk
nltk.download('wordnet')
nltk.download('words')
nltk.download('stopwords')
- or, if that fails on a Mac, use run
python3 down.pyto collect the desired nltk resource files. pip3 install networkxpip3 install requestspip3 install graphviz, also ensure .gv files can be viewedpip3 install stanfordnlpparser- Note that
stanfordnlprequires torch binaries which are easier to instal with ````anaconda```.
Tested with the above on a Mac, with macOS Mojave and Catalina and on Ubuntu Linux 18.x.
Running it:
in a shell window, run
start_server.sh
in another shell window, start with
python3 -i tests.py
and then interactively, at the ">>>" prompt, try
>>> test1()
>>> test2()
>>> ...
>>> test9()
>>> test12()
>>> test0()
see how to activate other outputs in file
deepRank.py
text file inputs (including the US Constitution const.txt) are in the folder
examples/
Handling PDF documents
The easiest way to do this is to install pdftotext, which is part of Poppler tools.
If pdftotext is installed, you can place a file like textrank.pdf already in subdirectory pdfs/ and try something similar to:
Change setting in file params.py to use the system with other global parameter settings.
Alternative NLP toolkit
Optionally, you can activate the alternative Stanford CoreNLP toolkit as follows:
- install Stanford CoreNLP and unzip in a derictory of your choice (ag., the local directory)
- edit if needed
start_parser.shwith the location of the parser directory - override the
paramsclass and setcorenlp=True
Note however that the Stanford CoreNLP is GPL-licensed, which can place restrictions on proprietary software activating this option.
Metadata
Release files for textcrafts 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| textcrafts-0.1.2.tar.gz | 13.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| textcrafts-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.2 kB
Release files / textcrafts-0.1.2.tar.gz
| Download URL | textcrafts-0.1.2.tar.gz |
|---|---|
| Size | 13.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
82b51a2d3a462a75339401991ce64207914c6d93f01ec4d31c40c6c0b40a25ac
|
|
BLAKE2b-256 checksum How to use checksums |
288c35ef0a663fe48ecf3fe57cd03d5e792466a79cea5a8a313798c569ac7caa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/42.0.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4
|
Release files / textcrafts-0.1.2-py3-none-any.whl
| Download URL | textcrafts-0.1.2-py3-none-any.whl |
|---|---|
| Size | 17.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d1cb15aba45280852a51da0e3ec46efb8e3aca9e43a63995a10b119d8a16ad0
|
|
BLAKE2b-256 checksum How to use checksums |
50322f4e76eb7cd4e13bd6f74db1b29badcd4ac8689c913d073866afbbf654f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/42.0.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4
|
Security for textcrafts 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.