Pattern is a web mining module for the Python programming language. It bundles tools for:
It is well documented and bundled with 30+ examples and 350+ unit tests. The source code is licensed under BSD and available from http://www.clips.ua.ac.be/pages/pattern.

2.6
BSD, see LICENSE.txt for further details.
Pattern is written for Python 2.5+ (no support for Python 3 yet). The module has no external dependencies except when using LSA in the pattern.vector module, which requires NumPy (installed by default on Mac OS X). To install Pattern so that it is available in all your scripts, unzip the download and from the command line do:
cd pattern-2.6
python setup.py install
If you have pip, you can automatically download and install from the PyPi repository:
pip install pattern
If none of the above works, you can make Python aware of the module in three ways:
- Put the pattern folder in the same folder as your script.
- Put the pattern folder in the standard location for modules so it is available to all scripts:
* c:\python26\Lib\site-packages\ (Windows),
* /Library/Python/2.6/site-packages/ (Mac OS X),
* /usr/lib/python2.6/site-packages/ (Unix).
- Add the location of the module to sys.path in your script, before importing it:
MODULE = '/users/tom/desktop/pattern'
import sys; if MODULE not in sys.path: sys.path.append(MODULE)
from pattern.en import parsetree
http://www.clips.ua.ac.be/pages/pattern
De Smedt, T., Daelemans, W. (2012). Pattern for Python. Journal of Machine Learning Research, 13, 2031–2035.
The source code is hosted on GitHub and contributions or donations are welcomed, see the developer documentation. If you use Pattern in your work, please cite our reference paper.
Pattern is bundled with the following data sets, algorithms and Python packages:
Authors:
Contributors (chronological):
$ claude mcp add pattern \
-- python -m otcore.mcp_server <graph>