
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@1383 fd906abe-77d9-0310-91a1-e0d9ade77398
19 lines
521 B
Text
19 lines
521 B
Text
=================================================
|
|
Text transformations, e.g. for full-text indexing
|
|
=================================================
|
|
|
|
($Id$)
|
|
|
|
>>> import os
|
|
>>> from cybertools import text
|
|
>>> directory = os.path.dirname(text.__file__)
|
|
>>> fn = os.path.sep.join((directory, 'testfiles', 'mary.pdf'))
|
|
>>> f = open(fn)
|
|
|
|
>>> from cybertools.text.pdf import PdfTransform
|
|
>>> transform = PdfTransform(None)
|
|
>>> words = transform(f).split()
|
|
>>> len(words)
|
|
89
|
|
>>> u'lamb' in words
|
|
True
|