You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
``pointofview`` guesses a text's point of view by counting point of view pronouns. The main function ``get_pov()`` will return 'first', 'second', 'third', or null (Python's ``None`` object)::
23
39
24
-
Requirements
25
-
^^^^^^^^^^^^
40
+
>>> import pointofview
41
+
>>> text = "I'm a piece of text written in first person! What are you?"
42
+
>>> pointofview.get_pov(text)
43
+
'first'
26
44
27
-
Compatibility
28
-
-------------
45
+
There are two other helper functions as well.
29
46
30
-
License
31
-
-------
47
+
``get_word_pov()`` returns the point of view of a single word::
48
+
49
+
>>> pointofview.get_word_pov("I")
50
+
'first'
51
+
>>> pointofview.get_word_pov("nope")
52
+
None
53
+
54
+
``parse_pov_words`` returns a dict containing all first, second, and third person pov words::
55
+
56
+
>>> text = """
57
+
... 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.
0 commit comments