A semantic network for the Tiv language, modeled after WordNet
Project description
TivWordNet
TivWordNet is a semantic network for the Tiv language, modeled after WordNet. It provides functionality to manage synsets, retrieve hypernyms and hyponyms, and work with definitions and lemmas. The package uses text files for data storage and supports basic operations for lexical semantic processing.
Features
- Word Definitions: Store and retrieve meanings for various Tiv words.
- Hypernym Relationships: Define relationships between words to create a semantic hierarchy.
- Data Population: Populate the database with predefined word and hypernym data.
Installation
To install TivWordNet, you can use pip:
pip install tivwordnet
Usage
Importing the Package
First, import the TivWordNet class from the package:
if __name__ == "__main__":
word_data = [
(1, "kwagh", "A domesticated carnivorous mammal."), # dog
(2, "kwer", "A small domesticated carnivorous mammal with soft fur."), # cat
(3, "vhe", "A thing used for transporting people or goods."), # vehicle
(4, "nenev", "A warm-blooded vertebrate animal characterized by the presence of hair or fur."), # mammal
(5, "anih", "A living organism that feeds on organic matter."), # animal
(6, "kikoo", "A warm-blooded vertebrate distinguished by the possession of feathers."), # bird
(7, "fishi", "A limbless cold-blooded vertebrate animal with gills and fins."), # fish
(8, "kpai", "A cold-blooded vertebrate of a class that includes snakes and lizards."), # reptile
(9, "anpigh", "A cold-blooded vertebrate animal that is born in water and breathes with gills."), # amphibian
(10, "we", "A small air-breathing arthropod with six legs."), # insect
(11, "fa", "Movable articles that are used to make a room or building suitable for living or working."), # furniture
# Add more words as needed
]
hypernym_data = [
(1, 4),
(2, 4),
(4, 5),
(6, 5),
(7, 5),
# Add more hypernym relationships as needed
]
with TivWordnetConnector() as connector:
tiv_wordnet = TivWordnet(connector)
# Populate the database with data
tiv_wordnet.populate_data(word_data, hypernym_data)
# Retrieve synsets
synsets = connector.get_synsets()
for synset in synsets:
print(synset)
# Retrieve hypernyms
hypernyms = connector.get_hypernyms()
for hypernym in hypernyms:
print(hypernym)
License
TivWordNet is distributed under the MIT License. See LICENSE for more information.
Support
For questions or issues, please open an issue on GitHub or contact support at danterkum16@gmail.com.
Contributing
Contributions are welcome! Please fork the repository and submit a pull request with your changes.
Acknowledgements
This project is inspired by [jamsic/ru-wordnet](https://github.com/jamsic/ru-wordnet/).
### Explanation
1. **Installation**: Instructions for installing the package with `pip`.
2. **Usage**: Detailed examples of how to use the package to add synsets, retrieve synsets, and get hypernyms and hyponyms.
3. **Data Files**: Information on the data files used by the package.
4. **License**: Details about the license under which the package is distributed.
5. **Support**: Information on how to get help or report issues.
6. **Contributing**: Guidelines for contributing to the project.
7. **Acknowledgements**: Credits for inspiration and sources.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tivwordnet-0.2.0.tar.gz.
File metadata
- Download URL: tivwordnet-0.2.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86db556f5d31efc5bdc326de4486bb05447bc9ea59d1c1421ba16ead60a33c71
|
|
| MD5 |
b1e2815f03b660a12ed06653a9189c44
|
|
| BLAKE2b-256 |
c50c8ccc83e6cdfd4ca0b6288dca0ec22f7e276b58ec1726bd472cbe8f97f306
|
File details
Details for the file tivwordnet-0.2.0-py3-none-any.whl.
File metadata
- Download URL: tivwordnet-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0dd994ac13b04eb0330a2ae5a71061b32c46b4c6367202e52d406d482f32fda
|
|
| MD5 |
489626bfd23c256b2328695d71ce9e44
|
|
| BLAKE2b-256 |
b5815c8d813fe8c7601c346a96a079cae5ce45519e480fc37206a58d4a59f893
|