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':
```python
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
```bash
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](http://zipf.ugent.be/snaut/spaces/) (see Mandera, Keuleers, & Brysbaert,
in press).
# Contribute
- Issue Tracker: https://github.com/pmandera/semspaces/issues
- Source Code: https://github.com/pmandera/semspaces
# Authors
The tool was developed at Center for Reading Research, Ghent University by
[Paweł Mandera](http://crr.ugent.be/pawel-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*.
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':
```python
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
```bash
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](http://zipf.ugent.be/snaut/spaces/) (see Mandera, Keuleers, & Brysbaert,
in press).
# Contribute
- Issue Tracker: https://github.com/pmandera/semspaces/issues
- Source Code: https://github.com/pmandera/semspaces
# Authors
The tool was developed at Center for Reading Research, Ghent University by
[Paweł Mandera](http://crr.ugent.be/pawel-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
Release history Release notifications | RSS feed
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.3.tar.gz
(11.5 kB
view hashes)
Built Distribution
semspaces-0.1.3-py3-none-any.whl
(13.9 kB
view hashes)
Close
Hashes for semspaces-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0324d7acdffbcbb3a343ccf7c7ea225c3d4124d1dfd5db16943778a361553a2 |
|
MD5 | f83364417f9097564c0ba6627b019bcc |
|
BLAKE2b-256 | 438fc85931fd2d0dacb7040dbbf2b8e6d09187d6d19df3bdd65b87d1c66fb61c |