Attribute error in similarity method
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python
- Domain
- machine-learning
Research direction
Reproduce the expression using wordnet.synsets(...)[0].similarity(...) and inspect the ancestor and similarity methods that produce the AttributeError. Determine the expected behavior when two synsets have no common ancestor, then add regression coverage for that case and verify the existing similarity behavior remains unchanged.
Written by the indexing model from the issue text.
Description
The following code give me a {AttributeError}'NoneType' object has no attribute 'ic':
wordnet.synsets("next", "JJ")[0].similarity(wordnet.synsets("following", "JJ")[0])
This is because the ancestor method can return a None value.
What's the fix? Should the similarity between 2 synsets without common ancestor be 0.0?
- Dominant language
- Python
- Stars
- 8.9k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from clips/pattern
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
-
Difficulty 1/5 Under an hour Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
PedestrianDynamics/pyFDS-Evac#199 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
521xueweihan/HelloGitHub#3790 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sandialabs/atlas-ui-3#978 ·
Maintainers usually reply within 1 day
-
area: tests perceived difficulty: 2
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Nitjsefnie-Harness-Commons/daedalus#1255 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
EleutherAI/lm-evaluation-harness#4256 ·
Maintainers usually reply within 1 day