No project description provided
Project description
WordTangible
WordTangible is a Python library for analyzing the concreteness and imageability of words and text. It provides tools to measure how abstract or concrete the language in a given text is, which can be useful for various natural language processing tasks, readability analysis, and linguistic research.
Features
- Get concreteness ratings for individual words
- Calculate average concreteness for a given text
- Compute the ratio of concrete to abstract words in a text
- Customizable thresholds for concrete and abstract word classification
- Option to include or exclude stopwords in analysis
Installation
You can install WordTangible using pip:
pip install wordtangible
Usage
Here are some basic examples of how to use WordTangible:
from wordtangible import word_concreteness, avg_text_concreteness, concrete_abstract_ratio
# Get concreteness rating for a single word
print(word_concreteness("apple")) # Output: 5.0 (highly concrete)
# Calculate average concreteness of a text
text = "The abstract concept of love is as tangible as the apple in your hand."
print(avg_text_concreteness(text)) # Output: ~3.5 (mix of concrete and abstract)
# Get the ratio of concrete to abstract words
print(concrete_abstract_ratio(text)) # Output: ~1.0 (balanced concrete and abstract words)
For more detailed usage instructions and API documentation, please refer to our documentation.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- The concreteness ratings are derived from multiple sources, including the MRC Psycholinguistic Database, Brysbaert et al. concreteness ratings, and Glasgow concreteness ratings.
- This project uses NLTK for tokenization and stopword filtering.
Citation
If you use WordTangible in your research, please cite it as follows:
Robison, J. (2024). WordTangible: A Python library for word concreteness and imageability analysis. [Software]. Available from https://github.com/jrrobison1/wordtangible
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 wordtangible-0.1.0.tar.gz.
File metadata
- Download URL: wordtangible-0.1.0.tar.gz
- Upload date:
- Size: 222.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.14 Darwin/23.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
253134cad3987ee278843a11c136007d06d79ed61d61a8594743759a254b9126
|
|
| MD5 |
e6f698bc5e1c83095bbc8f8c2df43e26
|
|
| BLAKE2b-256 |
54e691c2a26f28e7e3781efde3f68d787bdbf29cfaf0ff159ca09d359aca8669
|
File details
Details for the file wordtangible-0.1.0-py3-none-any.whl.
File metadata
- Download URL: wordtangible-0.1.0-py3-none-any.whl
- Upload date:
- Size: 222.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.14 Darwin/23.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac9e1cbcd90797086474354026b76a216e9797f2c40df6c25e9062bbba0ad3a5
|
|
| MD5 |
8528d3b0266ad05fbc24b69e94f864fc
|
|
| BLAKE2b-256 |
730b07b9975ef6ca1b38bfb61adac7426137e54d3cadad49f0090753d7b0f5fc
|