{"id":13468338,"url":"https://github.com/clips/pattern","last_synced_at":"2026-02-28T13:09:35.921Z","repository":{"id":1460950,"uuid":"1696822","full_name":"clips/pattern","owner":"clips","description":"Web mining module for Python, with tools for scraping, natural language processing, machine learning, network analysis and visualization.","archived":false,"fork":false,"pushed_at":"2024-06-10T18:46:41.000Z","size":52274,"stargazers_count":8841,"open_issues_count":176,"forks_count":1580,"subscribers_count":525,"default_branch":"master","last_synced_at":"2025-11-10T05:03:17.519Z","etag":null,"topics":["machine-learning","natural-language-processing","network-analysis","python","sentiment-analysis","web-mining","wordnet"],"latest_commit_sha":null,"homepage":"https://github.com/clips/pattern/wiki","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clips.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-05-03T15:29:01.000Z","updated_at":"2025-11-07T09:10:35.000Z","dependencies_parsed_at":"2022-07-13T19:10:53.423Z","dependency_job_id":"cea65b92-6978-4913-b5d3-4c4c0f2d3503","html_url":"https://github.com/clips/pattern","commit_stats":{"total_commits":1367,"total_committers":31,"mean_commits":"44.096774193548384","dds":0.4162399414776884,"last_synced_commit":"d25511f9ca7ed9356b801d8663b8b5168464e68f"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/clips/pattern","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clips%2Fpattern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clips%2Fpattern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clips%2Fpattern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clips%2Fpattern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clips","download_url":"https://codeload.github.com/clips/pattern/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clips%2Fpattern/sbom","scorecard":{"id":291810,"data":{"date":"2025-08-11","repo":{"name":"github.com/clips/pattern","commit":"d25511f9ca7ed9356b801d8663b8b5168464e68f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 1/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":4,"reason":"binaries present in source code","details":["Warn: binary detected: pattern/vector/svm/macos/liblinear-2.20/liblinear.so.3:1","Warn: binary detected: pattern/vector/svm/macos/libsvm-3.22/libsvm.so.2:1","Warn: binary detected: pattern/vector/svm/ubuntu/liblinear-2.20/liblinear.so.3:1","Warn: binary detected: pattern/vector/svm/ubuntu/libsvm-3.22/libsvm.so.2:1","Warn: binary detected: pattern/vector/svm/windows/liblinear-2.20/liblinear.dll:1","Warn: binary detected: pattern/vector/svm/windows/libsvm-3.22/libsvm.dll:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 3.7-beta not signed: https://api.github.com/repos/clips/pattern/releases/75766610","Warn: release artifact 3.7-beta does not have provenance: https://api.github.com/repos/clips/pattern/releases/75766610"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T18:26:58.274Z","repository_id":1460950,"created_at":"2025-08-17T18:26:58.274Z","updated_at":"2025-08-17T18:26:58.274Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29935043,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T13:00:17.143Z","status":"ssl_error","status_checked_at":"2026-02-28T12:59:13.669Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["machine-learning","natural-language-processing","network-analysis","python","sentiment-analysis","web-mining","wordnet"],"created_at":"2024-07-31T15:01:09.066Z","updated_at":"2026-02-28T13:09:35.901Z","avatar_url":"https://github.com/clips.png","language":"Python","readme":"Pattern\n=======\n\n[![Build Status](http://img.shields.io/travis/clips/pattern/master.svg?style=flat)](https://travis-ci.org/clips/pattern/branches)\n[![Coverage](https://img.shields.io/coveralls/clips/pattern/master.svg?style=flat)](https://coveralls.io/github/clips/pattern?branch=master)\n[![PyPi version](http://img.shields.io/pypi/v/pattern.svg?style=flat)](https://pypi.python.org/pypi/pattern)\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-green.svg?style=flat)](https://github.com/clips/pattern/blob/master/LICENSE.txt)\n\nPattern is a web mining module for Python. It has tools for:\n\n * Data Mining: web services (Google, Twitter, Wikipedia), web crawler, HTML DOM parser\n * Natural Language Processing: part-of-speech taggers, n-gram search, sentiment analysis, WordNet\n * Machine Learning: vector space model, clustering, classification (KNN, SVM, Perceptron)\n * Network Analysis: graph centrality and visualization.\n\nIt is well documented, thoroughly tested with 350+ unit tests and comes bundled with 50+ examples. The source code is licensed under BSD.\n\n![Example workflow](https://raw.githubusercontent.com/clips/pattern/master/docs/g/pattern_schema.gif)\n\nExample\n-------\n\nThis 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`.\n\n```python\nfrom pattern.web import Twitter\nfrom pattern.en import tag\nfrom pattern.vector import KNN, count\n\ntwitter, knn = Twitter(), KNN()\n\nfor i in range(1, 3):\n    for tweet in twitter.search('#win OR #fail', start=i, count=100):\n        s = tweet.text.lower()\n        p = '#win' in s and 'WIN' or 'FAIL'\n        v = tag(s)\n        v = [word for word, pos in v if pos == 'JJ'] # JJ = adjective\n        v = count(v) # {'sweet': 1}\n        if v:\n            knn.train(v, type=p)\n\nprint(knn.classify('sweet potato burger'))\nprint(knn.classify('stupid autocorrect'))\n```\n\nInstallation\n------------\n\nPattern 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:\n```bash\ncd pattern-3.6\npython setup.py install\n```\n\nIf you have pip, you can automatically download and install from the [PyPI repository](https://pypi.python.org/pypi/pattern):\n```bash\npip install pattern\n```\n\nIf none of the above works, you can make Python aware of the module in three ways:\n- Put the pattern folder in the same folder as your script.\n- Put the pattern folder in the standard location for modules so it is available to all scripts:\n  * `c:\\python36\\Lib\\site-packages\\` (Windows),\n  * `/Library/Python/3.6/site-packages/` (Mac OS X),\n  * `/usr/lib/python3.6/site-packages/` (Unix).\n- Add the location of the module to `sys.path` in your script, before importing it:\n\n```python\nMODULE = '/users/tom/desktop/pattern'\nimport sys; if MODULE not in sys.path: sys.path.append(MODULE)\nfrom pattern.en import parsetree\n```\n\nDocumentation\n-------------\n\nFor documentation and examples see the [user documentation](https://github.com/clips/pattern/wiki).\n\nVersion\n-------\n\n3.6\n\nLicense\n-------\n\n**BSD**, see `LICENSE.txt` for further details.\n\nReference\n---------\n\nDe Smedt, T., Daelemans, W. (2012). Pattern for Python. *Journal of Machine Learning Research, 13*, 2031–2035.\n\nContribute\n----------\n\nThe source code is hosted on GitHub and contributions or donations are welcomed.\n\nBundled dependencies\n--------------------\n\nPattern is bundled with the following data sets, algorithms and Python packages:\n\n- **Brill tagger**, Eric Brill\n- **Brill tagger for Dutch**, Jeroen Geertzen\n- **Brill tagger for German**, Gerold Schneider \u0026 Martin Volk\n- **Brill tagger for Spanish**, trained on Wikicorpus (Samuel Reese \u0026 Gemma Boleda et al.)\n- **Brill tagger for French**, trained on Lefff (Benoît Sagot \u0026 Lionel Clément et al.)\n- **Brill tagger for Italian**, mined from Wiktionary\n- **English pluralization**, Damian Conway\n- **Spanish verb inflection**, Fred Jehle\n- **French verb inflection**, Bob Salita\n- **Graph JavaScript framework**, Aslak Hellesoy \u0026 Dave Hoover\n- **LIBSVM**, Chih-Chung Chang \u0026 Chih-Jen Lin\n- **LIBLINEAR**, Rong-En Fan et al.\n- **NetworkX centrality**, Aric Hagberg, Dan Schult \u0026 Pieter Swart\n- **spelling corrector**, Peter Norvig\n\nAcknowledgements\n----------------\n\n**Authors:**\n\n- Tom De Smedt (tom@organisms.be)\n- Walter Daelemans (walter.daelemans@ua.ac.be)\n\n**Contributors (chronological):**\n\n- Frederik De Bleser\n- Jason Wiener\n- Daniel Friesen\n- Jeroen Geertzen\n- Thomas Crombez\n- Ken Williams\n- Peteris Erins\n- Rajesh Nair\n- F. De Smedt\n- Radim Řehůřek\n- Tom Loredo\n- John DeBovis\n- Thomas Sileo\n- Gerold Schneider\n- Martin Volk\n- Samuel Joseph\n- Shubhanshu Mishra\n- Robert Elwell\n- Fred Jehle\n- Antoine Mazières + fabelier.org\n- Rémi de Zoeten + closealert.nl\n- Kenneth Koch\n- Jens Grivolla\n- Fabio Marfia\n- Steven Loria\n- Colin Molter + tevizz.com\n- Peter Bull\n- Maurizio Sambati\n- Dan Fu\n- Salvatore Di Dio\n- Vincent Van Asch\n- Frederik Elwert\n","funding_links":[],"categories":["Machine_Learning","Python","资源列表","Natural Language Processing","Machine Learning","Web Scraping","自然语言处理","machine-learning","📚 فهرست","Feature Extraction"],"sub_categories":["机器学习","Synthetic Data","General-Purpose Machine Learning","Others","هوش مصنوعی و NLP","Text/NLP"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclips%2Fpattern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclips%2Fpattern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclips%2Fpattern/lists"}