Simplifying representation for natural language processing
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.
- Python 3.0 or higher
- Stanford Core NLP (3.9.2)
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]
import POSPair wordPairs = POSPair.WordPairs("POSPair model is a simplifying representation.")
'POSPair model' 'model representation' 'representation is' 'representation a' 'representation simplifying'
Get in touch at email@example.com for any queries or help.
- Stanford Core NLP
- Stanford Core NLP
Please provide feedback or get in touch at firstname.lastname@example.org
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size POSPair-0.0.4-py3-none-any.whl (19.7 kB)||File type Wheel||Python version py3||Upload date||Hashes View hashes|
|Filename, size POSPair-0.0.4.tar.gz (6.6 kB)||File type Source||Python version None||Upload date||Hashes View hashes|