kunzstef / wiki-recommender

0 stars 3 forks source link

Bugs/Todos #6

Open LadyBytes opened 8 years ago

LadyBytes commented 8 years ago

Lisa:

Stefan:

kunzstef commented 8 years ago

@M3hrL1cht I fixed now the passive search triggering, but for a paragraph I have multiple context keywords, but in Wikipedia only the first one is searched. Shouldn't we fire multiple search requests for each context keyword or is there a possibility to insert more keywords when querying wiki commons? And who implements it? Should I work on this?

Also I now inserted the context keywords into the searchbar after a new search was triggered passively like this: "keyword 1" "kw 2"... Here we could think of treating words surrounded by " as single context keywords to enable searching with multiple context keywords out of the searchbar, because now you get different result if you re-submit a query actively with the inserted keywords in the searchbar after a passive search -> could be really confusing as end user. what do you mean? should I work on this feature? @schloett @chseifert

LadyBytes commented 8 years ago

I quickly tried to send multiple keywords to wikipedia and it works if we use "OR" as a logical search operator in-between the terms. You can take a look at it in the new feature branch /multipleKeywordsWiki. I'd prefer firing only one search due to performance concerns, but there's a problem if we have only one request: Currently I search for the first three keywords which means that wikipedia will aggregate all results for the first keyword, then the second, then the third. We also specify a certain amount of images we want to return (20 atm), which means we only get to see the first 20 images for the first term unless the first term yields less than twenty in which case we actually would get to see results our second term provides. If we use "AND" instead of "OR" we don't get any results at all using passive search in most cases.

So, we can either fire one search per term which could increase loading time (although if we would decrease the number of results per term dependent on the number of terms as well as the number of terms itself, that could be manageable). Or we fire only one request and include a fitting one-time notification for the user which states that on passive searches only the first term is used for image search.

Any ideas?

Regarding you second question: Wikipedia actually supports "multiword queries", so that shouldn't be too hard to include. :)

kunzstef commented 8 years ago

OK then I would say we concatenate the single context keywords with OR and when a passive search was triggered we fire only one request to Wikipedia. Then we will get for popular keywords only images for the first one and display a one-time-notification explaining this.

But I would also remove displaying the passive search querys content in the searchbar, because it will be too long for the searchbar and not logical for the user, because when he re-submits the displayed query differnt results will be shown if we don't manually parse "a a" OR "b b" to single context keywords.

And I would not only submit 3 context keywords. I would use all, even though they most times will be ignored, that we always get our given number of pictures.

If you agree I could work on this

schloett commented 8 years ago

If wikicommons supports boolean search, you might use the same semantics as the federated recommender: In contextKeywords is a flag isMainTopic (or named similar), which indicates, that this keyword is the overall topic of the paragraph. Usually, the federated recommender contructs a query that looks like: ("main topic") AND ("keyword 1" OR "keyword 2" OR ...). Another option could also be to use only the main topic as single keyword for a query.

LadyBytes commented 8 years ago

Hey @kunzstef, go ahead! Jörgs's "xz AND xy OR xx" approach is definitely worth a try and should work as I've stated in my comment. Please work on my feature branch as I've already implemented the basics. All you have to do is check for a main topic and assemble the keywords using AND in this case. The particular function is called buildWikiQuery and located in background.js.

schloett commented 8 years ago

some more bugs/todos ordered by priority:

high

medium

low