Skip to main content

PyPOS - Python Part-of-Speech tagger

This is  a  project, which allows its  users to assign part of speech tags to words in a  sentence .
dt   vbz dt nn     , wdt   vbz    prp$ nns   to vb     nn   in nn     nns  to nns   in dt nn       .

PyPOS uses Hidden Markov Models and Viterbi decoding to determine the most likely sequence of POS tags for a given sequence of words.

Usage

Installation

Requires Python 3.6 or higher

pip3 install pypos

Training

from pypos import PartOfSpeechTagger, PartOfSpeechDataset
tagger = PartOfSpeechTagger()
ds = PartOfSpeechDataset.load('train.txt')
tagger.fit(ds).save('tagger.p')

Tagging

from pypos import PartOfSpeechTagger
tagger = PartOfSpeechTagger.load('tagger.p')

# Reproducing the results shown above:
sentence = 'This is a project, which allows its users to assign part of speech tags to words in a sentence.'
tokens = tagger.tokenize(sentence)
tags = tagger.tag(sentence, human_readable=False)

Metadata

Release files for pypos 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pypos 0.1.2
File Size Uploaded
pypos-0.1.2.tar.gz 3.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pypos 0.1.2
File Interpreter ABI Platform
pypos-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 8.8 kB

Release files / pypos-0.1.2.tar.gz

Download URL pypos-0.1.2.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d5acb4f4968f88877a8626b8cee877d2b3a56fca57987cf08da1346cc540a1cd
BLAKE2b-256 checksum
How to use checksums
9fda9b94d9e0926dc960107492cc29c023a7aeebba326a574aa4816e351ce183
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.23.3 CPython/3.6.5

Release files / pypos-0.1.2-py3-none-any.whl

Download URL pypos-0.1.2-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
062344d6354f88fe2f3e3301803e6eb6402482205efc46783752b597f24f6b75
BLAKE2b-256 checksum
How to use checksums
dac224a8f9e47d0f2e03a1e68afb75b3660dcc58622e1bb9069d3c8bad1b32bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.23.3 CPython/3.6.5

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page