getting error in the code which is mentioned in documentation, even all the dependencies are fine #22
Unanswered
SakshamSoni-invizAI
asked this question in
Q&A
Replies: 1 comment
-
|
I'm not sure why you are getting that error. Here is the some code on my system running Which produces:
Are you using the latest version of |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
`from wordhoard import Homophones
homophone = Homophones(search_string=['horse'])
homophone_results = homophone.find_homophones()
print(homophone_results)`
`---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[15], line 1
----> 1 from wordhoard import Homophones
3 homophone = Homophones(search_string=['horse'])
4 homophone_results = homophone.find_homophones()
File ~/.local/lib/python3.8/site-packages/wordhoard/init.py:13
10 url_documentation = 'https://wordhoard.readthedocs.io/en/latest/'
11 url_source_code = 'https://github.com/johnbumgarner/wordhoard'
---> 13 from .antonyms import Antonyms
14 from .synonyms import Synonyms
15 from .hyponyms import Hyponyms
File ~/.local/lib/python3.8/site-packages/wordhoard/antonyms.py:48
46 from concurrent.futures import ThreadPoolExecutor, as_completed
47 from typing import Dict, List, Optional, Set, Sized, Tuple, Union
---> 48 from wordhoard.utilities import caching, cleansing, word_verification
49 from wordhoard.utilities.cloudflare_checker import CloudflareVerification
51 logger = logging.getLogger(name)
File ~/.local/lib/python3.8/site-packages/wordhoard/utilities/caching.py:94
87 temporary_dict_definition[word] = {pos_category: definitions}
91 ##################################################################################
92 # in memory temporary cache for hypernyms
93 ##################################################################################
---> 94 temporary_dict_hypernyms: Dict[str, list[str]] = {}
97 def cache_hypernyms(word: str) -> Tuple[bool, Optional[List[str]]]:
98 try:
TypeError: 'type' object is not subscriptable
`
Beta Was this translation helpful? Give feedback.
All reactions