— How to install Python and Pattern on a laptop

  1. Visit python.org and install the latest version of Python 2.7 on your laptop, following the instructions on that site.
  2. Visit the CLiPS website, go to the page for Pattern (as of 2015-05-13, http://www.clips.ua.ac.be/pattern), download and install pattern on your laptop.
  3. Peruse the library of clear, simple, gracious tutorials on the Pattern website.
If you want some immediate fun, convince yourself that you can parse a sentence in English and a sentence in Spanish immediately following the tutorials on the CLiPs Pattern website.  E.g., 

markturner@MacIota:~$ python2.6

Python 2.6.9 (unknown, Sep  9 2014, 15:05:12) 

[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin

Type "help", "copyright", "credits" or "license" for more information.

>>> from pattern.en import parse

>>> s = 'This entire installation of python and Pattern and the parsing of an English sentence and a Spanish sentence was done from scratch on a MacBook Air over weak hotel wifi in an interval of five minutes'

>>> s = parse(s, relations=True, lemmata=True)

>>> print s

This/DT/B-NP/O/O/this entire/JJ/I-NP/O/O/entire installation/NN/I-NP/O/O/installation of/IN/B-PP/B-PNP/O/of python/NN/B-NP/I-PNP/O/python and/CC/I-NP/I-PNP/O/and Pattern/NN/I-NP/I-PNP/O/pattern and/CC/O/O/O/and the/DT/O/O/O/the parsing/VBG/B-VP/O/O/parse of/IN/B-PP/B-PNP/O/of an/DT/B-NP/I-PNP/O/an English/JJ/I-NP/I-PNP/O/english sentence/NN/I-NP/I-PNP/O/sentence and/CC/O/O/O/and a/DT/B-NP/O/NP-SBJ-1/a Spanish/JJ/I-NP/O/NP-SBJ-1/spanish sentence/NN/I-NP/O/NP-SBJ-1/sentence was/VBD/B-VP/O/VP-1/be done/VBN/I-VP/O/VP-1/do from/IN/B-PP/B-PNP/O/from scratch/NN/B-NP/I-PNP/O/scratch on/IN/B-PP/B-PNP/O/on a/DT/B-NP/I-PNP/O/a MacBook/NNP/I-NP/I-PNP/O/macbook Air/NNP/I-NP/I-PNP/O/air over/IN/B-PP/B-PNP/O/over weak/JJ/B-NP/I-PNP/O/weak hotel/NN/I-NP/I-PNP/O/hotel wifi/NN/I-NP/I-PNP/O/wifi in/IN/B-PP/B-PNP/O/in an/DT/B-NP/I-PNP/O/an interval/NN/I-NP/I-PNP/O/interval of/IN/B-PP/B-PNP/O/of five/CD/B-NP/I-PNP/O/five minutes/NNS/I-NP/I-PNP/O/minute

>>> ^D

markturner@MacIota:~$ 


markturner@MacIota:~$ python2.6

Python 2.6.9 (unknown, Sep  9 2014, 15:05:12) 

[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin

Type "help", "copyright", "credits" or "license" for more information.

>>> from pattern.es import parse

>>> s = "En la primavera del año 1829 el autor de esta obra, que había venido a España atraído por la curiosidad, hizo un viaje desde Sevilla a Granada, acompañado de un amigo, miembro de la Embajada rusa en Madrid."

>>> s = parse(s, relations=True, lemmata=True)

>>> print s

En/IN/B-PP/B-PNP/O/en la/DT/B-NP/I-PNP/O/el primavera/NN/I-NP/I-PNP/O/primavera del/NN/I-NP/I-PNP/O/del año/NN/I-NP/I-PNP/O/año 1829/NN/I-NP/I-PNP/O/1829 el/DT/B-NP/I-PNP/O/el autor/NN/I-NP/I-PNP/O/autor de/IN/B-PP/B-PNP/O/de esta/DT/B-NP/I-PNP/O/esta obra/NN/I-NP/I-PNP/O/obra ,/,/O/O/O/, que/WP$/O/O/O/que había/MD/B-VP/O/O/haber venido/VBN/I-VP/O/O/venir a/IN/B-PP/B-PNP/O/a España/NNP/B-NP/I-PNP/NP-SBJ-1/españa atraído/VBN/B-VP/I-PNP/VP-1/atraer por/IN/B-PP/B-PNP/O/por la/DT/B-NP/I-PNP/O/el curiosidad/NN/I-NP/I-PNP/O/curiosidad ,/,/O/O/O/, hizo/VB/B-VP/O/VP-2/hacer un/DT/B-NP/O/NP-OBJ-2/un viaje/NN/I-NP/O/NP-OBJ-2/viaje desde/IN/B-PP/B-PNP/O/desde Sevilla/NNP/B-NP/I-PNP/O/sevilla a/IN/B-PP/B-PNP/O/a Granada/NNP/B-NP/I-PNP/O/granada ,/,/O/O/O/, acompañado/VBN/B-VP/O/O/acompañar de/IN/B-PP/B-PNP/O/de un/DT/B-NP/I-PNP/O/un amigo/NN/I-NP/I-PNP/O/amigo ,/,/O/O/O/, miembro/NN/B-NP/O/O/miembro de/IN/B-PP/B-PNP/O/de la/DT/B-NP/I-PNP/O/el Embajada/NNP/I-NP/I-PNP/O/embajada rusa/JJ/I-NP/I-PNP/O/ruso en/IN/B-PP/B-PNP/O/en Madrid/NNP/B-NP/I-PNP/O/madrid ././O/O/O/.

>>> ^D

markturner@MacIota:~$