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 patternarrow-up-right package:

    • conda install pattern

  • Install the Phonological CorpusToolsarrow-up-right package:

    • Download the "source" package from this link arrow-up-right(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 Wordnetarrow-up-right:

    • 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 spaCyarrow-up-right pacakge:

    • conda install spacy

    • spacy download en_core_web_sm

  • Install the Gensimarrow-up-right package:

    • pip install gensim

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

Last updated

Was this helpful?