Natural language processing tools
Project description
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'] ===
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyrxnlp-0.1.5.3.tar.gz
(11.3 kB
view details)
File details
Details for the file pyrxnlp-0.1.5.3.tar.gz
.
File metadata
- Download URL: pyrxnlp-0.1.5.3.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 863a4aa9e955236068adcd9c64a6de51c238a8acc6c9e068788bdf5c139208c2 |
|
MD5 | 212fcbab18b1d3822b6e8904cf441ace |
|
BLAKE2b-256 | d2741cda7ec700e0721e68ea58e70eeef52d3620e34c3ff8949df0681ba1b10b |