Skip to content
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

Add WikilinkNN Unwanted Links #48

Open
andrewtavis opened this issue May 17, 2021 · 3 comments
Open

Add WikilinkNN Unwanted Links #48

andrewtavis opened this issue May 17, 2021 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@andrewtavis
Copy link
Owner

The WikilinkNN currently best supports book recommendations in wikirec as there are preset links that are removed via the following in wikirec.model._wikilink_nn:

to_remove = [
    "hardcover",
    "paperback",
    "hardback",
    "e-book",
    "wikipedia:wikiproject books",
    "wikipedia:wikiproject novels",
]
wikilinks = [item for item in wikilinks if item not in to_remove]

It would be best if this could be adapted for other kinds of recommendation inputs. The style of input could potentially be passed to wikirec.model.gen_embeddings, but a discussion could also be had about other ways to derive which links should be removed.

@andrewtavis andrewtavis added enhancement New feature or request good first issue Good for newcomers labels May 17, 2021
@andrewtavis
Copy link
Owner Author

andrewtavis commented May 18, 2021

@victle, I figure we can switch the discussion for #36 and #47 over here. Am currently re-running everything to make a new up to date enwiki_books.ndjson, books_embedding_model.h5 (renamed it to make it explicit), and will update the results for rec_books.ipynb. I guess this issue would be the next thing to do on this model, but then am open for suggestions :)

Again, sorry that I was awol for a bit there. Feel free to let me know what you have interest in doing, and of course no stress if you're busy. I'll be fully switching over to another project tomorrow, but would be happy to discuss all this with you still 😊

@andrewtavis andrewtavis changed the title Add Custom WikilinkNN Unwanted Links Add WikilinkNN Unwanted Links May 18, 2021
@victle
Copy link
Contributor

victle commented May 18, 2021

This feels super specific to each kind of category, so I really wonder what the best approach is for removing some of these more common terms. I guess one brute force approach is just doing it empirically for different categories? Like, when generating an embedding for movies, comb through some of the top most frequent items and choose for removal? But that does seem like a lot of work 😅

Maybe another easy way is to filter certain wikilinks using regex? It seems to me that an easy one would be removing any links with "wikipedia" or "wikiproject" in them. I wonder how the performance of the model recommendations gets affected by having these extra links in them? It could be harmless for certain categories, but I haven't tested enough to know 🤷‍♂️

And no worries about being away! Everyone's got a life outside GitHub 😆 . My time is a bit limited moving forward, but I'd be happy to do small tasks here and there (e.g., perhaps picking out some unwanted links for movies or something?).

@andrewtavis
Copy link
Owner Author

I agree that those that have "wikipedia" and especially "wikiproject" should likely be removed. Maybe not the former as there could be things like categories that would be important, but then I'm not sure :) Maybe for major things it'd be best to select them, and for others we could just select those that are present in > X% to be removed.

By the sounds of it this is something that's later on the horizon for both of us though 😄 This especially given your point in the second paragraph above - how much is all this really going to help? :) Let's get back to it another time 😊

Feel free to check base here when you have a bit more time, or also let me know if you have something open source you'd want some help on!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants