Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Lookup gives definition from wrong language; possibly related to "see also" #75

Open
tbm opened this issue Oct 19, 2020 · 1 comment
Open
Assignees
Labels

Comments

@tbm
Copy link

tbm commented Oct 19, 2020

With current master, I still get definitions from a wrong language in some cases. It happens when I look up "nao" and "nami" for Swahili.

Both of these have a "See also" link at the top. Maybe that confuses the parser?

https://en.wiktionary.org/wiki/nami#Swahili
https://en.wiktionary.org/wiki/nao#Swahili

Script:

#!/usr/bin/env python3

from pprint import pprint
import sys

from wiktionaryparser import WiktionaryParser

parser = WiktionaryParser()
parser.set_default_language('swahili')

word = parser.fetch(sys.argv[1])

pprint(word)
./lookup-word nami
[{'definitions': [{'examples': [],
                   'partOfSpeech': 'noun',
                   'relatedWords': [],
                   'text': ['nami', 'younger sister']},

"younger sister" is Comanche, not Swahili.

@suyashb95 suyashb95 added the bug label Oct 19, 2020
@suyashb95 suyashb95 self-assigned this Oct 19, 2020
@suyashb95
Copy link
Owner

@tbm thank you for reporting this! It definitely seems to be a bug which is weird since both pages have a ToC. Let me take a look

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants