[Wikidata-bugs] [Maniphest] T306783: Combining English dialects in SPARQL FILTER bug or feature?

2022-04-26 Thread joshmoore
joshmoore added a comment.


  Thanks again, Lucas. Simplifying the original a bit:
  
SELECT DISTINCT ?city (SAMPLE(?name) as ?name)
WHERE 
{
  ?city wdt:P31/wdt:P279* wd:Q387917 . # wd:Q515 .
  ?city rdfs:label ?label .
  FILTER(LANGMATCHES(LANG(?label), "en"))
  BIND( strbefore( ?label, " " ) as ?name )
  FILTER(CONTAINS(?name, "Rüdesheim"))
}
GROUP BY ?city
  
  does seem to work (though the fuller example did run into timeouts)

TASK DETAIL
  https://phabricator.wikimedia.org/T306783

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Andrawaag, joshmoore
Cc: Lucas_Werkmeister_WMDE, joshmoore, Andrawaag, Aklapper, Astuthiodit_1, 
karapayneWMDE, Invadibot, MPhamWMF, maantietaja, CBogen, ItamarWMDE, Akuckartz, 
Nandana, Namenlos314, Lahi, Gq86, GoranSMilovanovic, QZanden, EBjune, merbst, 
LawExplorer, _jensen, rosalieper, Scott_WUaS, Jonas, Xmlizer, jkroll, 
Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331
___
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org


[Wikidata-bugs] [Maniphest] T306783: Combining English dialects in SPARQL FILTER bug or feature?

2022-04-26 Thread Lucas_Werkmeister_WMDE
Lucas_Werkmeister_WMDE added a comment.


  Something like `LIMIT 1`, or `GROUP BY` + `SAMPLE(?label)`, I guess.

TASK DETAIL
  https://phabricator.wikimedia.org/T306783

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Andrawaag, Lucas_Werkmeister_WMDE
Cc: Lucas_Werkmeister_WMDE, joshmoore, Andrawaag, Aklapper, Astuthiodit_1, 
karapayneWMDE, Invadibot, MPhamWMF, maantietaja, CBogen, ItamarWMDE, Akuckartz, 
Nandana, Namenlos314, Lahi, Gq86, GoranSMilovanovic, QZanden, EBjune, merbst, 
LawExplorer, _jensen, rosalieper, Scott_WUaS, Jonas, Xmlizer, jkroll, 
Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331
___
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org


[Wikidata-bugs] [Maniphest] T306783: Combining English dialects in SPARQL FILTER bug or feature?

2022-04-26 Thread joshmoore
joshmoore added a comment.


  Thanks, Lucas. Appreciate the feedback as the original instigator. 😃 This may 
be getting into a data model question but this leaves me to wonder that if 
there a chance that there would be no `en` but several `en_*` entries, what 
would be the appropriate filter for "exactly one `en` based language".

TASK DETAIL
  https://phabricator.wikimedia.org/T306783

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Andrawaag, joshmoore
Cc: Lucas_Werkmeister_WMDE, joshmoore, Andrawaag, Aklapper, Astuthiodit_1, 
karapayneWMDE, Invadibot, MPhamWMF, maantietaja, CBogen, ItamarWMDE, Akuckartz, 
Nandana, Namenlos314, Lahi, Gq86, GoranSMilovanovic, QZanden, EBjune, merbst, 
LawExplorer, _jensen, rosalieper, Scott_WUaS, Jonas, Xmlizer, jkroll, 
Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331
___
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org


[Wikidata-bugs] [Maniphest] T306783: Combining English dialects in SPARQL FILTER bug or feature?

2022-04-25 Thread Andrawaag
Andrawaag closed this task as "Resolved".
Andrawaag claimed this task.
Andrawaag added a comment.


  Perfect, thanks @Lucas_Werkmeister_WMDE. I agree it is a feature.

TASK DETAIL
  https://phabricator.wikimedia.org/T306783

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Andrawaag
Cc: Lucas_Werkmeister_WMDE, joshmoore, Andrawaag, Aklapper, Astuthiodit_1, 
karapayneWMDE, Invadibot, MPhamWMF, maantietaja, CBogen, ItamarWMDE, Akuckartz, 
Nandana, Namenlos314, Lahi, Gq86, GoranSMilovanovic, QZanden, EBjune, merbst, 
LawExplorer, _jensen, rosalieper, Scott_WUaS, Jonas, Xmlizer, jkroll, 
Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331
___
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org


[Wikidata-bugs] [Maniphest] T306783: Combining English dialects in SPARQL FILTER bug or feature?

2022-04-25 Thread Lucas_Werkmeister_WMDE
Lucas_Werkmeister_WMDE added a comment.


  You can also see the difference in the query service UI if you hover over the 
string:
  
  F35066919: image.png 
  
  I don’t really understand what the issue here is… the query uses 
`FILTER(LANGMATCHES(LANG(?label), "en"))` instead of `FILTER(LANG(?label) = 
"en")`, and that function 
 includes non-exact 
matches, e.g. `en-gb` matches `en`. I would characterize that as a feature, not 
a bug.

TASK DETAIL
  https://phabricator.wikimedia.org/T306783

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Lucas_Werkmeister_WMDE
Cc: Lucas_Werkmeister_WMDE, joshmoore, Andrawaag, Aklapper, Astuthiodit_1, 
karapayneWMDE, Invadibot, MPhamWMF, maantietaja, CBogen, ItamarWMDE, Akuckartz, 
Nandana, Namenlos314, Lahi, Gq86, GoranSMilovanovic, QZanden, EBjune, merbst, 
LawExplorer, _jensen, rosalieper, Scott_WUaS, Jonas, Xmlizer, jkroll, 
Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331
___
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org


[Wikidata-bugs] [Maniphest] T306783: Combining English dialects in SPARQL FILTER bug or feature?

2022-04-25 Thread Andrawaag
Andrawaag created this task.
Andrawaag added projects: Wikidata, Wikidata-Query-Service.
Restricted Application added a subscriber: Aklapper.

TASK DESCRIPTION
  When running the following DISTINCT query (https://w.wiki/56NX) the results 
does contain 3 seemingly identical records. When run outside out of the WDQS it 
becomes clear why that is. English dialects/variants are treated as identical. 
  F35066913: image.png 
  
  Distinct does work, although the WDQS suggests it doesn't.

TASK DETAIL
  https://phabricator.wikimedia.org/T306783

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Andrawaag
Cc: Andrawaag, Aklapper, Astuthiodit_1, karapayneWMDE, Invadibot, MPhamWMF, 
maantietaja, CBogen, ItamarWMDE, Akuckartz, Nandana, Namenlos314, Lahi, Gq86, 
Lucas_Werkmeister_WMDE, GoranSMilovanovic, QZanden, EBjune, merbst, 
LawExplorer, _jensen, rosalieper, Scott_WUaS, Jonas, Xmlizer, jkroll, 
Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331
___
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org