Discussioni progetto:Coordinamento/Categorie/Progetto filtro categorie

Ultimo commento: 1 anno fa, lasciato da Seb35 in merito all'argomento Personal configuration of filters

Impostazione del perimetro modifica

Per indicare un caso d'uso va specificata una categoria (o una famiglia di categorie), la proprietà wikidta su cui attivare il filtro e una motivazione del perchè sia un caso d'uso significativo. Firmate la vostra proposta con tre ondine (--~~~).

✔️-> OK

❌-> Non applicable

🕷️->buggy

Categorie es filtrato perchè è / per Utente
biografiche ✔️Categoria:Esploratori islandesi per il genere (P21) perchè è stato il punto di partenza della discussione da cui si è poi giunto a questo progetto Ysogo

(msg)

per il data di nascita (P569) perchè è un naturale complemento della precedente Ysogo

(msg)

per il luogo di nascita (P19) perchè è un naturale complemento delle precedenti Ysogo

(msg)

per il data di morte (P570) perchè è un naturale complemento delle precedenti Ysogo

(msg)

per il luogo di morte (P20) perchè è un naturale complemento delle precedenti Ysogo

(msg)

di film ✔️Categoria:Film commedia drammatica per il regista (P57) perchè è altro esempio scaturito nella discussione Ysogo

(msg)

per la durata (P2047) perchè è altro esempio scaturito nella discussione Ysogo

(msg)

di sportivi ✔️Categoria:Ostacolisti italiani per la partecipazione a un evento (P1344 - partecipante a) perché non abbiamo categorie che raggruppano gli sportivi che hanno partecipato a una competizione (Olimpiadi del 2000) o a un gruppo di competizioni (Giochi olimpici in generale) Yiyi
di architetture ✔️Categoria:Palazzi di Milano filtrato per architetto (P84) e progettista (P287) per individuare facilmente le architetture di una città (o nazione) progettate una determinata persona Yiyi
filtrato per stile architettonico (P149) per individuare facilmente le architetture di una città (o nazione) con un determinato stile architettonico Yiyi
filtrato per data di fondazione o creazione (P571) per individuare facilmente le architetture di una città (o nazione) realizzate in una determinata epoca Yiyi
di opere d'arte ✔️Categoria:Dipinti di Sandro Botticelli filtrato per collezione (P195) per sapere dove sono conservate le opere di un autore Yiyi
di film Categoria:Film statunitensi

(Master category)

filtrati in base al soggetto originale (senza P144) o basati su opere letterarie (con P144) -- Yiyi
di sportivi Categoria:Calciatori brasiliani filtrato per numero di presenze in nazionale (P1129)

Not really possible because P1129 is a qualifier,it should be decided if the search should work for qualifiers....

per cercare gli sportivi più attivi nelle rispettive nazionali Yiyi
di atleti Categoria:Atleti francesi filtrati per disciplina sportiva (P2416)

No article

in modo da avere tutti gli atleti in un'unica categoria (come in passato) senza perdere la suddivisione per disciplina (attualmente abbiamo categorie come "Discoboli francesi", Velocisti francesi", "Mezzofondisti francesi", eccetera) Yiyi
di scacchisti ✔️Categoria:Scacchisti filtrati per titolo di giocatore di scacchi (P2962) Avremmo tutti gli scacchisti filtrati per titolo internazionale (ad es: grande maestro, maestro internazionale, grande maestro femminile) Conviene (msg)
filtrati per nazionalità sportiva (P1532) Avremmo tutti gli scacchisti filtrati a seconda della federazione sportiva nazionale che rappresentano o che hanno rappresentato Conviene (msg)
filtrati per nazionalità/cittadinanza (P27) scacchisti e atleti filtrati per nazionalità Conviene (msg)
filtrati per punteggio elo (P1087) si potrebbe quantificare quanti scacchisti abbiano raggiunto e superato nella loro carriera o in quel mese un certo punteggio Elo Conviene (msg)
di tornei di scacchi ✔️Categoria:tornei e campionati di scacchi filtrati per Paese (P17),

data (P585), luogo (P276), vincitore (P1346)

filtro per i tornei in base a vari elementi (applicabile anche agli altri sport) Conviene (msg)

...aggiungi liberamente....

Strategies for large categories modifica

This is a plan for improving the prototype on larger categories with a "progressive enhancement".

Currently the prototype works for small categories (up to 200 articles). Currently, when the user opens a category page, a SPARQL request is launched to obtain all values for all articles in the category for the specified properties (P21, P569, etc). This is not possible on larger categories because it is very long (and even fails) and it needs a lot of ressources on the SPARQL server (particularly if/when the widget will be deployed by default). So we have to find different strategies.

I cut the global problem into two sub-problems:

  1. have selectors with the maximum quality according to a performance/quality compromise (quality here is the level of assistance to the user when they enter their request, e.g. it is more confortable to have hints of a few values instead a free text without any hint);
  2. do the request.

I. - The selectors, corresponding to the specified properties, can be of different types: quantities (numbers, either integers or real numbers with a decimal part), dates (with subtypes: “year only” or “precise up to the day”), strings (multiple Wikibase types: monolingual texts, strings, entity IDs, URL), Wikidata items. The type of the properties are fundamental: it defines the widget used in the form. This request gives the number of properties depending on their type.

I define the quality of the selector with 4 levels:

  • level 1: a free field without any hint (only the type of the property is known),
  • level 2: if applicable (for strings and quantities), a regex (regular expression) or a range (minimum and/or maximum) specific to the property is used to give the user a very basic hint (e.g. for chemical element there is a regex constraint),
  • level 3: if possible, a list of all available values for the property can be used to give more hints to the user (e.g. for chemical element there are 175 values quickly available, or for sex/gender there is a constraint with 41 values,
  • level 4: if possible, a list of the specific values used for the property in the Wikipedia category is available, to give more hints to the user (e.g. for sex/gender there will be often two values, sometimes a few more values).

Currently, on small categories, the level 4 is reached, but e.g. for Categoria:Persone viventi we cannot reach level 4 but, depending on the property we can reach level 3 or 2. For instance it is easy for P21 (sex/gender) to reach level 3 on any category thanks to the constraint, but we can only reach level 2 for the property P569 (birth location) in large categories (too much articles in the category and too much values in this property).

II. - When the user validates their request, we have to execute the request. I envision two/three strategies:

  • for small categories (<= 200 pages), like currently, we request to SPARQL all properties for all pages and we locally filter the pages,
  • for large categories (defined by a parameter, e.g. > 3000), we request to SPARQL very precisely what the user requests, without storing anything of previous requests,
  • for medium categories, we can adopt a hybrid strategy: first the strategy for large categories, but in the background doing the strategy for small categories (or possibly fallback to the “small categories” strategy when the user has already done (e.g.) 3 requests and we can expect they will continue).

III. - An exception: for large categories with large properties (like P19 "place of birth" which have 251 042 unique values [1]), I could propose the user enters their values thanks to autocomplete, even if they enter values not specifically tight to specific Wikidata items (e.g. they enter "place of birth = Italy"), and the request part is aware that the search should be done accross indirect values (e.g. "place of birth = Italy" is translated to "items whose P19 is an item whose P17 (country) or P131 (located in the administrative territorial entity) is Italy").

More should investigated about the autocomplete because the Wikidata autocomplete (API with action=wbsearchentities) is not available on Wikipedia (policy CORS, perhaps it could be requested to WMF if it can allowed on Wikipedia) and the new search available on French-speaking Wikipedia is not activated on Italian-speaking Wikipedia (the search with an image and a small description). The current autocomplete of Italian-speaking Wikipedia could be enough for now. Note the Wikidata autocomplete have more values and is slightly more accute than Wikipedia autocomplete because Wikidata has more items than Wikipedia articles and at the end we need a Wikidata item for the SPARQL request (but if we have only Wikipedia autocomplete (thus returning Wikipedia articles), there is a high probability than the Wikipedia article has a corresponding Wikidata item, so translation could be done).

An autocomplete restricted to acceptable values of the property (e.g. only geographical places in P19 "place of birth") would be great, but I’m not sure SPARQL would be quick enough to allow this feature.

~ Seb35 [^_^] 18:12, 4 mar 2022 (CET)Rispondi

Categoria:Calciatori italiani modifica

[@ Seb35] Can you check category Categoria:Calciatori italiani? I use filter Place of born=Torino, but nothing happen...

[@ ValterVB] The "huge" categories require some additional intelligence to be both efficient and easy to use: we are working on... stay tuned, we will inform you when ready :-) --Ysogo (msg) 13:30, 9 ago 2022 (CEST)Rispondi
Thanks --ValterVB (msg) 15:29, 9 ago 2022 (CEST)Rispondi
[@ ValterVB, Ysogo] Theoretically it should work, as illustrated by this screencast I just made.
  • Do you obtain this result? => in this case it’s probably a usability issue to improve
  • Else what is your browser? => I will check if there is a bug.
You entered Torino, so there are 4 people born there, the additional intelligence still not implemented is if you entered "Piemonte".
~ Seb35 [^_^] 11:48, 11 ago 2022 (CEST)Rispondi
[@ Seb35] Strange now it work. Now I tryed with "Sex=Maschio" I see quickly the counter e then is disappears and nothing is showed. --ValterVB (msg) 13:19, 11 ago 2022 (CEST)Rispondi
[@ Seb3][@ Seb35] Indeed there is some issue... I tried to search for people born in "Monza" but it didnt find anything but it should at least get Pierluigi Casiraghi. My feeling is that it's not searching among items listed from the second page ahead. Also the sample in your screencapture is weird: I believe that several players were boron in torino with name starting with C, D, E... and so on. --Ysogo (msg) 15:57, 13 ago 2022 (CEST)Rispondi
[@ Ysogo] It was not easy but it is fixed, and it was the same issue with Torino (when a partial result searching in 100 articles was empty, it was the end of the global result, which was wrong but difficult to overcome because of the way MWAPI works). The only solution I found to overcome this issue is to emit an additional API request, which adds some more delay. --~ Seb35 [^_^] 17:58, 17 ago 2022 (CEST)Rispondi
[@ ValterVB] You experienced an edge case, but it "works": the list of genders is the complete list from Wikidata (list here), and there are "two" types of men: Q6581097 (en=male; it=maschio) and Q44148 (en=male organism; it=maschio), you selected "male organism". Is it possible to have another label in Italian for "male organism" (resp. "female organism")? E.g. in French there is "mâle" (male organism) and "masculin" (male). --~ Seb35 [^_^] 12:07, 17 ago 2022 (CEST)Rispondi
[@ Seb35] Ahh yes, I get it.... Maybe need a feedback that say "not found" or something like that, can be useful report the property number. For "male" isn't easy found a solution... --ValterVB (msg) 12:53, 17 ago 2022 (CEST)Rispondi
[@ ValterVB] I added a message "No results", it is indeed more clear (as well as a message displaying the number of results when there are results). --~ Seb35 [^_^] 17:47, 17 ago 2022 (CEST)Rispondi

ItWikiCon 2022 modifica

Hello, we (Seb35 and I) are present at the ItWikiCon in Verbania, feel free to come in the Morissolo room to give us feedback about the Progetto filtro categorie ! --Nicolas NALLET (msg) 17:48, 30 set 2022 (CEST)Rispondi

Filtro categorie as Gadget (✔️done!) modifica

Dear interface administrators [@ Melos] [@ Laurentius] [@ Valepert],

We (Wiki Valley company) are currently working on the " filtro categorie" features with some person of the Italian Wikimedia.

We would like to transform the feature Filtro categorie as a gadget. To do that we need an interface administrator to implement the code on creating a gadget including only the line :

mw.loader.load('//it.wikipedia.org/wiki/Utente:Seb35/common.js?action=raw&ctype=text/javascript');

Or you can copy and paste the code present on the page https://it.wikipedia.org/wiki/Utente:Seb35/common.js if you want to validate before implementation.

Or you can promote Seb35 as interface administrator.

Please tell me what do you think is the most simple way,

--12:38, 22 feb 2022 (CET)

(I never received the ping but I'll take the request) --valepert 17:44, 22 feb 2022 (CET)Rispondi
[@ Ysogo] added as Gadget with description "Filtro categorie (BETA).". ping me if you want to change the text (or doesn't work). --valepert 17:55, 22 feb 2022 (CET)Rispondi
That's ok. Thank you. --Ysogo (msg) 20:27, 22 feb 2022 (CET)Rispondi

Ordinamento/Sorting modifica

Controllando la categorie Categoria:Film commedia drammatica e mettendo il filtro vedo che i risultati non sono ordinati alfabeticamente. E' possibile ordinarli? / Checking the category Categoria:Film commedia drammatica and setting the filter, I see that the results are not sorted alphabetically. Is it possible to sort them? --ValterVB (msg) 11:37, 10 dic 2022 (CET)Rispondi

[@ Seb35, Nicolas NALLET] --ValterVB (msg) 11:47, 12 dic 2022 (CET)Rispondi

Personal configuration of filters modifica

We brainstormed about a feature to allow users to have a personal configuration (for themselves only), saved in a JSON like this one (proposition for now).

Options to be discussed:

  1. We think it is preferable to add a custom filter in addition of the pre-defined filters, but it could be discussed (the other solution would be to replace existing filters).
  2. Should we add a switch to temporarily go back to pre-defined filters? (mainly useful if we replace pre-defined filters in question 1)
  3. Should we create a User Interface to let the user decide which category he would like to alter and add more filters to (with an autocomplete feature to make it easier)?
  4. Should we exploit the various wikidata types to add particular filters to them (human= filters: ['p21', 'P19']) through the user's JSON file?

--~ Seb35 [^_^] 15:17, 7 apr 2023 (CEST)Rispondi

Ritorna alla pagina "Coordinamento/Categorie/Progetto filtro categorie".