Russian part of ConceptNet5.7 graph, fast access to relations.
Project description
RussianConceptNet
ConceptNet 5.7 (Russian part) extraction scripts + fast access to relations. Note: a simple modification of the preprocessing script allows to build a queryable graph of any other subset of ConceptNet.
Preparations
Please see the prepare_data.sh
script. We get the Russian-Russian pairs of nodes with simple grep
and build
a 3-dimensional array (source, target, relation) stored as a single sparse SciPy matrix.
Usage
>>> from conceptnet import ConceptNet
>>> cn = ConceptNet()
>>> cn.get_targets("алкоголь")
[('этиловый_спирт', {'Synonym'}), ('спиртной_напиток', {'Synonym'}), ('алкогольный', {'RelatedTo'}), ('алкоголик', {'RelatedTo'}), ('спирт', {'Synonym'}), ('алкоголизация', {
'RelatedTo'})]
>>> cn.get_sources("йога")
[('йоги', {'FormOf'}), ('йогу', {'FormOf'}), ('йогический', {'RelatedTo'}), ('йогою', {'FormOf'}), ('йогой', {'FormOf'}), ('йог', {'RelatedTo'}), ('йоге', {'FormOf'})]
>>> cn.check_pair("человек", "зверь")
(['DistinctFrom'], [])
>>> cn.check_pair("зверь", "человек")
([], ['DistinctFrom'])
Citing
Please do not forget to cite the ConceptNet5 paper:
Robyn Speer, Joshua Chin, and Catherine Havasi. 2017. "ConceptNet 5.5: An Open Multilingual Graph of General Knowledge." In proceedings of AAAI 31.
Citing the repository is greatly appreciated as well, if you use this work.
License
The code is released under the MIT license (please see the LICENSE
file).
This work includes a subset data from ConceptNet 5, which was compiled by the Commonsense Computing Initiative. ConceptNet 5 is freely available under the Creative Commons Attribution-ShareAlike license (CC BY SA 3.0) from http://conceptnet.io.
The included data was created by contributors to Commonsense Computing projects, contributors to Wikimedia projects, DBPedia, OpenCyc, Games with a Purpose, Princeton University's WordNet, Francis Bond's Open Multilingual WordNet, and Jim Breen's JMDict.
The complete data in ConceptNet is available under the Creative Commons Attribution-ShareAlike 4.0 license.
For more details, please see "Copying and sharing ConceptNet".
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
Built Distribution
File details
Details for the file ruconceptnet-0.0.1.tar.gz
.
File metadata
- Download URL: ruconceptnet-0.0.1.tar.gz
- Upload date:
- Size: 4.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a51c6e860d8afddb975360f3c861d08befd3f2e5f327162c80579b0a8e20cf9d |
|
MD5 | 612eead0605a72d378cdbe9af56c4273 |
|
BLAKE2b-256 | c81302e93b30b45df140b8ea796b81802cec82ccf5a4429ba68e34dafcfde382 |
File details
Details for the file ruconceptnet-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: ruconceptnet-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd6fd8c194c360878a0f37f460490b127b599edc61e9543d6191349b8421671f |
|
MD5 | daaa8e51e06f84ef660c95c2276eb281 |
|
BLAKE2b-256 | 7cb2aaf079f81bd347dd221b85ffb9e54c3de3f0b2f0bf23cd128541fe12b19f |