# WordTangible
[](https://pypi.org/project/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:
```bash
pip install wordtangible
```
## Usage
Here are some basic examples of how to use WordTangible:
```python
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](link-to-your-docs).
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
This project is licensed under the MIT License - see the [LICENSE](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
```
Raw data
{
"_id": null,
"home_page": "https://github.com/jrrobison1/wordtangible",
"name": "wordtangible",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": "nlp, linguistics, concreteness, imageability",
"author": "Jason Robison",
"author_email": "jrrobison@protonmail.com",
"download_url": "https://files.pythonhosted.org/packages/6c/fb/3fded0389d5cc0022186d638124c35de07c9b2e02f128d18bad9c6398730/wordtangible-0.1.1.tar.gz",
"platform": null,
"description": "# WordTangible\n[](https://pypi.org/project/wordtangible/) \n\nWordTangible 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.\n\n## Features\n\n- Get concreteness ratings for individual words\n- Calculate average concreteness for a given text\n- Compute the ratio of concrete to abstract words in a text\n- Customizable thresholds for concrete and abstract word classification\n- Option to include or exclude stopwords in analysis\n\n## Installation\n\nYou can install WordTangible using pip:\n\n```bash\npip install wordtangible\n```\n\n## Usage\n\nHere are some basic examples of how to use WordTangible:\n\n```python\nfrom wordtangible import word_concreteness, avg_text_concreteness, concrete_abstract_ratio\n\n# Get concreteness rating for a single word\nprint(word_concreteness(\"apple\")) # Output: 5.0 (highly concrete)\n\n# Calculate average concreteness of a text\ntext = \"The abstract concept of love is as tangible as the apple in your hand.\"\nprint(avg_text_concreteness(text)) # Output: ~3.5 (mix of concrete and abstract)\n\n# Get the ratio of concrete to abstract words\nprint(concrete_abstract_ratio(text)) # Output: ~1.0 (balanced concrete and abstract words)\n```\n\nFor more detailed usage instructions and API documentation, please refer to our [documentation](link-to-your-docs).\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- The concreteness ratings are derived from multiple sources, including the MRC Psycholinguistic Database, Brysbaert et al. concreteness ratings, and Glasgow concreteness ratings.\n- This project uses NLTK for tokenization and stopword filtering.\n\n## Citation\n\nIf you use WordTangible in your research, please cite it as follows:\n\n```\nRobison, J. (2024). WordTangible: A Python library for word concreteness and imageability analysis. [Software]. Available from https://github.com/jrrobison1/wordtangible\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python library for word concreteness and imageability analysis.",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://github.com/jrrobison1/wordtangible",
"Repository": "https://github.com/jrrobison1/wordtangible"
},
"split_keywords": [
"nlp",
" linguistics",
" concreteness",
" imageability"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e9682fd18d64deeec24d082dcf34ea3ded5ebbc6d6313fbf9d76857ad07a3fdd",
"md5": "51cd5737fb3ba7a22864efffa568cba2",
"sha256": "aed66d51b35734c7647b31267e55c0968cd9cd188f48de7684fbbe8d4844a940"
},
"downloads": -1,
"filename": "wordtangible-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "51cd5737fb3ba7a22864efffa568cba2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 222235,
"upload_time": "2024-08-19T03:04:13",
"upload_time_iso_8601": "2024-08-19T03:04:13.781398Z",
"url": "https://files.pythonhosted.org/packages/e9/68/2fd18d64deeec24d082dcf34ea3ded5ebbc6d6313fbf9d76857ad07a3fdd/wordtangible-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6cfb3fded0389d5cc0022186d638124c35de07c9b2e02f128d18bad9c6398730",
"md5": "d5cd64ad740afd9f9339364285e086b5",
"sha256": "3d4464fe1d03f0833b81b49bfb4b2d65b748f5346c235603f6d5ceb10e602b27"
},
"downloads": -1,
"filename": "wordtangible-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "d5cd64ad740afd9f9339364285e086b5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 222558,
"upload_time": "2024-08-19T03:04:15",
"upload_time_iso_8601": "2024-08-19T03:04:15.985941Z",
"url": "https://files.pythonhosted.org/packages/6c/fb/3fded0389d5cc0022186d638124c35de07c9b2e02f128d18bad9c6398730/wordtangible-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-19 03:04:15",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jrrobison1",
"github_project": "wordtangible",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "wordtangible"
}