Skip to main content

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.

  1. Noun - Used to name persons, things, animals, places, ideas, or events. (Noun)
  2. Pronoun - Functions as a replacement for Noun. (Pronoun)
  3. Adjective - Used to describe Noun or Pronoun. (Noun - Adjective OR Pronoun - Adjective)
  4. Verb - Shows action or state of being. (Noun - Verb OR Pronoun - Verb)
  5. Adverb - Describes Adjective, Verb or another Adverb. (Verb - Adverb, Adverb - Adverb, Adjective - Adverb)
  6. Preposition - Words that specify location or location in time. (Noun - Preposition OR Pronoun - Preposition)
  7. Conjunction - Joins words, phrases or clauses together. (Noun - Conjunction OR Pronoun - Conjunction)
  8. 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:

  1. Python 3.0 or higher
  2. Stanford Core NLP (3.9.2)

INSTALLING:

1. pip install POSPair
  1. Read instructions on how to install and run Stanford CoreNLP server

[Note: Keep the Stanford CoreNLP Server port: 9000]

  1. 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:

  1. Python
  2. Stanford Core NLP
  3. Pycorenlp

CONTRIBUTING:

Read CONTRIBUTING.md

AUTHOR:

Jim Macwan

LICENSE:

GNU General Public License v3.0

ACKNOWLEDGMENTS:

  1. Stanford Core NLP
  2. 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

POSPair-0.0.3.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

POSPair-0.0.3-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file POSPair-0.0.3.tar.gz.

File metadata

  • Download URL: POSPair-0.0.3.tar.gz
  • Upload date:
  • Size: 6.7 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

Hashes for POSPair-0.0.3.tar.gz
Algorithm Hash digest
SHA256 f1ceaab3ac09b541da2dec41b8c7816b0ad1a802c4d4001fafdb1b99cb6f0d52
MD5 9c5913120d25f022eddfb6fa57114b03
BLAKE2b-256 d7f8c77d776d026d575e0b4466a6b1d1fec435ca42aea7e4f18f64d013388fd8

See more details on using hashes here.

File details

Details for the file POSPair-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: POSPair-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 19.8 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

Hashes for POSPair-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 17f24fcdbf81a02ecd542d1900da3f3d2b50df09f6b6765a21bb0ec8bb0deaae
MD5 ce48ced95e8567bcd2198ba8276b7767
BLAKE2b-256 60d4978f45ac3bbeda93044057d8a3d80bfa57568e10a7b5e54962d046dcef6f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page