You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you call http://api.conceptnet.io/r/PartOf and follow all of the nextPage responses, you end up getting about 1320 relationships. If you count each unique concept referenced in the start and end properties of these relationships, then look at which letters these concepts start with (throwing away 'a ' and 'an ' prefixes), you get this:
Good observation! That looks like an issue that's a lot like paging stopping early -- in particular, the database query stopping early to avoid slowdowns when there are too many results.
Something we're working on that uses machine learning to refine the "weight" value would cause the results to be ranked by something more meaningful than the order they were put in the database, although it would be biased toward certain data sources.
If you need to get all the edges for a common relation, I'd recommend downloading the data and filtering it.
Aha! Thank you, it didn't occur to me that downloading it all was an option!
What I'm trying to accomplish is getting a random edge for a relation. Right now, I think I'll download, convert to ndjson so there's one edge per line, then pick a random line from the file. I don't suppose there's a more direct way to do that?
One reason we didn't expose the query for random edges is that the ConceptNet server relies on a lot of caching to stay up, and randomness can't be cached.
The bias toward alphabetically-earlier concepts is fixed in 5.7.
If you call
http://api.conceptnet.io/r/PartOf
and follow all of thenextPage
responses, you end up getting about 1320 relationships. If you count each unique concept referenced in thestart
andend
properties of these relationships, then look at which letters these concepts start with (throwing away 'a ' and 'an ' prefixes), you get this:That's a lot of a- and b- concepts! If you query the relationship endpoint with
AtLocation
, you end up with something similarly skewed:Is this because there is an issue with paging stopping early? Or is there an issue with the data?
The text was updated successfully, but these errors were encountered: