pointofview
A Python package for determining a piece of text's point of view (first, second, third, or unknown).
Installation
pointofview is available on PyPI. Simply install it with pip:
pip install pointofview
You can also install it from source:
$ git clone https://github.com/prosegrinder/python-pointofview.git
Cloning into 'python-pointofview'...
...
$ cd python-pointofview
$ python setup.py install
...
Usage
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)
'first'
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")
'first'
>>> pointofview.get_word_pov("nope")
None
parse_pov_words() returns a dict containing all first-, second-, and
third-person point-of-view 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': []}
Metadata
Release files for pointofview 1.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pointofview-1.1.3.tar.gz | 15.3 kB | Without provenance | Details for pointofview-1.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pointofview-1.1.3-py3-none-any.whl | Python 3 | none | any | Details for pointofview-1.1.3-py3-none-any.whl |
Total release size: 31.3 kB
Release files / pointofview-1.1.3.tar.gz
| Download URL | pointofview-1.1.3.tar.gz |
|---|---|
| Size | 15.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d09e40a3884f2397d7e0e228d7d52d57d10db402b38ebea45904d2d4ad18788
|
|
BLAKE2b-256 checksum How to use checksums |
3a30701efa2240b7976aa1464f23543f4f9d2e1fdadc8e00993a073a4acfcd07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.12.3 Linux/6.11.0-1018-azure
|
Release files / pointofview-1.1.3-py3-none-any.whl
| Download URL | pointofview-1.1.3-py3-none-any.whl |
|---|---|
| Size | 16.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ca8ab3512377145603df42fda8870c3da9a4c9cc23bc6e344fdba9b3fb269fcd
|
|
BLAKE2b-256 checksum How to use checksums |
4f0fdcf2b4d55481d979570d70625598a4c14d2f18efae7b27133087cb8360a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.12.3 Linux/6.11.0-1018-azure
|
Security for pointofview 1.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.