Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/clips/pattern
Web mining module for Python, with tools for scraping, natural language processing, machine learning, network analysis and visualization.
https://github.com/clips/pattern
machine-learning natural-language-processing network-analysis python sentiment-analysis web-mining wordnet
Last synced: about 2 months ago
JSON representation
Web mining module for Python, with tools for scraping, natural language processing, machine learning, network analysis and visualization.
- Host: GitHub
- URL: https://github.com/clips/pattern
- Owner: clips
- License: bsd-3-clause
- Created: 2011-05-03T15:29:01.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2023-07-12T09:12:48.000Z (11 months ago)
- Last Synced: 2024-03-26T01:56:09.494Z (3 months ago)
- Topics: machine-learning, natural-language-processing, network-analysis, python, sentiment-analysis, web-mining, wordnet
- Language: Python
- Homepage: https://github.com/clips/pattern/wiki
- Size: 49.9 MB
- Stars: 8,644
- Watchers: 545
- Forks: 1,573
- Open Issues: 174
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Lists
- awesome-python - pattern - A web mining module. (Natural Language Processing)
- awesome-python-data-science - Pattern - establish websites such as Google, Twitter, and Wikipedia. Also has NLP, machine learning algorithms, and visualization (Web Scraping / Synthetic Data)
- awesomesource - Pattern
- awesome-python - pattern - A web mining module for the Python. (Natural Language Processing)
- python-awesome-case1 - pattern - A web mining module. (Natural Language Processing)
- awesome-python - pattern - A web mining module for the Python. (Natural Language Processing)
- awesome-python - pattern - A web mining module. (Natural Language Processing)
- fucking-awesome-python - :octocat: pattern - :star: 8519 :fork_and_knife: 1600 - A web mining module. (Natural Language Processing)
- awesome-python-master - pattern - A web mining module. (Natural Language Processing)
- awesome-python - pattern - Web mining module for Python. (Machine Learning)
- awesome - clips/pattern - Web mining module for Python, with tools for scraping, natural language processing, machine learning, network analysis and visualization. (Python)
- awesome-python - pattern - Web mining module for Python. (Machine Learning)
- awesome - clips/pattern - Web mining module for Python, with tools for scraping, natural language processing, machine learning, network analysis and visualization. (Python)
- awesome-machine-learning - pattern - Web mining module for Python. (Python / General-Purpose Machine Learning)
- awesome-machine-learning - pattern - Web mining module for Python. (Python / General-Purpose Machine Learning)
- awesome-python - pattern - A web mining module for the Python. (Natural Language Processing)
- awesome-stars - pattern
- awesome-stars - pattern
- awesome-stars - clips/pattern - Web mining module for Python, with tools for scraping, natural language processing, machine learning, network analysis and visualization. (Python)
- awesome-python-cn - pattern
- awesome-python - pattern - Web mining module for Python. (Machine Learning)
- awesome-machine-learning - pattern - Web mining module for Python. (Python / General-Purpose Machine Learning)
- awesome-python - pattern - A web mining module. (Natural Language Processing)
- awesome-python-cn - 官网
- awesome-python-clone - pattern - A web mining module. (Natural Language Processing)
- awesome-python4 - pattern - Web mining module for Python. (Machine Learning)
- awesome-python - pattern - Web mining module for Python. (Machine Learning)
- awesomesource - Pattern
- awesome-python - pattern - A web mining module. (Natural Language Processing)
- fucking-awesome-python - :octocat: pattern - :star: 7649 :fork_and_knife: 1512 - A web mining module. (Natural Language Processing)
- awesome-stars - clips/pattern - Web mining module for Python, with tools for scraping, natural language processing, machine learning, network analysis and visualization. (Python)
- awesome-python-zh - pattern - 一个web挖掘模块。 (自然语言处理)
- awesome-python - pattern - A web mining module. (Natural Language Processing)
- awesome-python-resources - GitHub - 62% open · ⏱️ 25.04.2020): (自然语言处理)
- awesome-python - pattern - A web mining module. (Natural Language Processing)
- awesome-machine-learning-library - pattern - Web mining module for Python. (Python / General-Purpose Machine Learning)
- awesome-machine-learning - pattern - Web mining module for Python. (Python / General-Purpose Machine Learning)
- awesome-python - pattern - A web mining module. (Natural Language Processing)
- awesome-machine-learning - pattern - Web mining module for Python. (Python / General-Purpose Machine Learning)
- awesome-python - pattern - A web mining module for the Python. (Natural Language Processing)
- awesomesource - Pattern
- awesome-stars - pattern
- awesome-python-master - pattern - A web mining module. (Natural Language Processing)
- awesome-machine-learning - pattern - Web mining module for Python. (Python / General-Purpose Machine Learning)
- awesome-python-data-science - pattern - Web ining module. (Feature Extraction / Text/NLP)
- awesome-machine-learning - pattern - Web mining module for Python. (Python / General-Purpose Machine Learning)
- awesome-python - pattern - Web mining module for Python. (Machine Learning)
- awesome-machine-learning - pattern - Web mining module for Python. (Python / General-Purpose Machine Learning)
- awesome-python - pattern - A web mining module. (Natural Language Processing)
- awesome-python-cn - 官网
- awesomePython - pattern - A web mining module for the Python. (Natural Language Processing)
- python-awesome - pattern - A web mining module. (Natural Language Processing)
- my-awesome - clips/pattern - Web mining module for Python, with tools for scraping, natural language processing, machine learning, network analysis and visualization. (Python)
- awesome-machine-learning - pattern - Web mining module for Python. (Python / General-Purpose Machine Learning)
- my-awesome-stars - clips/pattern - Web mining module for Python, with tools for scraping, natural language processing, machine learning, network analysis and visualization. (Python)
- awesome-python - pattern - A web mining module for the Python. (Natural Language Processing)
- fucking_awesome_python - pattern - Web mining module for Python. (Machine Learning)
- awesome-machine-learning - pattern - Web mining module for Python. (Python / General-Purpose Machine Learning)
- awesome-python-data-science - Pattern - establish websites such as Google, Twitter, and Wikipedia. Also has NLP, machine learning algorithms, and visualization (Web Scraping / Others)
- awesome-machine-learning - pattern - Web mining module for Python. (Python / General-Purpose Machine Learning)
- awesome-advanced-metering-infrastructure - pattern - Web mining module for Python. (Python / General-Purpose Machine Learning)
- awesome-python - pattern - A web mining module. (Natural Language Processing)
- awesome-machine-learning - pattern - Web mining module for Python. (Python / General-Purpose Machine Learning)
- awesome-machine-master - pattern - Web mining module for Python. (Python / General-Purpose Machine Learning)
- awesome-python - pattern - A web mining module. (Natural Language Processing)
- project-awesome - clips/pattern - Web mining module for Python, with tools for scraping, natural language processing, machine learning, network analysis and visualization. (Python)
- awesome-stars - pattern
- my-stars - clips/pattern - Web mining module for Python, with tools for scraping, natural language processing, machine learning, network analysis and visualization. (Python)
- starred-awesome - pattern - Web mining module for Python, with tools for scraping, natural language processing, machine learning, network analysis and visualization. (Python)
- awesome-machine-learning - pattern - Web mining module for Python. (Python / General-Purpose Machine Learning)
- awesome-python - pattern - A web mining module for the Python. (Natural Language Processing)
- awesome-machine-learnings - pattern - Web mining module for Python. (Python / General-Purpose Machine Learning)
- awesome-machine-learning - pattern - Web mining module for Python. (Python / General-Purpose Machine Learning)
- awesome-python - pattern - A web mining module for the Python. (Natural Language Processing)
- awesome-machine-learning - pattern - Web mining module for Python. (Python / General-Purpose Machine Learning)
- awesome-python - pattern - Web mining module for Python. (Machine Learning)
- awesome-starred - clips/pattern - Web mining module for Python, with tools for scraping, natural language processing, machine learning, network analysis and visualization. (python)
- awesome-machine-learning - pattern - Web mining module for Python. (Python / General-Purpose Machine Learning)
- awesome-stars - clips/pattern - `★8691` Web mining module for Python, with tools for scraping, natural language processing, machine learning, network analysis and visualization. (Python)
- AI - pattern - Web mining module for Python. (Python / General-Purpose Machine Learning)
- awesome-python-cn - pattern
- awesome-stars - clips/pattern - Web mining module for Python, with tools for scraping, natural language processing, machine learning, network analysis and visualization. (python)
- awesome-machine-learning - pattern - Web mining module for Python. (Python / General-Purpose Machine Learning)
- awesome-machine-learning-cn - 官网
- my-awesome-stars - clips/pattern - Web mining module for Python, with tools for scraping, natural language processing, machine learning, network analysis and visualization. (Python)
README
Pattern
=======[![Build Status](http://img.shields.io/travis/clips/pattern/master.svg?style=flat)](https://travis-ci.org/clips/pattern/branches)
[![Coverage](https://img.shields.io/coveralls/clips/pattern/master.svg?style=flat)](https://coveralls.io/github/clips/pattern?branch=master)
[![PyPi version](http://img.shields.io/pypi/v/pattern.svg?style=flat)](https://pypi.python.org/pypi/pattern)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-green.svg?style=flat)](https://github.com/clips/pattern/blob/master/LICENSE.txt)Pattern is a web mining module for Python. It has tools for:
* Data Mining: web services (Google, Twitter, Wikipedia), web crawler, HTML DOM parser
* Natural Language Processing: part-of-speech taggers, n-gram search, sentiment analysis, WordNet
* Machine Learning: vector space model, clustering, classification (KNN, SVM, Perceptron)
* Network Analysis: graph centrality and visualization.It is well documented, thoroughly tested with 350+ unit tests and comes bundled with 50+ examples. The source code is licensed under BSD.
![Example workflow](https://raw.githubusercontent.com/clips/pattern/master/docs/g/pattern_schema.gif)
Example
-------This example trains a classifier on adjectives mined from Twitter using Python 3. First, tweets that contain hashtag #win or #fail are collected. For example: *"$20 tip off a sweet little old lady today #win"*. The word part-of-speech tags are then parsed, keeping only adjectives. Each tweet is transformed to a vector, a dictionary of adjective → count items, labeled `WIN` or `FAIL`. The classifier uses the vectors to learn which other tweets look more like `WIN` or more like `FAIL`.
```python
from pattern.web import Twitter
from pattern.en import tag
from pattern.vector import KNN, counttwitter, knn = Twitter(), KNN()
for i in range(1, 3):
for tweet in twitter.search('#win OR #fail', start=i, count=100):
s = tweet.text.lower()
p = '#win' in s and 'WIN' or 'FAIL'
v = tag(s)
v = [word for word, pos in v if pos == 'JJ'] # JJ = adjective
v = count(v) # {'sweet': 1}
if v:
knn.train(v, type=p)print(knn.classify('sweet potato burger'))
print(knn.classify('stupid autocorrect'))
```Installation
------------Pattern supports Python 2.7 and Python 3.6. To install Pattern so that it is available in all your scripts, unzip the download and from the command line do:
```bash
cd pattern-3.6
python setup.py install
```If you have pip, you can automatically download and install from the [PyPI repository](https://pypi.python.org/pypi/pattern):
```bash
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:\python36\Lib\site-packages\` (Windows),
* `/Library/Python/3.6/site-packages/` (Mac OS X),
* `/usr/lib/python3.6/site-packages/` (Unix).
- Add the location of the module to `sys.path` in your script, before importing it:```python
MODULE = '/users/tom/desktop/pattern'
import sys; if MODULE not in sys.path: sys.path.append(MODULE)
from pattern.en import parsetree
```Documentation
-------------For documentation and examples see the [user documentation](https://github.com/clips/pattern/wiki).
Version
-------3.6
License
-------**BSD**, see `LICENSE.txt` for further details.
Reference
---------De Smedt, T., Daelemans, W. (2012). Pattern for Python. *Journal of Machine Learning Research, 13*, 2031–2035.
Contribute
----------The source code is hosted on GitHub and contributions or donations are welcomed.
Bundled dependencies
--------------------Pattern is bundled with the following data sets, algorithms and Python packages:
- **Brill tagger**, Eric Brill
- **Brill tagger for Dutch**, Jeroen Geertzen
- **Brill tagger for German**, Gerold Schneider & Martin Volk
- **Brill tagger for Spanish**, trained on Wikicorpus (Samuel Reese & Gemma Boleda et al.)
- **Brill tagger for French**, trained on Lefff (Benoît Sagot & Lionel Clément et al.)
- **Brill tagger for Italian**, mined from Wiktionary
- **English pluralization**, Damian Conway
- **Spanish verb inflection**, Fred Jehle
- **French verb inflection**, Bob Salita
- **Graph JavaScript framework**, Aslak Hellesoy & Dave Hoover
- **LIBSVM**, Chih-Chung Chang & Chih-Jen Lin
- **LIBLINEAR**, Rong-En Fan et al.
- **NetworkX centrality**, Aric Hagberg, Dan Schult & Pieter Swart
- **spelling corrector**, Peter NorvigAcknowledgements
----------------**Authors:**
- Tom De Smedt ([email protected])
- Walter Daelemans ([email protected])**Contributors (chronological):**
- Frederik De Bleser
- Jason Wiener
- Daniel Friesen
- Jeroen Geertzen
- Thomas Crombez
- Ken Williams
- Peteris Erins
- Rajesh Nair
- F. De Smedt
- Radim Řehůřek
- Tom Loredo
- John DeBovis
- Thomas Sileo
- Gerold Schneider
- Martin Volk
- Samuel Joseph
- Shubhanshu Mishra
- Robert Elwell
- Fred Jehle
- Antoine Mazières + fabelier.org
- Rémi de Zoeten + closealert.nl
- Kenneth Koch
- Jens Grivolla
- Fabio Marfia
- Steven Loria
- Colin Molter + tevizz.com
- Peter Bull
- Maurizio Sambati
- Dan Fu
- Salvatore Di Dio
- Vincent Van Asch
- Frederik Elwert