PyRXNLP - Text-mining tools for building intelligent data-driven applications.
Features:
Topics extraction
Sentence clustering - with cluster labels
Opinosis opinion summarization
Getting Started:
Install pyrxnlp
pip install pyrxnlp
If you are using the cloud APIs, get your API Key
Start coding. Here’s an example of Clustering Sentences
apikey = "your_api_key"
# Cluster from a list of sentences
list_of_sentences = [
"the sky is so high",
"the sky is blue",
"fly high into the sky.",
"the trees are really tall",
"I love the trees",
"trees make me happy",
"the sun is shining really bright"]
# initialize sentence clustering
clustering = ClusterSentences (apikey)
# generate clusters and print
clusters = clustering.cluster_from_list (list_of_sentences)
if clusters is not None:
print ("------------------------------")
print ("Clusters from a list of sentences")
print ("------------------------------")
clustering.print_clusters (clusters)
You should see output similar to:
------------------------------ Clusters from a list of sentences ------------------------------ Cluster label: ['sky'] Cluster scores: 6.571693476432014 Cluster sentences: ['fly high into the sky.', 'the sky is so high', 'the sky is blue'] === Cluster label: ['tree'] Cluster scores: 6.571693476432014 Cluster sentences: ['I love the trees', 'trees make me happy', 'the trees are really tall'] === Cluster label: ['sentences_with_no_cluster_membership'] Cluster scores: 0.0 Cluster sentences: ['0006:the sun is shining really bright'] ===
Metadata
Release files for pyrxnlp 0.1.5.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyrxnlp-0.1.5.3.tar.gz | 11.3 kB | Details |
Release files / pyrxnlp-0.1.5.3.tar.gz
| Download URL | pyrxnlp-0.1.5.3.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
863a4aa9e955236068adcd9c64a6de51c238a8acc6c9e068788bdf5c139208c2
|
|
BLAKE2b-256 checksum How to use checksums |
d2741cda7ec700e0721e68ea58e70eeef52d3620e34c3ff8949df0681ba1b10b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |