Package nltk_lite :: Package tokenize :: Module sexpr'
[hide private]
[frames] | no frames]

Module sexpr'

source code

Functions [hide private]
 
demo() source code
 
sexpr(s)
Tokenize the text into s-expressions.
source code
Function Details [hide private]

sexpr(s)

source code 

Tokenize the text into s-expressions. For example, the input "(a b (c d)) e (f)" is tokenized into the following sequence: "(a b (c d))", "e", "(f)".

Parameters:
  • s (string or iter(string)) - the string or string iterator to be tokenized
Returns:
An iterator over tokens (each of which is an s-expression)