-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added oxford definition generator #3
base: master
Are you sure you want to change the base?
Conversation
just realized using selenium is not necessary at all :| |
I tried your code with the word "dog" and it is not only retrieving the definitions but the definitions of idioms that involve the word "dog" (the idioms don't even appear). Only definitions should be returned. There is an extra "example =" in line 43. Also, the function format escapes the "\n" making your program print "\n" instead of eol. Anyway I think the format should be orthogonal and homogeneous across providers so only one example should be given, and in the same format as the result of the other provider. Regarding the possibility of choosing different providers, I guess I'll unify the commands /language, /swap and this new feature under a command /settings that provides an interface with telegram buttons that allows you to configure your account as you please. And in the code I'll create a factory that will receive a string or a Enum with the type of provider and will build it. I'm thinking something along the lines of the provider inheriting from a base class with the functions Of what providers are you thinking about?. I'd be specially interested in adding support for more languages. |
Also, if the definition does not exist your program raises an exception instead of returning the empty list
|
ok, I will fix these issues as soon as possible. |
I think the part of the ankigen_bot.py that uses AnkiAutomatic should be changed in a way that it accepts some kind of difinition provider and then it can accept more providers later(I think I might add more definition engines later..)