Word Similarity Measures

Created for the SKIRF project, based on Lyam Bailey's Production fMRI studies

Install the necessary packages

  • First ensure you've followed these instructions to install Anaconda Python on your computer.

  • Open a Terminal (Mac)/Anaconda Prompt (Windows) window. All of the commands in computer font below you should type (or copy/paste to avoid typos) into that window, and hit Enter after each command.

  • Install the pattern package:

    • conda install pattern

  • Install the Phonological CorpusTools package:

    • Download the "source" package from this link (doesn't matter if you choose the zip or tar.gz version). Note that if you're used to installing Python packages with conda or pip, this is a nonstandard install procedure, but it works.

    • Uncompress the package (usually simply involves double-clicking it)

    • in the Terminal/Anaconda Prompt, change directories to the CorpusTools folder. Asssuming you downloaded version 1.4.1, the command would be:

      • cd Downloads/CorpusTools-1.4.1

    • Then run the installer:

      • python setup.py install

  • Install the Open Multilingual Wordnet:

    • ipython

    • This will activate an interactive Python kernel in the window. Then run these two commands:

      • import nltk

      • nltk.download('omw-1.4')

    • Type exit to exit the interactive Python session

  • Install the spaCy pacakge:

    • conda install spacy

    • spacy download en_core_web_sm

  • Install the Gensim package:

    • pip install gensim

    • python -m gensim.downloader --download 'glove-wiki-gigaword-300'

Last updated