Skip to main content

Package for working with semantic spaces.

Project description

Semantic spaces module

This is a python module that allows to compute semantic metrics based on distributional semantics models.

For example, to find words that are semantically similar to the word 'brain':

from semspaces.space import SemanticSpace

space = SemanticSpace.from_csv('space.w2v.gz')

space.most_similar(['brain'])

{'brain': [(u'brain', 0.0),
  (u'brains', 0.34469844325620635),
  (u'cerebrum', 0.4426992023455152),
  (u'cerebellum', 0.4483798859566903),
  (u'cortical', 0.469348588934828),
  (u'brainstem', 0.4791188497952641),
  (u'cortex', 0.479544888313173),
  (u'ganglion', 0.49717579235842546),
  (u'thalamus', 0.5030885466349713),
  (u'thalamic', 0.5059524199702277)]}

The module wraps dense and sparse matrix implementations to provide convenience methods for computing semantic statistics as well as easy input and output of the data.

Installation

pip install -r requirements.txt
python setup.py install

Semantic spaces

You can download a set of validated semantic spaces for English and Dutch here (see Mandera, Keuleers, & Brysbaert, in press).

Contribute

Authors

The tool was developed at Center for Reading Research, Ghent University by Paweł Mandera.

License

The project is licensed under the Apache License 2.0.

References

Mandera, P., Keuleers, E., & Brysbaert, M. (in press). Explaining human performance in psycholinguistic tasks with models of semantic similarity based on prediction and counting: A review and empirical validation. Journal of Memory and Language.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

semspaces-0.1.5.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

semspaces-0.1.5-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file semspaces-0.1.5.tar.gz.

File metadata

  • Download URL: semspaces-0.1.5.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.0

File hashes

Hashes for semspaces-0.1.5.tar.gz
Algorithm Hash digest
SHA256 efdbb2b3f5e28ef77329177fea36d6c6ac7d79f8a8646da5cd66567cae623901
MD5 8b5755f8d45678403ed964c94f052d93
BLAKE2b-256 c529dfca1998768f593269c47ea815f3957b4db0d29c464b4aa0c2db0f9fab9e

See more details on using hashes here.

File details

Details for the file semspaces-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: semspaces-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.0

File hashes

Hashes for semspaces-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4bd32d12079b49f9a29ee12f3a9fee64b49fe9ae89253102e7f2980b474686a6
MD5 14d79b60c5b75f466bb72a0f5e50f052
BLAKE2b-256 bc0151ea1454b76119c654db097f39e52d2c6da7fdfa374910029e9e81e8a148

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page