Skip to main content

A Python package for determining a piece of text's point of view (first, second, third, or unknown).

Project description

Latest PyPI version Latest Travis CI build status Latest Codacy Coverage Report

A Python package for determining a piece of text’s point of view (first, second, third, or unknown).


pointofview is available on PyPI. Simply install it with pip:

$ pip install pointofview

You can also install it from source:

$ git clone
Cloning into 'python-pointofview'...

$ cd python-pointofview
$ python install


pointofview guesses a text’s point of view by counting point of view pronouns. The main function get_text_pov() will return ‘first’, ‘second’, ‘third’, or null (Python’s None object):

>>> import pointofview
>>> text = "I'm a piece of text written in first person! What are you?"
>>> pointofview.get_text_pov(text)

There are two other helper functions as well.

get_word_pov() returns the point of view of a single word:

>>> pointofview.get_word_pov("I")
>>> pointofview.get_word_pov("nope")

parse_pov_words returns a dict containing all first, second, and third person pov words:

>>> text = """
... When I try to analyze my own cravings, motives, actions and so forth, I surrender to a sort of retrospective imagination which feeds the analytic faculty with boundless alternatives and which causes each visualized route to fork and re-fork without end in the maddeningly complex prospect of my past.
... """
>>> pointofview.parse_pov_words(text)
{'first': ['i', 'i'], 'second': [], 'third': []}


pointofview was written by David L. Day.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pointofview-0.3.0-py2.py3-none-any.whl (15.7 kB) Copy SHA256 hash SHA256 Wheel py2.py3
pointofview-0.3.0.tar.gz (16.4 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page