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

More Wikidata predicates #48

Open
zverok opened this issue Mar 4, 2016 · 6 comments
Open

More Wikidata predicates #48

zverok opened this issue Mar 4, 2016 · 6 comments
Labels

Comments

@zverok
Copy link
Contributor

zverok commented Mar 4, 2016

Full list is here: https://github.com/molybdenum-99/reality/blob/master/data/wikidata-predicates.yaml

Add reasonable number of interesting ones.

Code for checking how much of entities uses predicate in web console:

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/> 
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX v: <http://www.wikidata.org/prop/statement/>

SELECT ?id ?idLabel ?o ?oLabel  WHERE {
  ?id wdt:P1884 ?o .
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
  }
 } limit 100

(replace P1884 with your value).

@zverok zverok added the data label Mar 4, 2016
@talakoski
Copy link

I was adding some more Wikidata predicates to wikidata.rb but then started to wonder if adding them manually is the correct way. I was simply doing copy-paste from Wikidata pages. Wouldn't it be easier to just automatically fetch all predicates from Wikidata?

@zverok
Copy link
Contributor Author

zverok commented Mar 7, 2016

My solution currently is to add them manually. There IS automatically extracted list of predicates (data/wikidata-predicates.yaml), but with manuall adding we can:

  • decide right name: short, unambiguous and generic enough;
  • decide right type (plural/singular, entity or string or number or...);
  • group predicates logically (currently only by comments in wikidata.rb, but I imagine those comments can some time became some sort of "property groups").

I can see no way to automate this.

Speaking broader, entire Reality is somewhat about hand-craftedness (there's many data available in open datasources, and what we are trying to do is provide easy and pretty access to them).

@talakoski
Copy link

Aye, I see your point. I believe Wikidata has already done some fighting over the predicate names so I (as non-native English person) was happy to accept whatever they have. Grouping is a good idea but might also be hard to do as predicates can be used in several topics. But you need to start from somewhere so lets do some handcrafting!

@zverok
Copy link
Contributor Author

zverok commented Mar 10, 2016

I believe Wikidata has already done some fighting over the predicate names so I (as non-native English person) was happy to accept whatever they have.

I'm non-native English myself, but if you look at predicate names in aforementioned file, you can see that many of them are too long ("country of citizenship" or "located in the administrative territorial entity", for example), and/or just hard to type as method name ("ISO 3166-1 alpha-3 code" -- what would the method should been named? "iso_3166_1_alpha_3_code"?). Also, I wanted that predicate name made clear distinction of plurals and singulars (so, I use "parts" instead of "part_of", which is questionable).

All in all, everything here is just definitely "to start from somewhere", I'm still looking forward for a good an consistent policy of property names.

@zverok
Copy link
Contributor Author

zverok commented Apr 12, 2016

@talakoski I'm finalizing "nearest release" plans till Friday, don't you want to do some pull request? :)

@talakoski
Copy link

Love to do so but I doubt I have currently time to make it. I see good progress here :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants