/ru/ConceptNet
ConceptNet 5.7 (Russian part) extraction scripts + fast API object to access the relations. Note: a simple modification of the preprocessing script allows to build a queryable graph of any other subset of ConceptNet.
Installation
pip install ruconceptnet
Usage
>>> from ruconceptnet 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'])
Preparations for customization
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.
Citing
Please do not forget to cite the ConceptNet5 paper.
@inproceedings{10.5555/3298023.3298212,
author = {Speer, Robyn and Chin, Joshua and Havasi, Catherine},
title = {ConceptNet 5.5: An Open Multilingual Graph of General Knowledge},
year = {2017},
publisher = {AAAI Press},
booktitle = {Proceedings of the Thirty-First AAAI Conference on Artificial Intelligence},
pages = {4444–4451},
numpages = {8},
location = {San Francisco, California, USA},
series = {AAAI'17}
}
Citing the repository is not necessary, but greatly appreciated as well, if you use this work.
@misc{ruconceptnet2020alekseev,
title = {{alexeyev/RuConceptNet: /ru/ConceptNet5.7 Python wrapper }},
year = {2020},
url = {https://github.com/alexeyev/RuConceptNet},
language = {english}
}
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".
Metadata
Release files for ruconceptnet 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ruconceptnet-0.0.2.tar.gz | 4.8 MB | Without provenance | Details for ruconceptnet-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ruconceptnet-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for ruconceptnet-0.0.2-py3-none-any.whl |
Total release size: 9.6 MB
Release files / ruconceptnet-0.0.2.tar.gz
| Download URL | ruconceptnet-0.0.2.tar.gz |
|---|---|
| Size | 4.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e099a9c9c9638f4b67b84aa891a1fa80e53dc758a114509711287165a84a2369
|
|
BLAKE2b-256 checksum How to use checksums |
26e008bbcf2c5642a08ab5d7246614ae02d0e1b47bf48ba3b5949d0c97aaab86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.18
|
Release files / ruconceptnet-0.0.2-py3-none-any.whl
| Download URL | ruconceptnet-0.0.2-py3-none-any.whl |
|---|---|
| Size | 4.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
21ff98544a48ca7e2af1e12f081821f758b3bc155f434945308812373325df12
|
|
BLAKE2b-256 checksum How to use checksums |
e85ef04248dd9c3bbe3d2a6bfd53347fda7137ddafc852b3520f2103d94bbf92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.18
|
Security for ruconceptnet 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.