wordsUsed: Python List of the Distinct Words in a List of Tokens

Description Usage Details Python Functions

Description

[Python Documentation] Given a list of tokens, returns a list of the distinct words included. Words are converted to lower case for comparison. Common words are excluded by default, being defined as the stopwords set from NLTK supplemented with a few common words in Elizabethan English. Punctuation is also excluded by default. Optional second & third arguments in the call can override if supplied as True.

Usage

1
wordsUsed(..., .ev = XRPython::RPython(), .get = NA)

Details

The function can also be called with a dictionary whose elements are token lists, as returned by the tokens() function. In this case, it calls iself recursively to in effect apply the function to each element, returning a corresponding dictionary.

Python Functions

wordsUsed(tokens, includeCommon =, includePunctuation =)


johnmchambers/shakespeare documentation built on May 19, 2019, 5:16 p.m.