Simplifying representation for natural language processing
Project description
POSPair
POSPair model is a simplifying representation for Natural Language Processing. POSPair Model represents data based on part-of-speech and relations between different part-of-speech. In POSPair model, Word pairs are the unit values generated with refrence to the context present in that sentence. Besides just closeness, word frequency or syntactic relatedness, POSPair model takes into account the actual form of relationship between words, which words are related and how they are related.
How It Works
Words are the smallest elements. Based on their use and functions, words are categorized into several types of part-of-speech.
- Noun - Used to name persons, things, animals, places, ideas, or events. (Noun)
- Pronoun - Functions as a replacement for Noun. (Pronoun)
- Adjective - Used to describe Noun or Pronoun. (Noun - Adjective OR Pronoun - Adjective)
- Verb - Shows action or state of being. (Noun - Verb OR Pronoun - Verb)
- Adverb - Describes Adjective, Verb or another Adverb. (Verb - Adverb, Adverb - Adverb, Adjective - Adverb)
- Preposition - Words that specify location or location in time. (Noun - Preposition OR Pronoun - Preposition)
- Conjunction - Joins words, phrases or clauses together. (Noun - Conjunction OR Pronoun - Conjunction)
- Interjection - Words that express emotion. (Interjection)
As per the definition and semantics of each part-of-speech, words of only specific part-of-speech are related with each other and provide some meaningful relation.
According to part-of-speech, Words are related to each other through above given relations, but in a specific manner. Above relations are one sided relations. Eg. Adjective desribes Noun, Noun does not describe Adjective
The representation of data is done in form of word pairs. At a time, the relations between part-of-speech can be properly represented between two words only. Word pairs are the simplest form of representation.
Word pairs are generated with the refrence to the whole text. Word pairs can be understood when the whole sentence is taken into context.
GETTING STARTED:
PREREQUISITES:
- Python 3.0 or higher
- Stanford Core NLP (3.9.2)
INSTALLING:
1. pip install POSPair
- Read instructions on how to install and run Stanford CoreNLP server
[Note: Keep the Stanford CoreNLP Server port: 9000]
- POSPair Functions:
1. POSPair.WordPairs(string)
2. POSPair.WordPairsWithValues(string)
3. POSPair.separateWordPair(string) [String should be word-pair]
Example:
import POSPair
wordPairs = POSPair.WordPairs("POSPair model is a simplifying representation.")
Output:
'POSPair model'
'model representation'
'representation is'
'representation a'
'representation simplifying'
Get in touch at pospair.contact@gmail.com for any queries or help.
BUILT WITH:
- Python
- Stanford Core NLP
- Pycorenlp
CONTRIBUTING:
Read CONTRIBUTING.md
AUTHOR:
Jim Macwan
LICENSE:
GNU General Public License v3.0
ACKNOWLEDGMENTS:
- Stanford Core NLP
- Pycorenlp
Please provide feedback or get in touch at pospair.contact@gmail.com
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file POSPair-0.0.4.tar.gz
.
File metadata
- Download URL: POSPair-0.0.4.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1ffce10e82738a0563276045d54c835bc8f362d5b758c995027961c50f650cd |
|
MD5 | f6bf5b8d6743dbc6ec6912961fedf082 |
|
BLAKE2b-256 | 920a900c0ad491ab9746385f654412934a8b6f8f7121da8995c744a060b3ebdf |
File details
Details for the file POSPair-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: POSPair-0.0.4-py3-none-any.whl
- Upload date:
- Size: 19.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6898ab4876beb91b7a6c090c572c2d91853dd7d5afe9be597152bc112cc12b4d |
|
MD5 | b0a05de36e3e10c5e2d488ab8c64987f |
|
BLAKE2b-256 | 9df94d1d0be8537d56538a9c80ae5eb10c37f8ceda5fb6c8ed8b8b3cdb4d9695 |