Comments (9)
Twitter username → has quality → case insensitivity so
twitter.com/DerenRich should resolve to Q108267155 (actual value derenrich
).
Alright, I'll see what I can do.
from wd.
@derenrich do you have any clue about how to make a case insensitive sparql query?
`
SELECT ?item
WHERE {
?item wdt:${ prop } "${ id }".
}
`
should I just assume the string in the database is lower case?
`
SELECT ?item
WHERE {
?item wdt:${ prop } "${ ci ? id.toLowerCase() : id }".
}
`
from wd.
i think you have to rewrite the query with a filter and downcasing both the search and target strings (or a regex). probably less efficient but it's the only way to be sure.
from wd.
I'm starting to wonder why we are doing this. Does any part of the twitter api downcase the usernames? Is there a url scheme that only serves the usernames lowercased? If not, why don't we store usernames how they occur? What converts them to lowercase, and why?
from wd.
We are not doing that at all. Nothing is converted to lower case. On our side, P2002 is supposed to store the preferred variant and not the lower case one.
For me it would be "camelCaseNick" not "camelcasenick" nd if you clicked from within Twitter on my profile you'd get https://twitter.com/camelCaseNick. However if you manually navigated to https://twitter.com/camelcasenick Twitter would serve the same profile without a redirect. That is the problem here.
A functioning (though less efficient) query could be:
select ?item where {
?item wdt:${ prop } ?id.
filter(lcase(?id) = "${ id.toLowerCase() }")
}
from wd.
However if you manually navigated to https://twitter.com/camelcasenick Twitter would serve the same profile without a redirect. That is the problem here.
I understand that. But how likely is it? Why should anybody do that?
I found https://twitter.com/camelCaseNick
using twitters own search. However the page was linked with:
<link href="https://twitter.com/camelcasenick" rel="canonical">
So twitter seems to be uncertain, which username they want to show us. I would prefer to store the one that is not lowercased because it contains more information. 🤷
from wd.
This is a general problem not limited to Twitter
from wd.
@derenrich Version 0.189 should now resolve case insensitive identifiers case insensitively:
If you notice any problems, feel free to reopen this issue
from wd.
thanks!
from wd.
Related Issues (20)
- Weird bugs? HOT 4
- Miraheze article resolver HOT 4
- Sort dropdowns by last chosen by user HOT 1
- Better entity search for Open Library authors HOT 1
- furigana doesn't work for words that include both katakana and hiragana HOT 1
- P854 should not be added when source is Wikipedia, but P143/P4656 HOT 8
- Amazon Author ID not being parsed HOT 3
- Add review score by when adding a tripadvisor ID HOT 7
- Could we have a way to debug when wd4w doesn't recognise a URL? HOT 4
- Keep seaching for metadata when switching tabs
- Warn when on blocked IP HOT 5
- Looks like the Google Map id is not extracted from Google Map HOT 3
- Feature request: scan page and highlight links that are not yet linked to wikidata HOT 4
- setting `instance of` to `writer` isn't recommended. HOT 10
- Default instance of for books should be "written work" HOT 3
- Temporary build issue due to dependency HOT 2
- Feature request: Search via wikipedia url pasted/drag'n'dropped into the search box HOT 2
- Sidebar should link to item page when item exists HOT 5
- Help fix ID extraction from thecoversation.com HOT 5
- QUOTA_BYTES quota exceeded - do some wikidata entries return too much?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wd.