8000 pattern/README.txt at master · comenix/pattern · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
< 512F script type="application/json" data-target="react-app.embeddedData">{"payload":{"allShortcutsEnabled":false,"fileTree":{"":{"items":[{"name":"docs","path":"docs","contentType":"directory"},{"name":"examples","path":"examples","contentType":"directory"},{"name":"pattern","path":"pattern","contentType":"directory"},{"name":"test","path":"test","contentType":"directory"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":".pylintrc","path":".pylintrc","contentType":"file"},{"name":"LICENSE.txt","path":"LICENSE.txt","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"README.txt","path":"README.txt","contentType":"file"},{"name":"setup.py","path":"setup.py","contentType":"file"}],"totalCount":10}},"fileTreeProcessingTime":1.796767,"foldersToFetch":[],"incompleteFileTree":false,"repo":{"id":58035845,"defaultBranch":"master","name":"pattern","ownerLogin":"comenix","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2016-05-04T08:29:45.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/11206726?v=4","public":true,"private":false,"isOrgOwned":false},"codeLineWrapEnabled":false,"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"master","listCacheKey":"v0:1620764362.252365","canEdit":false,"refType":"branch","currentOid":"820cccf33c6ac4a4f1564a273137171cfa6ab7cb"},"path":"README.txt","currentUser":null,"blob":{"rawLines":["PATTERN","=======","","Pattern is a web mining module for Python. It has tools for data mining (web services for Google, Twitter and 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 using KNN, SVM, Perceptron) and network analysis (graph centrality and visualization). It is well documented and bundled with 50+ examples and 350+ unit tests. The source code is licensed under BSD and available from http://www.clips.ua.ac.be/pages/pattern. ","","VERSION","=======","","2.6","","LICENSE","=======","","BSD, see LICENSE.txt for further details.","","INSTALLATION","============","","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:","\u003e cd pattern-2.6","\u003e python setup.py install","","If you have pip, you can automatically download and install from the PyPi repository:","\u003e 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),\u2028 "," /usr/lib/python2.6/site-packages/ (Unix).","- Add the location of the module to sys.path in your script, before importing it:"," \u003e\u003e\u003e MODULE = '/users/tom/desktop/pattern'"," \u003e\u003e\u003e import sys; if MODULE not in sys.path: sys.path.append(MODULE)"," \u003e\u003e\u003e from pattern.en import parsetree","","Example","=======","","This example trains a classifier on adjectives mined from Twitter. 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.","","\u003e\u003e\u003e from pattern.web import Twitter","\u003e\u003e\u003e from pattern.en import tag","\u003e\u003e\u003e from pattern.vector import KNN, count","\u003e\u003e\u003e ","\u003e\u003e\u003e twitter, knn = Twitter(), KNN()","\u003e\u003e\u003e ","\u003e\u003e\u003e for i in range(1, 3):","\u003e\u003e\u003e for tweet in twitter.search('#win OR #fail', start=i, count=100):","\u003e\u003e\u003e s = tweet.text.lower()","\u003e\u003e\u003e p = '#win' in s and 'WIN' or 'FAIL'","\u003e\u003e\u003e v = tag(s)","\u003e\u003e\u003e v = [word for word, pos in v if pos == 'JJ'] # JJ = adjective","\u003e\u003e\u003e v = count(v) # {'sweet': 1}","\u003e\u003e\u003e if v:","\u003e\u003e\u003e knn.train(v, type=p)","\u003e\u003e\u003e ","\u003e\u003e\u003e print knn.classify('sweet potato burger')","\u003e\u003e\u003e print knn.classify('stupid autocorrect')","","DOCUMENTATION","=============","","http://www.clips.ua.ac.be/pages/pattern","","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, see the developer documentation (http://www.clips.ua.ac.be/pages/pattern#contribute). If you use Pattern in your work, please cite our reference paper.","","BUNDLED DEPENDENCIES","====================","","Pattern is bundled with the following data sets, algorithms and Python packages: ","","- Beautiful Soup, Leonard Richardson","- Brill tagger, Eric Brill","- Brill tagger for Dutch, Jeroen Geertzen","- Brill tagger for German, Gerold Schneider \u0026 Martin Volk","- Brill tagger for Spanish, trained on Wikicorpus (Samuel Reese \u0026 Gemma Boleda et al.)","- Brill tagger for French, trained on Lefff (Benoît Sagot \u0026 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 \u0026 Dave Hoover","- LIBSVM, Chih-Chung Chang \u0026 Chih-Jen Lin","- LIBLINEAR, Rong-En Fan et al.","- NetworkX centrality, Aric Hagberg, Dan Schult \u0026 Pieter Swart","- PDFMiner, Yusuke Shinyama","- Python docx, Mike Maccana","- PyWordNet, Oliver Steele","- simplejson, Bob Ippolito","- spelling corrector, Peter Norvig","- Universal Feed Parser, Mark Pilgrim","- WordNet, Christiane Fellbaum et al.","","ACKNOWLEDGEMENTS","================","","Authors: ","- Tom De Smedt (tom@organisms.be)","- Walter Daelemans (walter.daelemans@ua.ac.be)","","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"],"stylingDirectives":null,"colorizedLines":null,"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/comenix/pattern/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":null},"displayName":"README.txt","displayUrl":"https://github.com/comenix/pattern/blob/master/README.txt?raw=true","headerInfo":{"blobSize":"5.02 KB","deleteTooltip":"You must be signed in to make or propose changes","editTooltip":"You must be signed in to make or propose changes","ghDesktopPath":"https://desktop.github.com","isGitLfs":false,"onBranch":true,"shortPath":"3b67639","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fcomenix%2Fpattern%2Fblob%2Fmaster%2FREADME.txt","isCSV":false,"isRichtext":false,"toc":null,"lineInfo":{"truncatedLoc":"142","truncatedSloc":"118"},"mode":"file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"issueTemplate":null,"discussionTemplate":null,"language":"Text","languageID":372,"large":false,"planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/comenix/pattern/blob/master/README.txt","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","releasePath":"/comenix/pattern/releases/new?marketplace=true","showPublishActionBanner":false},"rawBlobUrl":"https://github.com/comenix/pattern/raw/refs/heads/master/README.txt","renderImageOrRaw":false,"richText":null,"renderedFileInfo":null,"shortPath":null,"symbolsEnabled":true,"tabSize":8,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":null,"showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null,"symbols":null},"copilotInfo":null,"copilotAccessAllowed":false,"modelsAccessAllowed":false,"modelsRepoIntegrationEnabled":false,"csrf_tokens":{"/comenix/pattern/branches":{"post":"Va0MYGVi5FXrPSUbwJGdK-064ndYlQQbWIi5OlyaLYK0q624KtU8Hx9YWbYH8URGHt85yE7IDG_ZZx5nHiaVpQ"},"/repos/preferences":{"post":"mL_xTFq7lr2LYMlo-vLfUreWKrl-X_mHCOEXKNgSvxnfI1duyT5Jh43GtyOD2v6DMvp5xmrhv-AKsNqQQ426UA"}}},"title":"pattern/README.txt at master · comenix/pattern","appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-263cab1760dd.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-1b17b3e7786a.js","githubDevUrl":null,"enabled_features":{"code_nav_ui_events":false,"react_blob_overlay":false,"accessible_code_button":true}}}
0