From mariana.soffer at nektra.com Tue Apr 1 19:41:13 2008 From: mariana.soffer at nektra.com (mariana soffer) Date: Tue, 01 Apr 2008 16:41:13 -0300 Subject: [Developers] write query error Message-ID: <47F28FD9.3000204@nektra.com> Using the query editor aplication , I created a type of my own and I am trying to create a new topic with this type but I can't. I get errors such as : "message" : "Can't locate this clause - cannot continue" can anybody please send me 2 queries, one for creating a simple type of my own and a second one for inserting a topic of this type. Thank you very much to all Mariana From ben at metaweb.com Tue Apr 1 21:39:32 2008 From: ben at metaweb.com (Ben Drees) Date: Tue, 01 Apr 2008 14:39:32 -0700 Subject: [Developers] write query error In-Reply-To: <47F28FD9.3000204@nektra.com> References: <47F28FD9.3000204@nektra.com> Message-ID: <47F2AB94.6080803@metaweb.com> Hi Mariana, The error logs show that you are trying to create instances of types that don't exist. Replace this clause: "type": "/user/msoffer/default_domain/note" with something like this: "type": "/user/msoffer/default_domain/pad" -Ben mariana soffer wrote: > Using the query editor aplication , I created a type of my own and I am > trying to create a new topic with this type but I can't. > I get errors such as : > > "message" : "Can't locate this clause - cannot continue" > > > can anybody please send me 2 queries, one for creating a simple type of > my own > and a second one for inserting a topic of this type. > > Thank you very much to all > > Mariana > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers > > From torbin.pace at juggle.com Tue Apr 1 21:57:56 2008 From: torbin.pace at juggle.com (Torbin Pace) Date: Tue, 1 Apr 2008 16:57:56 -0500 Subject: [Developers] Compound/Standard Type Message-ID: <3d10c5660804011457w73799a77pf8bdaca32f5d38a2@mail.gmail.com> Hi, I am currently trying to figure out how to determine whether or not a type is Standard/Compound/Enumerated etc. through use of the mql api. Right now I am pulling in a listing of types by domain and I'm wondering if there is a specific property that shows the value I'm looking for, or if there are a set of properties that I need to look at. For reference, the query I'm currently using to get the type information is pasted in below. If anybody can point me in the right direction, I would appreciate it. Thanks. { "query" : [ { "domains" : [ { "id" : null, "name" : null, "type" : "/type/domain", "types" : [ { "/freebase/type_profile/instance_count" : null, "/type/reflect/any_reverse" : { "limit" : 1, "link" : { "master_property" : "/freebase/type_hints/hinted_type" }, "mediator" : null, "optional" : true, "type" : "/freebase/type_hints" }, "id" : null, "name" : null, "optional" : true, "properties" : [], "sort" : "name" } ] } ], "name" : null, "type" : "/freebase/domain_category" } ] } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20080401/b4684000/attachment.htm From crism at metaweb.com Tue Apr 1 23:35:07 2008 From: crism at metaweb.com (Christopher R. Maden) Date: Tue, 01 Apr 2008 15:35:07 -0800 Subject: [Developers] Compound/Standard Type In-Reply-To: <3d10c5660804011457w73799a77pf8bdaca32f5d38a2@mail.gmail.com> References: <3d10c5660804011457w73799a77pf8bdaca32f5d38a2@mail.gmail.com> Message-ID: <47F2C6AB.8090207@metaweb.com> Torbin Pace wrote: > I am currently trying to figure out how to determine whether or not a > type is Standard/Compound/Enumerated etc. through use of the mql api. > Right now I am pulling in a listing of types by domain and I'm wondering > if there is a specific property that shows the value I'm looking for, or if > there are a set of properties that I need to look at. You are looking for three properties: /freebase/type_hints/mediator is True if a type is a compound value type (which we used to call mediators). /freebase/type_hints/minor is True if a type is a supporting type. /freebase/type_hints/enumeration is True if a type is enumerated. The properties may be explicitly False or may be absent altogether. ~Chris -- Christopher R. Maden Data Architect Metaweb Technologies, Inc. From jack.alves at gmail.com Wed Apr 2 19:01:00 2008 From: jack.alves at gmail.com (Jack Alves) Date: Wed, 2 Apr 2008 12:01:00 -0700 Subject: [Developers] query for topic data at a specific timestamp Message-ID: <554723b0804021201l5dd4d54er5ec9d66a2c845580@mail.gmail.com> Does anyone have an example query that returns only data present at a specific time? I'm working with someone who wants to act as a trusted authority for a set of topics. I heard about the technique of storing the timestamp of a known good version. I don't know how to form that query. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20080402/6ed1759a/attachment.htm From xtine at metaweb.com Wed Apr 2 19:15:40 2008 From: xtine at metaweb.com (Christine Begle) Date: Wed, 2 Apr 2008 15:15:40 -0400 (EDT) Subject: [Developers] query for topic data at a specific timestamp In-Reply-To: <554723b0804021201l5dd4d54er5ec9d66a2c845580@mail.gmail.com> Message-ID: <17007076.103011207163740753.JavaMail.root@h00215> Hey, Jack. You can use the "as_of_time" attribute in the mql envelope -- here's an example: this query: { "q1" : { "as_of_time" : "2007-01-09T22:00:56.0000Z", "query" : [ { "domain" : "/architecture", "id" : null, "return" : "count", "timestamp" : null, "type" : "/type/type" } ] } } returns 12 (there were 12 types in the /architecture domain last january). { "q1": { "code": "/api/status/ok", "result": [ 12 ] }, "status": "200 OK", "code": "/api/status/ok" } this query (no as_of_time attribute): { "q1" : { "query" : [ { "domain" : "/architecture", "id" : null, "return" : "count", "timestamp" : null, "type" : "/type/type" } ] } } returns the current number of types in the architecture domain: { "q1": { "code": "/api/status/ok", "result": [ 25 ] }, "status": "200 OK", "code": "/api/status/ok" } ----- Original Message ----- From: "Jack Alves" To: developers at freebase.com Sent: Wednesday, April 2, 2008 12:01:00 PM (GMT-0800) America/Los_Angeles Subject: [Developers] query for topic data at a specific timestamp _______________________________________________ Developers mailing list Developers at freebase.com http://lists.freebase.com/mailman/listinfo/developers From david at davidflanagan.com Fri Apr 4 18:23:47 2008 From: david at davidflanagan.com (David Flanagan) Date: Fri, 04 Apr 2008 11:23:47 -0700 Subject: [Developers] Questions about the login service Message-ID: <47F67233.1000304@davidflanagan.com> Hi, Before I start asking too many more questions, I should introduce myself: I'm the original author of the MQL documentation at http://www.freebase.com/view/en/documentation, and I'm now working to bring it up to date. So I'll probably be posting a number of questions here... Today, I'm wondering about the login service. 1) I original documented it as POST only, but now it works with GET as well. Is that stable? Can I document it? 2) In my documentation I do some hand-waving about which of the cookies returned by login is necessary for services that require login, and I just say that you have to pass all cookies returned by login to the services that expect cookies. I'd guess that that is no longer the case. Is it okay to just pass the metaweb-user cookie? Or is the metaweb-user-info cookie the correct one? 3) Are there plans to make the login service support https? And if so, will the mqlwrite and upload services also support https? Otherwise passwords and cookies (which are almost as good as cookies) are being passed around as cleartext, which means that there aren't any really strong guarantees against freebase identity theft. Thanks! David Flanagan From david at davidflanagan.com Fri Apr 4 20:39:30 2008 From: david at davidflanagan.com (David Flanagan) Date: Fri, 04 Apr 2008 13:39:30 -0700 Subject: [Developers] State Quarters example and "need a unique result to attach here" Message-ID: <47F69202.7000304@davidflanagan.com> When I first wrote the US State Quarters example (http://freebase.com/view/guid/9202a8c04000641f800000000544e10c#id2609142) I specified that the type of the us_state_quarter/state property was /type/text The example has been modified since I wrote it. It now expects the state property to be /location/us_state, which is good. In order to make this change work, however, the query in the python code had to change, and I don't understand why. Since I don't get it, I'm obviously not explaining something right about the MQL write grammar. Here is the original query from the example: # This query creates a single quarter q = {'create':'unless_exists', # Create a new object 'guid':None, # And return its guid 'type':["/common/topic", TYPEID], # Make it a topic and a 'name': fields[0] + ' State Quarter', # The object's name 'state': fields[0], # State name 'release': fields[1], # Release date 'statehood': fields[2], # Statehood date 'mintage': int(fields[3])} # How many minted Here's the modified version as it stands now: # This query creates a single quarter q = {'create':'unless_exists', # Create a new object 'id':None, # And return its id 'type':["/common/topic", TYPEID], # Make it a topic and a 'name': fields[0] + ' State Quarter', # The object's name 'release': fields[1], # Release date 'statehood': fields[2], # Statehood date 'mintage': int(fields[3]), # How many minted 'state': { 'name': fields[0], 'type': '/location/us_state' }} # The change is that the value of the state property is now an expanded object with an explictly specified type instead of a simple state name. I don't understand why this is necessary. I don't see why I can't specify the state by name. It seems to me that the server knows the expected type of the state property and could use that type and the name I specify to uniquely identify the object I want to connect to here. If I run my old version of the query, however (and the state quarter object does not exist) I get the error message "Need a unique result to attach here, not 2". From looking at the two guids it reports, it can't decide between the state of Delaware and the city of Delaware, Iowa. (The full error response from mqlwrite is below, if anyone wants to look at it.) Note that once the state quarter objects exist, my version of the query works fine: I get "create:existed" as expected. So my questions are: 1) Is this a bug? 2) If it is not a bug then I need to better understand the matching rules for create:unless_exists. Would this have worked if I specified the state by id rather than by name? 3) Why isn't connect:insert or connect:update required here? 'state': { 'name': fields[0], 'type': '/location/us_state' }} That is, why doesn't think clause create a new /location/us_state instance? Does the create:unless_exist at the root of the query somehow apply to this sub-query as well? Thanks for any help! David This is the full error response to my write query. { "code": "\/api\/status\/ok", "qname": { "code": "\/api\/status\/error", "messages": [ { "code": "\/api\/status\/error\/mql\/result", "info": { "count": 2, "guids": [ "#9202a8c04000641f8000000000011a70", "#9202a8c04000641f80000000000c6866" ] }, "message": "Need a unique result to attach here, not 2", "path": "state", "query": [ { "create": "unless_exists", "error_inside": "state", "guid": null, "mintage": 774824000, "name": "Delaware State Quarter", "release": "1999-01-04", "state": "Delaware", "statehood": "1787-12-07", "type": [ "\/common\/topic", "\/user\/docs\/default_domain\/us_state_quarter" ] } ] } ] }, "status": "200 OK" } But if I try running the query in the old way, I get the error From crism at metaweb.com Fri Apr 4 20:58:56 2008 From: crism at metaweb.com (Christopher R. Maden) Date: Fri, 04 Apr 2008 12:58:56 -0800 Subject: [Developers] State Quarters example and "need a unique result to attach here" In-Reply-To: <47F69202.7000304@davidflanagan.com> References: <47F69202.7000304@davidflanagan.com> Message-ID: <47F69690.8090909@metaweb.com> David Flanagan wrote: > When I first wrote the US State Quarters example > (http://freebase.com/view/guid/9202a8c04000641f800000000544e10c#id2609142) > I specified that the type of the us_state_quarter/state property was > /type/text > > The example has been modified since I wrote it. It now expects the state > property to be /location/us_state, which is good. In order to make this > change work, however, the query in the python code had to change, and > I don't understand why. Since I don't get it, I'm obviously not > explaining something right about the MQL write grammar. Names of things are not generally a good idea for connecting properties, as they are rarely unique (and will become less so as Freebase expands), and MQL shies away from being (or attempting to be) a DWIM system. I would probably approach this specific problem in two passes: one to get the IDs of the states of the given name, and the second creating the quarters with "state" : { "id" : state_id } Among US states, names are very likely to be unique, but as an example, that is not a good general assumption. ~Chris -- Christopher R. Maden Data Architect Metaweb Technologies, Inc. From david at davidflanagan.com Fri Apr 4 21:20:41 2008 From: david at davidflanagan.com (David Flanagan) Date: Fri, 04 Apr 2008 14:20:41 -0700 Subject: [Developers] State Quarters example and "need a unique result to attach here" In-Reply-To: <47F69690.8090909@metaweb.com> References: <47F69202.7000304@davidflanagan.com> <47F69690.8090909@metaweb.com> Message-ID: <47F69BA9.9000507@davidflanagan.com> Christopher R. Maden wrote: > David Flanagan wrote: >> When I first wrote the US State Quarters example >> (http://freebase.com/view/guid/9202a8c04000641f800000000544e10c#id2609142) >> I specified that the type of the us_state_quarter/state property was >> /type/text >> >> The example has been modified since I wrote it. It now expects the state >> property to be /location/us_state, which is good. In order to make this >> change work, however, the query in the python code had to change, and >> I don't understand why. Since I don't get it, I'm obviously not >> explaining something right about the MQL write grammar. > > Names of things are not generally a good idea for connecting properties, > as they are rarely unique (and will become less so as Freebase expands), > and MQL shies away from being (or attempting to be) a DWIM system. I understand that, but in this case (and as you point out), a US state is uniquely identified by its name and its type. I'm wondering why, therefore, the expected type of the state property plus the name of the state isn't sufficient to identify the state object I want. (And why is it confused about a city named Delaware?) In order to make my documentation clear, I need to understand not just why it is a bad idea, but why it doesn't work! David From crism at metaweb.com Fri Apr 4 21:31:55 2008 From: crism at metaweb.com (Christopher R. Maden) Date: Fri, 04 Apr 2008 13:31:55 -0800 Subject: [Developers] State Quarters example and "need a unique result to attach here" In-Reply-To: <47F69BA9.9000507@davidflanagan.com> References: <47F69202.7000304@davidflanagan.com> <47F69690.8090909@metaweb.com> <47F69BA9.9000507@davidflanagan.com> Message-ID: <47F69E4B.7080100@metaweb.com> David Flanagan wrote: > I understand that, but in this case (and as you point out), a US state > is uniquely identified by its name and its type. I'm wondering why, > therefore, the expected type of the state property plus the name of the > state isn't sufficient to identify the state object I want. (And why is > it confused about a city named Delaware?) > > In order to make my documentation clear, I need to understand not just > why it is a bad idea, but why it doesn't work! I will let one of the developers handle the rationale. But we are not yet at a point where we can generally assume that things are well-enough typed to use as a filter programmatically, so when you specify something solely by name in MQL, it filters solely on the name. If you want to filter on name and type, you must specify the name and type. It is also worth noting that, as per Bryan Cheung?s post to the data modeling list, cities and towns are now given their simple names (?Delaware?) rather than their formerly disambiguated names (?Delaware, Ohio?). ~Chris -- Christopher R. Maden Data Architect Metaweb Technologies, Inc. From david at davidflanagan.com Fri Apr 4 22:13:30 2008 From: david at davidflanagan.com (David Flanagan) Date: Fri, 04 Apr 2008 15:13:30 -0700 Subject: [Developers] State Quarters example and "need a unique result to attach here" In-Reply-To: <47F69E4B.7080100@metaweb.com> References: <47F69202.7000304@davidflanagan.com> <47F69690.8090909@metaweb.com> <47F69BA9.9000507@davidflanagan.com> <47F69E4B.7080100@metaweb.com> Message-ID: <47F6A80A.2050405@davidflanagan.com> Christopher R. Maden wrote: > David Flanagan wrote: >> I understand that, but in this case (and as you point out), a US state >> is uniquely identified by its name and its type. I'm wondering why, >> therefore, the expected type of the state property plus the name of the >> state isn't sufficient to identify the state object I want. (And why is >> it confused about a city named Delaware?) >> >> In order to make my documentation clear, I need to understand not just >> why it is a bad idea, but why it doesn't work! > > I will let one of the developers handle the rationale. > > But we are not yet at a point where we can generally assume that things > are well-enough typed to use as a filter programmatically, so when you > specify something solely by name in MQL, it filters solely on the name. > If you want to filter on name and type, you must specify the name and > type. I don't understand what you're saying here. Surely when I specify a name as the value of a property, the match is done using the expected type of the property as well as the name value I've specified. To tie this to the state quarters example, now that I've created an object to represent the Delaware state quarter, I can write a read query like this: { "type": "/user/docs/default_domain/us_state_quarter", "state":"Delaware", "mintage":null } This query works. Here I can identify the US State of Delaware by name. But I can't do the same in a write query. This query fails: { "create":"unless_exists", "type": "/user/docs/default_domain/us_state_quarter", "state":"Washington" } It fails because it can find more than one object with name "Washington", even though only one of those objects is a possible value of the state property. The other curious thing that I found is that the problem goes away if the state quarter object already exists--in that case it doesn't have problems with too many matches. So I'm wondering if the behavior I'm seeing has to do with the fact that the Washington state quarter doesn't exist. Since there is no state quarter instance to have a state property, maybe it doesn't look at the expected type of that property? David > > It is also worth noting that, as per Bryan Cheung?s post to the data > modeling list, cities and towns are now given their simple names > (?Delaware?) rather than their formerly disambiguated names (?Delaware, > Ohio?). > > ~Chris From brendan at metaweb.com Fri Apr 4 22:15:36 2008 From: brendan at metaweb.com (brendan) Date: Fri, 4 Apr 2008 15:15:36 -0700 Subject: [Developers] A reminder: /location/mailing_address schema has changed... In-Reply-To: <9BDF780D-4831-41AA-B995-DA9ADDBC024A@metaweb.com> References: <9BDF780D-4831-41AA-B995-DA9ADDBC024A@metaweb.com> Message-ID: <4EA53688-DAAF-4675-9E60-26091BFBA02E@metaweb.com> I understand that some data "gardening" has just completed. 1. U.S. cities used to include the state in their name (e.g. Oakland, California), no longer. e.g Oakland is named "Oakland" with an alias of "Oakland, California". 2. mailing addresses which referenced U.S. cities were updated: if the city was defined and the "State" field was empty, the "State" field got filled in with the appropriate state whenever possible. Anyone with an app that uses addresses (like a mapping mashup) would be wise to to look at the "/location/mailing_address" schema and some of your sample data to determine whether any code refactoring is required. I've spot checked a few mailing addresses and cities and things look good, but if you see anything unusual, let me know. Brendan On Mar 26, 2008, at 11:59 AM, brendan wrote: > I post this as a user, because I noticed archiportal had some > breakage today after the new freebase release went out. If folks on > the dev/data team want to pitch in more info, please do. > > 1. the property /location/mailing_address/street_address_2 is now > hidden in the UI. The UI now allows the user to create multiple > values for the "street_address" property, instead. > > so... WARNING: if you have queries that ask for "/location/ > mailing_address/street_address" : null > > prepare for breakage because users are now creating multiple values > of street_address through the UI: you must use [] instead of null. > > 2. something less urgent: note that mailing_address now has > properties for state and country. As an example, archiportal just > asks for the citytown property and passes that and the street > address up to the google api to get coordinates. That works > because cities are named with the state they are in, for U.S. cities > anyhow (e.g. "Oakland, California"). I'm not sure what the data > team's plan is for this but eventually, the city names will change > and you will have to query out the citytown and the state (and > perhaps country) in order to have a fully qualified address. > > Question for someone on the data team? When you denude city names > of the state info, would you please go through all mailing addresses > to make sure that the state that the city belongs to is filled in > (where it's known of course)? > > When does the data team plan on doing that? > > thanks, > > Brendan > > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20080404/3acddf2f/attachment.htm From bryan.cheung at metaweb.com Fri Apr 4 22:42:25 2008 From: bryan.cheung at metaweb.com (Bryan Cheung) Date: Fri, 4 Apr 2008 15:42:25 -0700 Subject: [Developers] A reminder: /location/mailing_address schema has changed... In-Reply-To: <4EA53688-DAAF-4675-9E60-26091BFBA02E@metaweb.com> References: <9BDF780D-4831-41AA-B995-DA9ADDBC024A@metaweb.com> <4EA53688-DAAF-4675-9E60-26091BFBA02E@metaweb.com> Message-ID: Just wanted to add that the "gardening" was for US locations initially - we're working on the international locations next. Bryan On Apr 4, 2008, at 3:15 PM, brendan wrote: > > I understand that some data "gardening" has just completed. > > 1. U.S. cities used to include the state in their name (e.g. > Oakland, California), no longer. e.g Oakland is named "Oakland" > with an alias of "Oakland, California". > > 2. mailing addresses which referenced U.S. cities were updated: if > the city was defined and the "State" field was empty, the "State" > field got filled in with the appropriate state whenever possible. > > Anyone with an app that uses addresses (like a mapping mashup) would > be wise to to look at the "/location/mailing_address" schema and > some of your sample data to determine whether any code refactoring > is required. > > I've spot checked a few mailing addresses and cities and things look > good, but if you see anything unusual, let me know. > > Brendan > > On Mar 26, 2008, at 11:59 AM, brendan wrote: > >> I post this as a user, because I noticed archiportal had some >> breakage today after the new freebase release went out. If folks >> on the dev/data team want to pitch in more info, please do. >> >> 1. the property /location/mailing_address/street_address_2 is now >> hidden in the UI. The UI now allows the user to create multiple >> values for the "street_address" property, instead. >> >> so... WARNING: if you have queries that ask for "/location/ >> mailing_address/street_address" : null >> >> prepare for breakage because users are now creating multiple values >> of street_address through the UI: you must use [] instead of null. >> >> 2. something less urgent: note that mailing_address now has >> properties for state and country. As an example, archiportal just >> asks for the citytown property and passes that and the street >> address up to the google api to get coordinates. That works >> because cities are named with the state they are in, for U.S. >> cities anyhow (e.g. "Oakland, California"). I'm not sure what the >> data team's plan is for this but eventually, the city names will >> change and you will have to query out the citytown and the state >> (and perhaps country) in order to have a fully qualified address. >> >> Question for someone on the data team? When you denude city names >> of the state info, would you please go through all mailing >> addresses to make sure that the state that the city belongs to is >> filled in (where it's known of course)? >> >> When does the data team plan on doing that? >> >> thanks, >> >> Brendan >> >> >> _______________________________________________ >> Developers mailing list >> Developers at freebase.com >> http://lists.freebase.com/mailman/listinfo/developers > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20080404/45df6241/attachment.htm From robert at metaweb.com Fri Apr 4 23:01:35 2008 From: robert at metaweb.com (Robert Cook) Date: Fri, 4 Apr 2008 16:01:35 -0700 Subject: [Developers] Domain and type viewer Message-ID: <53A00C34-A90E-40CD-BFEC-6B5FA3C0CB5C@metaweb.com> Last year, I wrote a MJT app (with some help from Nix and Nick) to view domains and types that allowed me to quickly jump around the domain/type hierarchy. It may be helpful if you are doing data modeling or application development and you want quick access to type and property keys. http://mjtemplate.org/examples/schemas/ http://www.freebase.com/view/guid/9202a8c04000641f8000000004207086 R From jg at metaweb.com Fri Apr 4 23:19:18 2008 From: jg at metaweb.com (John Giannandrea) Date: Fri, 4 Apr 2008 16:19:18 -0700 Subject: [Developers] State Quarters example and "need a unique result to attach here" In-Reply-To: <47F69BA9.9000507@davidflanagan.com> References: <47F69202.7000304@davidflanagan.com> <47F69690.8090909@metaweb.com> <47F69BA9.9000507@davidflanagan.com> Message-ID: David Flanagan wrote: > I understand that, but in this case (and as you point out), a US state > is uniquely identified by its name and its type. I'm wondering why, > therefore, the expected type of the state property plus the name of > the > state isn't sufficient to identify the state object I want. (And > why is > it confused about a city named Delaware?) Hi David. The type and name should be sufficient in this case. Ids are great if you have the, but the requirement is just that you define a unique thing in the clause (i.e. that if you did a MQL read with that clause that you would get exactly one id back). Your original question I think was why is the type not implicit? The reason is that MQL doesn't enforce any types. There is no requirement that the thing connected by the 'state' property be a state. i.e. in freebase the type system is not normative. Its perfectly OK to put a person in that clause, should that make sense to you. The rationale for doing this is the requirement of schema migration. We have a "loose" typing system. What started out as a set of us_state types might end up as a set of us_regions_area types (example contrived) and while the expected type of the property would change (ECT) there is no requirement that all the data would be brought into line immediately or in fact ever. What is true is that the object would still remain the thing we call Delaware, no matter what happened to the schema over time. The expected type is just that, only an expectation of what kind of thing is to be found in that clause. This also explains why when you write something in a subclause you have to specify the type also, you might think that MQL could do it for you (and perhaps it should). And as to your second question: > 3) Why isn't connect:insert or connect:update required here? because you are doing a create at the top level, the connect is implicit. I agree that the semantics of MQL write are subtle (to put it politely). Im happy to work with you offline to explore the darker corners. -jg From tim at metaweb.com Fri Apr 4 23:25:00 2008 From: tim at metaweb.com (Tim Kientzle) Date: Fri, 4 Apr 2008 16:25:00 -0700 Subject: [Developers] Questions about the login service In-Reply-To: <47F67233.1000304@davidflanagan.com> References: <47F67233.1000304@davidflanagan.com> Message-ID: <7224284A-00AD-4A63-9F40-409EE5F881E3@metaweb.com> David, 1. Yes, it does work with GET and yes that is stable. We recommend using POST---especially for browser-based applications---but recognize that GET is often a great simplification for script authors. 2. The metaweb-user cookie is currently the only one that must be preserved. I do not expect that to ever change. 3. There are plans to make the login service support https but there aren't any immediate plans to support https for other services. We will soon start enforcing a limited lifetime (probably on the order of days) on cookies so that cookies aren't quite the same as passwords. (This lifetime would be enforced at the server, of course.) Cheers, Tim Kientzle On Apr 4, 2008, at 11:23 AM, David Flanagan wrote: > Hi, > > Before I start asking too many more questions, I should introduce > myself: I'm the original author of the MQL documentation at > http://www.freebase.com/view/en/documentation, and I'm now working to > bring it up to date. So I'll probably be posting a number of > questions > here... > > Today, I'm wondering about the login service. > > 1) I original documented it as POST only, but now it works with GET as > well. Is that stable? Can I document it? > > 2) In my documentation I do some hand-waving about which of the > cookies > returned by login is necessary for services that require login, and I > just say that you have to pass all cookies returned by login to the > services that expect cookies. I'd guess that that is no longer the > case. Is it okay to just pass the metaweb-user cookie? Or is the > metaweb-user-info cookie the correct one? > > 3) Are there plans to make the login service support https? And if > so, > will the mqlwrite and upload services also support https? Otherwise > passwords and cookies (which are almost as good as cookies) are being > passed around as cleartext, which means that there aren't any really > strong guarantees against freebase identity theft. > > Thanks! > > David Flanagan > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers From david at davidflanagan.com Fri Apr 4 23:37:04 2008 From: david at davidflanagan.com (David Flanagan) Date: Fri, 04 Apr 2008 16:37:04 -0700 Subject: [Developers] State Quarters example and "need a unique result to attach here" In-Reply-To: References: <47F69202.7000304@davidflanagan.com> <47F69690.8090909@metaweb.com> <47F69BA9.9000507@davidflanagan.com> Message-ID: <47F6BBA0.1050604@davidflanagan.com> John Giannandrea wrote: > David Flanagan wrote: >> I understand that, but in this case (and as you point out), a US state >> is uniquely identified by its name and its type. I'm wondering why, >> therefore, the expected type of the state property plus the name of >> the >> state isn't sufficient to identify the state object I want. (And >> why is >> it confused about a city named Delaware?) > > Your original question I think was why is the type not implicit? > > The reason is that MQL doesn't enforce any types. > There is no requirement that the thing connected by the 'state' > property be a state. i.e. in freebase the type system is not normative. > Its perfectly OK to put a person in that clause, should that make > sense to you. > Thanks, jg, I think this was the the key thing I wasn't understanding. David From david at davidflanagan.com Fri Apr 4 23:39:33 2008 From: david at davidflanagan.com (David Flanagan) Date: Fri, 04 Apr 2008 16:39:33 -0700 Subject: [Developers] Questions about the login service In-Reply-To: <7224284A-00AD-4A63-9F40-409EE5F881E3@metaweb.com> References: <47F67233.1000304@davidflanagan.com> <7224284A-00AD-4A63-9F40-409EE5F881E3@metaweb.com> Message-ID: <47F6BC35.9070908@davidflanagan.com> Tim Kientzle wrote: > David, > > 1. Yes, it does work with GET and yes that is stable. We recommend > using POST---especially for browser-based applications---but recognize > that GET is often a great simplification for script authors. > > 2. The metaweb-user cookie is currently the only one that must be > preserved. I do not expect that to ever change. > > 3. There are plans to make the login service support https but there > aren't any immediate plans to support https for other services. We > will soon start enforcing a limited lifetime (probably on the order of > days) on cookies so that cookies aren't quite the same as passwords. > (This lifetime would be enforced at the server, of course.) > > Cheers, > > Tim Kientzle > Thanks, Tim. For #3, will you allow the user logging in to specify a lifetime for the cookies? If I'm writing a script that is only going to make one call to mqlwrite, it might be nice to be able to use cookies that are only valid for a few seconds... David From jg at metaweb.com Fri Apr 4 23:57:27 2008 From: jg at metaweb.com (John Giannandrea) Date: Fri, 4 Apr 2008 16:57:27 -0700 Subject: [Developers] State Quarters example and "need a unique result to attach here" In-Reply-To: <47F6A80A.2050405@davidflanagan.com> References: <47F69202.7000304@davidflanagan.com> <47F69690.8090909@metaweb.com> <47F69BA9.9000507@davidflanagan.com> <47F69E4B.7080100@metaweb.com> <47F6A80A.2050405@davidflanagan.com> Message-ID: <57F6D7B6-911C-4370-89B6-0F32E522AAFA@metaweb.com> David Flanagan wrote: > The other curious thing that I found is that the problem goes away if > the state quarter object already exists--in that case it doesn't have > problems with too many matches. The reason you find an unambiguous match when it exists, or when doing a MQL read, is that you are providing one more piece of disambiguation: the enclosing object. You are asking to find a thing called Delaware that is attached via that property and we find only one. When doing the write for the first time, the new clause has to be identified globally (because you are attaching it, not creating a new one) and that is very similar to a toplevel query and more likely to find duplicates based only on name. -jg From tim at metaweb.com Sat Apr 5 01:19:50 2008 From: tim at metaweb.com (Tim Kientzle) Date: Fri, 4 Apr 2008 18:19:50 -0700 Subject: [Developers] Questions about the login service In-Reply-To: <47F6BC35.9070908@davidflanagan.com> References: <47F67233.1000304@davidflanagan.com> <7224284A-00AD-4A63-9F40-409EE5F881E3@metaweb.com> <47F6BC35.9070908@davidflanagan.com> Message-ID: <2B82EE03-194D-4078-A1C1-1F1023988E9B@metaweb.com> On Apr 4, 2008, at 4:39 PM, David Flanagan wrote: > .... will you allow the user logging in to specify a > lifetime for the cookies? I hadn't thought about it, but that's a good idea. I'll keep that in mind. TBKK From alecf at metaweb.com Tue Apr 8 16:46:30 2008 From: alecf at metaweb.com (Alec Flett) Date: Tue, 8 Apr 2008 09:46:30 -0700 Subject: [Developers] Changing "/topic/en" to "/en".. maybe In-Reply-To: <1B1F1874-4BD5-420E-B1C4-4D01B8F9F3EC@metaweb.com> References: <682DBCF4-597E-4276-90F3-D68B5042698D@metaweb.com> <26EEBCD4-D648-459A-AE06-6DDBB481484C@metaweb.com> <1B1F1874-4BD5-420E-B1C4-4D01B8F9F3EC@metaweb.com> Message-ID: <42AFC501-9D73-4DAD-A95D-99D677357BF6@metaweb.com> Current state of the graph on this issue: - /en now exists, and will start showing up in urls directly (such as http://www.freebase.com/view/history/en/cities_and_knights_of_catan) - Software will be deployed next week (4/15 or so) that will make MQL default to returning "/en" - in MQL today, the default is still /topic/en. That is, this query: { "guid" : "#9202a8c04000641f8000000000013ec3", "id" : null } still returns this: { "guid" : "#9202a8c04000641f8000000000013ec3", "id" : "/topic/en/cities_and_knights_of_catan" } Next week, this will return "/en/cities_and_knights_of_catan" But today, this query will succeed as well, using the new ids: { "guid" : null, "id" : "/en/cities_and_knights_of_catan" } returning this: { "guid" : "#9202a8c04000641f8000000000013ec3", "id" : "/en/cities_and_knights_of_catan" } Alec On Mar 27, 2008, at 12:39 PM, Alec Flett wrote: > A followup: I've gotten some feedback about removing "/topic/en" > entirely, and it sounds like lots of people would object here. So > we'll leave /topic/en in the in perpetuity, though we will start > returning "/en" keys starting around April 7th. > > Alec > > > On Mar 26, 2008, at 5:26 PM, Alec Flett wrote: > >> As there has been no objection to this, I'd like to go forward. The >> schedule will look like this: >> >> 3/27 (thursday) - In sandbox, I'll add the /en namespace to point to >> stuff in /topic/en. >> 3/31 (monday) - I'll make the same change in production >> Some (to be announced) date around 4/7: we'll update the code to >> always return /en/topic_name >> 4/30, we'll remove the /topic/en namespace from the graph. >> >> This means you'll be able to start using /en/ starting >> 3/27 on sandbox, and 3/31 on OTG. >> >> Alec >> >> On Mar 19, 2008, at 1:37 PM, Alec Flett wrote: >> >>> Hey everyone - >>> So there has been some discussion internally about shortening the "/ >>> topic/en" namespace down to just "/en". This is something that is >>> being tossed around inside metaweb and I wanted to open up the >>> discussion to the larger community to check the feasibility of this. >>> To be clear, this is a one-time change while we're still in alpha. >>> We >>> really, really don't expect to do another system-wide change like >>> this, especially once we're out of alpha. >>> >>> The primary motivations are: >>> 1) /topic seems superfluous, and in general adds heirarchy where >>> there >>> doesn't need to be.. it makes english names appear sooner in the id, >>> which is nice for readability. We don't think there will ever be an >>> actually domain "/en", "/fr" or whatever. >>> >>> 2) shortening urls - both at freebase and on anyone else using topic >>> names in their URLs. In particular, it makes anyone who inserts ids >>> into their urls have a more readable url. >>> >>> If we decide to do this, here is what would probably happen - >>> feedback >>> is encouraged! >>> 1) MQL would start returning "/en/topic_name" instead of "/topic/en/ >>> topic_name" in queries where you say "id": null, such as: >>> {"name": "Bob Dylan", >>> "type": "/music/artist", >>> "id": null} >>> >>> (this would return "/en/bob_dylan") >>> >>> 2) MQL would continue to accept "/topic/en/bob_dylan" as a valid id >>> for some period of time (a week? a month? 3 months? that's something >>> we all need to decide) >>> >>> 3) During the time that the /topic/en compatibility exists, MQL >>> would >>> also return "/topic/en/topic_name" when the /topic id is explicitly >>> specified in the query: >>> >>> {"id": "/topic/en/bob_dylan", "name": null} >>> >>> would return >>> {"id": "/topic/en/bob_dylan", "name": "Bob Dylan"} >>> >>> 4) Anyone can continue to link to http://www.freebase.com/view >>> using either /topic/en/topic_name or /en/topic_name, but freebase >>> would do a HTTP 301 redirect to http://www.freebase.com/view/en/topic_name >>> . We'll probably support the /view/topic URL mapping forever. >>> >>> But of course the issue is: what will break? The big issue is >>> obviously if people are storing freebase keys in their databases, >>> and >>> migration during a compatibility period is impossible. >>> >>> Please reply on this thread with your concerns/issues or even if you >>> just think this is an awesome idea :) >>> >>> Alec >>> >>> >>> >>> _______________________________________________ >>> Developers mailing list >>> Developers at freebase.com >>> http://lists.freebase.com/mailman/listinfo/developers >> >> _______________________________________________ >> Developers mailing list >> Developers at freebase.com >> http://lists.freebase.com/mailman/listinfo/developers > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers From kirrily at metaweb.com Tue Apr 8 18:39:01 2008 From: kirrily at metaweb.com (Kirrily Robert) Date: Tue, 8 Apr 2008 14:39:01 -0400 (EDT) Subject: [Developers] User group reminder, April 16th Message-ID: <17967371.125541207679941003.JavaMail.root@h00215> Just wanted to remind everyone that next Wednesday, April 16th, we'll be having a Freebase user group meeting here in San Francisco. I've got a list of talks up on the blog at http://blog.freebase.com/2008/04/03/freebase-user-group-meeting-reminder-april-16th/ though this is still subject to change (and if anyone would like to request or suggest talks, please let me know!) If you'd like to come along, please RSVP at http://upcoming.yahoo.com/event/434635/ K. -- Kirrily Robert Freebase Community Director kirrily at metaweb.com From jeff at metaweb.com Tue Apr 8 23:11:40 2008 From: jeff at metaweb.com (Jeff Prucher) Date: Tue, 8 Apr 2008 16:11:40 -0700 Subject: [Developers] Awards refactoring Message-ID: <002701c899cd$e73e62f0$bc01a8c0@p4> I'm cross-posting to the developers list because this proposal touches on the type keys in the awards domain, which might affect developers. There is a problem in the current awards schema. There is no way to group categories of awards together under the same general award. For example, there are topics for every Academy Award category (best picture, best original screenplay, etc.) of type "award", but there is no way to assert that all these awards are the same sort of award. So if you want to know which picture has won the most Academy Awards, you have to query against every academy award topic, do some kind of string matching against the topic name, or go by the awarding organization. (This last one wouldn't work, actually -- different Nobels are technically awarded by different groups, and some organizations sponsor multiple awards.) So I'm proposing (well, this was Faye's idea, really) that we add a new type that will connect to both "award" and "award presenting organization". This would ordinarily be a very simple thing to do. The problem is with the nomenclature. From a practical standpoint, the new type (i.e., for the general "Academy Award") should be called simply "award", and the old type (i.e., for the specific category, "Academy Award for Best Foo") should be renamed "award category". I'm pretty satisfied with making that change, but I'd like to hear other suggestions. My main concern with the naming I'm proposing is that the type keys might be a problem. The type "award category" (formerly known as "award") has a key of /award/award. The new type "award" can't use that, since keys are unique, so it would have to have some weirdly-named key. This is doable, just inelegant and probably confusing to anyone who tries to write queries using the keys. The alternative would be to move the /award/award key to the new "award" and create a new key for "award category", but this would completely break any code that uses this schema, which is not something I'm too keen on doing. The Academy Awards (type = award): http://sandbox.freebase.com/view/en/academy_awards Academy Award for Best Director (type = award category): http://sandbox.freebase.com/view/en/academy_award_for_best_director The Academy of Motion Picture Arts & Sciences (type= award presenting organization) http://sandbox.freebase.com/view/en/academy_of_motion_picture_arts_and_scien ces Thoughts on how best to proceed? Jeff Prucher Type Librarian & Ontologist Metaweb Technologies, Inc. From faye at metaweb.com Wed Apr 9 00:56:09 2008 From: faye at metaweb.com (Faye Li) Date: Tue, 08 Apr 2008 17:56:09 -0700 Subject: [Developers] [Data-modeling] Awards refactoring In-Reply-To: <002701c899cd$e73e62f0$bc01a8c0@p4> References: <002701c899cd$e73e62f0$bc01a8c0@p4> Message-ID: <47FC1429.6050904@metaweb.com> Jeff - I can't believe you remember my suggesting this -- but that's great! :) In general I agree with you that type key changes should be avoided and any change should be made backward-compatible. The exception I'm evidently more open to, is when keeping the same key in the interest of backward compatibility unintentionally but unabashedly causes forward confusion. I can just imagine future discussion threads from users puzzled over the fact that the "Award" Type has the key "/award/" while "Award Category" has the key "/award/award", and then some old-timer from the community will have to explain, sheepishly, the "legacy" schema and backward-compatibility policy that together produced this awkward design. So my practical question is, hypothetically, if the type key were to be changed to a more logical name, would that break anyone's code? Please speak up if this would affect you. I see a trade-off between supporting our current community now and avoiding confusing future users (which dare I say number much higher than they do now...), and I think to evaluate that, the missing piece of information of actual impact of a key change must be known. -- Faye Jeff Prucher wrote: > I'm cross-posting to the developers list because this proposal touches on > the type keys in the awards domain, which might affect developers. > > There is a problem in the current awards schema. There is no way to group > categories of awards together under the same general award. For example, > there are topics for every Academy Award category (best picture, best > original screenplay, etc.) of type "award", but there is no way to assert > that all these awards are the same sort of award. So if you want to know > which picture has won the most Academy Awards, you have to query against > every academy award topic, do some kind of string matching against the topic > name, or go by the awarding organization. (This last one wouldn't work, > actually -- different Nobels are technically awarded by different groups, > and some organizations sponsor multiple awards.) > > So I'm proposing (well, this was Faye's idea, really) that we add a new type > that will connect to both "award" and "award presenting organization". This > would ordinarily be a very simple thing to do. The problem is with the > nomenclature. From a practical standpoint, the new type (i.e., for the > general "Academy Award") should be called simply "award", and the old type > (i.e., for the specific category, "Academy Award for Best Foo") should be > renamed "award category". I'm pretty satisfied with making that change, but > I'd like to hear other suggestions. > > My main concern with the naming I'm proposing is that the type keys might be > a problem. The type "award category" (formerly known as "award") has a key > of /award/award. The new type "award" can't use that, since keys are unique, > so it would have to have some weirdly-named key. This is doable, just > inelegant and probably confusing to anyone who tries to write queries using > the keys. The alternative would be to move the /award/award key to the new > "award" and create a new key for "award category", but this would completely > break any code that uses this schema, which is not something I'm too keen on > doing. > > The Academy Awards (type = award): > http://sandbox.freebase.com/view/en/academy_awards > > Academy Award for Best Director (type = award category): > http://sandbox.freebase.com/view/en/academy_award_for_best_director > > The Academy of Motion Picture Arts & Sciences (type= award presenting > organization) > http://sandbox.freebase.com/view/en/academy_of_motion_picture_arts_and_scien > ces > > Thoughts on how best to proceed? > > Jeff Prucher > Type Librarian & Ontologist > Metaweb Technologies, Inc. > > > _______________________________________________ > Data-modeling mailing list > Data-modeling at freebase.com > http://lists.freebase.com/mailman/listinfo/data-modeling > > From jlowe at giswebsite.com Wed Apr 9 09:43:06 2008 From: jlowe at giswebsite.com (Jonathan W. Lowe) Date: Wed, 09 Apr 2008 10:43:06 +0100 Subject: [Developers] Transient error? In-Reply-To: <9BDF780D-4831-41AA-B995-DA9ADDBC024A@metaweb.com> References: <9BDF780D-4831-41AA-B995-DA9ADDBC024A@metaweb.com> Message-ID: <1207734186.4689.4.camel@localhost.localdomain> FYI to Metaweb infrastructure folks: The Sandbox has been returning variations on the following theme for the past ~36 hours whenever I attempt to log in: ERROR Transient error. cache;cache01.sandbox.sfo1:8101;2008-04-09T09:34:35Z;0004 Generated Wed, 09 Apr 2008 09:35:05 GMT by cache01.sandbox.sfo1.metaweb.com (squid/2.6.STABLE18) [X-Metaweb-TID: cache;cache01.sandbox.sfo1:8101;2008-04-09T09:34:35Z;0004] No idea whether it's specific to my login or more systemic, so am reporting to the list. Possibly triggered by the most recent sandbox refresh? Thanks, Jonathan From tyler at metaweb.com Wed Apr 9 15:41:20 2008 From: tyler at metaweb.com (Tyler Pirtle) Date: Wed, 09 Apr 2008 08:41:20 -0700 Subject: [Developers] Transient error? In-Reply-To: <1207734186.4689.4.camel@localhost.localdomain> References: <9BDF780D-4831-41AA-B995-DA9ADDBC024A@metaweb.com> <1207734186.4689.4.camel@localhost.localdomain> Message-ID: <47FCE3A0.9050408@metaweb.com> Jonathan, You're intuition is correct, these transient errors are in fact caused by sandbox refreshes. For now, until we fix this, you can relieve this symptom yourself by clearing the cookie you have associated with 'sandbox.freebase.com'. Sorry, I know it's troublesome. Let me know if you have any more problems, Tyler (PS - Thanks for the TID! and a note to anyone else with any problems, including a TID with your question dramatically helps me find out what exactly your problems are - and to those of you who have no idea what I'm talking about, it's a HTTP header called 'X-Metaweb-TID' that gets returned with every HTTP request you make to freebase.com). Jonathan W. Lowe wrote: > FYI to Metaweb infrastructure folks: > > The Sandbox has been returning variations on the following theme for the > past ~36 hours whenever I attempt to log in: > > ERROR > > Transient error. > cache;cache01.sandbox.sfo1:8101;2008-04-09T09:34:35Z;0004 > Generated Wed, 09 Apr 2008 09:35:05 GMT by > cache01.sandbox.sfo1.metaweb.com (squid/2.6.STABLE18) > > [X-Metaweb-TID: > cache;cache01.sandbox.sfo1:8101;2008-04-09T09:34:35Z;0004] > > No idea whether it's specific to my login or more systemic, so am > reporting to the list. > > Possibly triggered by the most recent sandbox refresh? > > Thanks, > Jonathan > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers From kirrily at metaweb.com Thu Apr 10 01:21:10 2008 From: kirrily at metaweb.com (Kirrily Robert) Date: Wed, 9 Apr 2008 21:21:10 -0400 (EDT) Subject: [Developers] Graphd, the Freebase backend Message-ID: <4036166.134191207790470713.JavaMail.root@h00215> I know a lot of people are interested to know about the backend that Freebase runs on. Scott Meyer, one of our graph developers, has just written a long post about "graphd", the Freebase backend, and it's been posted on our blog at http://blog.freebase.com/2008/04/09/a-brief-tour-of-graphd/ K. -- Kirrily Robert Freebase Community Director kirrily at metaweb.com From willmoffat at metaweb.com Mon Apr 14 21:29:08 2008 From: willmoffat at metaweb.com (Will Moffat) Date: Mon, 14 Apr 2008 14:29:08 -0700 Subject: [Developers] User group reminder, April 16th In-Reply-To: <17967371.125541207679941003.JavaMail.root@h00215> References: <17967371.125541207679941003.JavaMail.root@h00215> Message-ID: <6EA6B57A-5F1E-42BE-995F-5B291F737879@metaweb.com> Hello, Tomorrow night I'll be previewing Acre at our Freebase User Group meeting. Acre is a server-side javascript environment hosted by Metaweb that lets you construct your own views of Freebase data. This is cool because you can embed these views as a simple IFRAME anywhere on the web - your users don't need Javascript enabled. You could also create custom RSS feeds or prototype new Freebase services. Acre isn't quite production-ready but if you come along tomorrow night then you'll get a taste of what's possible. Sign up here: http://upcoming.yahoo.com/event/434635/ regards, --Will Will Moffat Freebase hacker at large From robert at metaweb.com Mon Apr 14 21:32:35 2008 From: robert at metaweb.com (Robert Cook) Date: Mon, 14 Apr 2008 14:32:35 -0700 Subject: [Developers] User group reminder, April 16th In-Reply-To: <6EA6B57A-5F1E-42BE-995F-5B291F737879@metaweb.com> References: <17967371.125541207679941003.JavaMail.root@h00215> <6EA6B57A-5F1E-42BE-995F-5B291F737879@metaweb.com> Message-ID: To be clear: the meeting is on Wednesday evening at 6:30PM, not tomorrow night. R On Apr 14, 2008, at 2:29 PM, Will Moffat wrote: > Hello, > > Tomorrow night I'll be previewing Acre at our Freebase User Group > meeting. > > Acre is a server-side javascript environment hosted by Metaweb that > lets you construct your own views of Freebase data. > > This is cool because you can embed these views as a simple IFRAME > anywhere on the web - your users don't need Javascript enabled. You > could also create custom RSS feeds or prototype new Freebase services. > > Acre isn't quite production-ready but if you come along tomorrow night > then you'll get a taste of what's possible. > Sign up here: http://upcoming.yahoo.com/event/434635/ > > regards, > --Will > > Will Moffat > Freebase hacker at large > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers From jeff at metaweb.com Tue Apr 15 00:09:51 2008 From: jeff at metaweb.com (Jeff Prucher) Date: Mon, 14 Apr 2008 17:09:51 -0700 Subject: [Developers] [Data-modeling] Awards refactoring In-Reply-To: <47FC1429.6050904@metaweb.com> Message-ID: <004101c89e8d$06652b50$bc01a8c0@p4> Since I haven't heard any objections to this, I'm going to go ahead and make these changes (rename "award" to "award category", add a new type "award", and switch the keys around) on Thursday of this week (4/17). Please jump up and down and shout loudly if this will break any code that you're using. Thanks, Jeff Prucher > -----Original Message----- > From: developers-bounces at freebase.com > [mailto:developers-bounces at freebase.com] On Behalf Of Faye Li > Sent: Tuesday, April 08, 2008 5:56 PM > To: Freebase data modeling mailing list > Cc: 'For discussions about MQL,Freebase API and apps built on > Freebase' > Subject: Re: [Developers] [Data-modeling] Awards refactoring > > Jeff - I can't believe you remember my suggesting this -- but > that's great! :) > > In general I agree with you that type key changes should be > avoided and any change should be made backward-compatible. > The exception I'm evidently more open to, is when keeping the > same key in the interest of backward compatibility > unintentionally but unabashedly causes forward confusion. I > can just imagine future discussion threads from users puzzled > over the fact that the "Award" Type has the key > "/award/" while "Award Category" > has the key "/award/award", and then some old-timer from the > community will have to explain, sheepishly, the "legacy" > schema and backward-compatibility policy that together > produced this awkward design. > > So my practical question is, hypothetically, if the type key > were to be changed to a more logical name, would that break > anyone's code? Please speak up if this would affect you. I > see a trade-off between supporting our current community now > and avoiding confusing future users (which dare I say number > much higher than they do now...), and I think to evaluate > that, the missing piece of information of actual impact of a > key change must be known. > > -- Faye > > > Jeff Prucher wrote: > > I'm cross-posting to the developers list because this > proposal touches > > on the type keys in the awards domain, which might affect > developers. > > > > There is a problem in the current awards schema. There is no way to > > group categories of awards together under the same general > award. For > > example, there are topics for every Academy Award category (best > > picture, best original screenplay, etc.) of type "award", > but there is > > no way to assert that all these awards are the same sort of > award. So > > if you want to know which picture has won the most Academy > Awards, you > > have to query against every academy award topic, do some kind of > > string matching against the topic name, or go by the awarding > > organization. (This last one wouldn't work, actually -- different > > Nobels are technically awarded by different groups, and some > > organizations sponsor multiple awards.) > > > > So I'm proposing (well, this was Faye's idea, really) that we add a > > new type that will connect to both "award" and "award presenting > > organization". This would ordinarily be a very simple thing > to do. The > > problem is with the nomenclature. From a practical > standpoint, the new > > type (i.e., for the general "Academy Award") should be > called simply > > "award", and the old type (i.e., for the specific category, > "Academy > > Award for Best Foo") should be renamed "award category". I'm pretty > > satisfied with making that change, but I'd like to hear > other suggestions. > > > > My main concern with the naming I'm proposing is that the type keys > > might be a problem. The type "award category" (formerly known as > > "award") has a key of /award/award. The new type "award" can't use > > that, since keys are unique, so it would have to have some > > weirdly-named key. This is doable, just inelegant and probably > > confusing to anyone who tries to write queries using the keys. The > > alternative would be to move the /award/award key to the > new "award" > > and create a new key for "award category", but this would > completely > > break any code that uses this schema, which is not > something I'm too keen on doing. > > > > The Academy Awards (type = award): > > http://sandbox.freebase.com/view/en/academy_awards > > > > Academy Award for Best Director (type = award category): > > http://sandbox.freebase.com/view/en/academy_award_for_best_director > > > > The Academy of Motion Picture Arts & Sciences (type= award > presenting > > organization) > > > http://sandbox.freebase.com/view/en/academy_of_motion_picture_arts_and > > _scien > > ces > > > > Thoughts on how best to proceed? > > > > Jeff Prucher > > Type Librarian & Ontologist > > Metaweb Technologies, Inc. > > > > > > _______________________________________________ > > Data-modeling mailing list > > Data-modeling at freebase.com > > http://lists.freebase.com/mailman/listinfo/data-modeling > > > > > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers > From kendra.kuhl at juggle.com Tue Apr 15 14:24:52 2008 From: kendra.kuhl at juggle.com (Kendra Kuhl) Date: Tue, 15 Apr 2008 09:24:52 -0500 Subject: [Developers] Freebase WEX Data Message-ID: <4804bb01.3bf5220a.29ac.ffffee59@mx.google.com> I'm hoping somebody can help me or point me in the right direction. I'm trying to put the Wikipedia article back together using XSLT. In trying to figure out what to do with the templates, it seemed to me that data is missing from the template article that allows me to do that. For example (also see below) in trying to reconstruct the dmoz template, I would go to the Template:Dmoz article, get the wiki markup for the template and use the data from the article with the template. The WEX dumps Template:DMOZ article doesn't contain template data. The same for the Template:Doctor_Who_RG article. The Dr. Who article contains more of the template information, but still not enough to create the template on the article side. Information I expect to be in the Template:Dmoz article: {{Pp-semi-protected|small=yes}}{ {#switch: {{{3|}}} |#default=[http://www.dmoz.org/{{{1}}}/ {{{2|{{PAGENAME}}}}}] at the [[Open Directory Project]] |user=[http://www.dmoz.org/profiles/{{{1}}}.html {{{2|{{PAGENAME}}}}}] at the [[Open Directory Project]] }}{{Documentation}} Information showing in the Template:Dmoz article in the WEX dump:
This is what I see as missing: {{#switch: {{{3|}}} |#default=[http://www.dmoz.org/{{{1}}}/ {{{2|{{PAGENAME}}}}}] at the [[Open Directory Project]] |user=[http://www.dmoz.org/profiles/{{{1}}}.html {{{2|{{PAGENAME}}}}}] at the [[Open Directory Project]] }} So my questions are these: 1. Am I missing something? Is there another spot in the WEX dump that contains the information to put the template back together again? I have looked, but nothing jumps out at me. How does Metaweb / Freebase handle it? 2. Has anybody else attempted the XSLT reconstruction of the WEX data? If so, are you willing to share? I can share what I have come up with already, but I'm pretty new to XSLT. Thanks in advance!! Kendra -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20080415/9bcfcb2e/attachment.htm From david at davidflanagan.com Tue Apr 15 20:15:58 2008 From: david at davidflanagan.com (David Flanagan) Date: Tue, 15 Apr 2008 13:15:58 -0700 Subject: [Developers] pattern-matching syntax for =~ constraint in MQL Message-ID: <48050CFE.7050105@davidflanagan.com> The * in the query below used to match a single word: [{ "type" : "/music/artist", "name" : null, "name~=" : "^The *$" }] So this query would return The Clash, but not The Mighty Mighty Bosstones. That's changed: the * now seems to match any string. Can anyone tell me if there is any new syntax to match a single word? David From david at davidflanagan.com Tue Apr 15 20:40:05 2008 From: david at davidflanagan.com (David Flanagan) Date: Tue, 15 Apr 2008 13:40:05 -0700 Subject: [Developers] pattern-matching syntax for =~ constraint in MQL In-Reply-To: <48050CFE.7050105@davidflanagan.com> References: <48050CFE.7050105@davidflanagan.com> Message-ID: <480512A5.9060006@davidflanagan.com> Answering my own question here, it appears that using * in quotes, causes it to match a single word. So the pattern I should use in my query is: "name~=": "\"^The *$\"" The pattern ^*$ matches strings that are single words. The pattern * by itself seems to match anything. I'm still not exactly sure what the matching rules are, but I can make the examples in my documentation work again. David David Flanagan wrote: > The * in the query below used to match a single word: > > [{ > "type" : "/music/artist", > "name" : null, > "name~=" : "^The *$" > }] > > So this query would return The Clash, but not The Mighty Mighty > Bosstones. That's changed: the * now seems to match any string. > > Can anyone tell me if there is any new syntax to match a single word? > > David > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers > From brendan at metaweb.com Tue Apr 15 21:31:18 2008 From: brendan at metaweb.com (brendan) Date: Tue, 15 Apr 2008 14:31:18 -0700 Subject: [Developers] /architecture schema changes Message-ID: 1. properties that should be marked unique properties /architecture/structure/height_meters /architecture/structure/construction_started (date) /architecture/structure/closed (date) /architecture/building/floors /architecture/building/floor_space_square_meters /architecture/skyscraper/height_with_antenna_spire_meters Currently, these are *not* set to be unique in the schema, which doesn't make much sense and prohibits doing a mql sort (which would be a nice thing to do) 2. to be removed /architecture/house/height_meters /architecture/building/height_meters both are functionally redundant (with /architecture/structure/ height_meters) I will make these changes pretty soon (and do some related minor data updates). I don't know of anyone who would be affected by this change. If you are chime in... thanks, Brendan From david at davidflanagan.com Tue Apr 15 23:44:30 2008 From: david at davidflanagan.com (David Flanagan) Date: Tue, 15 Apr 2008 16:44:30 -0700 Subject: [Developers] MQL index property Message-ID: <48053DDE.7030705@davidflanagan.com> In MQL I can use the index pseudo-property to sort things into their natural order. I know that this works to sort tracks on an album into the order in which they are recorded, for example. If I examine the index of albums by a band, I find that some albums have indexes and some do not. The indexes seem to correspond to release order of the albums, but I don't know if this is true in general. Can anyone provide other examples of useful orderings? Is there any programmatic way to find out what properties are ordered and what the ordering represents? Or does this simply come down to a schema documentation issue? David From alecf at metaweb.com Tue Apr 15 23:55:35 2008 From: alecf at metaweb.com (Alec Flett) Date: Tue, 15 Apr 2008 16:55:35 -0700 Subject: [Developers] MQL index property In-Reply-To: <48053DDE.7030705@davidflanagan.com> References: <48053DDE.7030705@davidflanagan.com> Message-ID: <894BDCAA-13E0-47B2-900C-509745848679@metaweb.com> On Apr 15, 2008, at 4:44 PM, David Flanagan wrote: > > Can anyone provide other examples of useful orderings? Is there any > programmatic way to find out what properties are ordered and what the > ordering represents? Or does this simply come down to a schema > documentation issue? > It's really about how it happens to be used in a particular domain - for instance the cast list of a film is typically listed with the stars of the flim first, and the minor parts last. > David > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers From crism at metaweb.com Wed Apr 16 00:10:40 2008 From: crism at metaweb.com (Christopher R. Maden) Date: Tue, 15 Apr 2008 17:10:40 -0700 Subject: [Developers] MQL index property In-Reply-To: <48053DDE.7030705@davidflanagan.com> References: <48053DDE.7030705@davidflanagan.com> Message-ID: <48054400.7060207@metaweb.com> David Flanagan wrote: > The indexes seem to correspond to release order of the albums, > but I don't know if this is true in general. What Alec said: the indices for albums are the release order only because the import script I wrote set the indices that way. The unordered albums are ones for which no release dates were known, and so no order was asserted. > Can anyone provide other examples of useful orderings? Alec mentioned movie stars. I also try to order most long lists of property values; for instance, the members of the California legislature are ordered with the current officers first, then the current members by district, then past members. > Is there any > programmatic way to find out what properties are ordered and what the > ordering represents? Or does this simply come down to a schema > documentation issue? Neither, really. Ordering is a property of data, not of schemata; any non-unique property can have its values ordered, and there is no way to require (or even request) its values to be ordered. ~Chris -- Christopher R. Maden Data Architect Metaweb Technologies, Inc. From brendan at metaweb.com Wed Apr 16 00:55:55 2008 From: brendan at metaweb.com (brendan) Date: Tue, 15 Apr 2008 17:55:55 -0700 Subject: [Developers] /architecture schema changes In-Reply-To: References: Message-ID: I just crawled for non-uniques in the data and came up with just a handful which I corrected. I found two more properties I'd like to mark unique: /architecture/structure/destruction_date /architecture/structure/construction_cost and /architecture/house/height_meters didn't actually exist, so scratch that one. I'll wait a day or two before changing the schema. This is a pretty safe change if, indeed, there were anyone out there running queries against this data. The only significant schema change is removing the building/height_meters property, but that has long been a hidden property anyhow. Brendan On Apr 15, 2008, at 2:31 PM, brendan wrote: > 1. properties that should be marked unique properties > > /architecture/structure/height_meters > /architecture/structure/construction_started (date) > /architecture/structure/closed (date) > /architecture/building/floors > /architecture/building/floor_space_square_meters > /architecture/skyscraper/height_with_antenna_spire_meters > > Currently, these are *not* set to be unique in the schema, which > doesn't make much sense and prohibits doing a mql sort (which would be > a nice thing to do) > > 2. to be removed > /architecture/house/height_meters > /architecture/building/height_meters > both are functionally redundant (with /architecture/structure/ > height_meters) > > I will make these changes pretty soon (and do some related minor data > updates). I don't know of anyone who would be affected by this change. > If you are chime in... > > thanks, > > Brendan > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers From zodiac.seven at gmail.com Wed Apr 16 15:14:36 2008 From: zodiac.seven at gmail.com (Zodiac Seven) Date: Wed, 16 Apr 2008 20:44:36 +0530 Subject: [Developers] Category list Message-ID: I'm writing a small app on FreeBase. I'm trying to build a category tree which shows the main categories (sports, arts & crafts, etc.) and lets the user drill down to additional sub categories. Is there something like this already built which I can use? I notice that I can get a list of the categories for "Sports" like this: { "query" : [ { "domains" : [ { "id" : null, "name" : null, "type" : "/type/domain" } ], "name" : "Sports", "type" : "/freebase/domain_category" } ]} but I can't figure out how to get a list of categories under "Sports/Basketball" Regards, Deepak. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20080416/9ceb0e9e/attachment.htm From kurt at metaweb.com Wed Apr 16 15:47:42 2008 From: kurt at metaweb.com (Kurt Bollacker) Date: Wed, 16 Apr 2008 15:47:42 +0000 Subject: [Developers] Category list In-Reply-To: References: Message-ID: <20080416154742.GI24554@metaweb.com> On Wed, Apr 16, 2008 at 08:44:36PM +0530, Zodiac Seven wrote: > I'm writing a small app on FreeBase. > I'm trying to build a category tree which shows the main categories (sports, > arts & crafts, etc.) and lets the user drill down to additional sub > categories. > Is there something like this already built which I can use? Something close to what you want can be found as a MJT app at: http://www.mjtemplate.org/examples/schemas/ More about MJT can be found at: http://www.mjtemplate.org/ > I notice that I can get a list of the categories for "Sports" like this: > > { "query" : [ { "domains" : [ { "id" : null, "name" : null, "type" : > "/type/domain" } ], "name" : "Sports", "type" : "/freebase/domain_category" > } ]} > > but I can't figure out how to get a list of categories under > "Sports/Basketball" The hierarchy you are looking at has this order: Domain Category Domain Type Property Your query above retrieves all of the domains in a domain category. To get the types (e.g. Basketball Team) in a domain (e.g. Basketball), you can use a similar query: { "query" : [ { "name" : "Basketball", "type" : "/type/domain", "types" : [ { "id" : null, "name" : null, "type" : "/type/type" } ] } ] } Hope this helps... Kurt :-) > Regards, > > Deepak. > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers From david at davidflanagan.com Wed Apr 16 17:23:33 2008 From: david at davidflanagan.com (David Flanagan) Date: Wed, 16 Apr 2008 10:23:33 -0700 Subject: [Developers] MQL index property In-Reply-To: <48054400.7060207@metaweb.com> References: <48053DDE.7030705@davidflanagan.com> <48054400.7060207@metaweb.com> Message-ID: <48063615.3020903@davidflanagan.com> Christopher R. Maden wrote: >> Is there any >> programmatic way to find out what properties are ordered and what the >> ordering represents? Or does this simply come down to a schema >> documentation issue? > > Neither, really. Ordering is a property of data, not of schemata; any > non-unique property can have its values ordered, and there is no way to > require (or even request) its values to be ordered. > > ~Chris If the ordering is not to be documented as part of the schema, are you suggesting, then, that users add "sort":"index" to their queries on the theory that they might be happier with the order things come out in, on the off chance that indices were added when the data was imported? Or do you mean to suggest that ordering is never going to be documented or enforced, and so "sort":"index" is unreliable and shouldn't be used? David From crism at metaweb.com Wed Apr 16 17:54:58 2008 From: crism at metaweb.com (Christopher R. Maden) Date: Wed, 16 Apr 2008 13:54:58 -0400 (EDT) Subject: [Developers] MQL index property In-Reply-To: <48063615.3020903@davidflanagan.com> Message-ID: <16678776.161131208368498295.JavaMail.root@h00215> David Flanagan wrote: > If the ordering is not to be documented as part of the schema, are you > suggesting, then, that users add "sort":"index" to their queries on the > theory that they might be happier with the order things come out in, on > the off chance that indices were added when the data was imported? > > Or do you mean to suggest that ordering is never going to be documented > or enforced, and so "sort":"index" is unreliable and shouldn't be used? I am saying that ordering is a feature of data, not of schemata. In the Freebase client, ordering is exposed when entering or editing property values; it is not mentioned at all in the schema editor. Not all index values are created by data loading scripts; I manually order data I enter when appropriate, and I am not the only one. An app writer who cares about ordering should request the index and (if allowing user edits) expose the ability to change them. Or the writer might impose an explicit sort on some other property, such as an album?s first release date. However, the app writer should not assume that all orderable data is going to be usefully ordered. Welcome to the data commons. (-: ~Chris -- Christopher R. Maden Data Architect Metaweb Technologies, Inc. From jg at metaweb.com Wed Apr 16 17:57:56 2008 From: jg at metaweb.com (John Giannandrea) Date: Wed, 16 Apr 2008 10:57:56 -0700 Subject: [Developers] MQL index property In-Reply-To: <48063615.3020903@davidflanagan.com> References: <48053DDE.7030705@davidflanagan.com> <48054400.7060207@metaweb.com> <48063615.3020903@davidflanagan.com> Message-ID: <27954233-07EF-48E6-9991-A0C6A47AA2F9@metaweb.com> David Flanagan wrote: > If the ordering is not to be documented as part of the schema, are you > suggesting, then, that users add "sort":"index" to their queries on > the > theory that they might be happier with the order things come out in, > on > the off chance that indices were added when the data was imported? Ordering is optional, and the schema doesnt tell you if it is in use. index order can be added to any clause, so anything might be ordered. Its just another kind of assertion, albeit an unusual one. While you could add index:null, sort:index to every query, it only makes sense to do so when you know you care and at least some of the data is ordered. In general most data is unordered and asking for things sorted is more expensive. So it very much depends on the data set. -jg From david at davidflanagan.com Wed Apr 16 18:24:17 2008 From: david at davidflanagan.com (David Flanagan) Date: Wed, 16 Apr 2008 11:24:17 -0700 Subject: [Developers] MQL index property In-Reply-To: <27954233-07EF-48E6-9991-A0C6A47AA2F9@metaweb.com> References: <48053DDE.7030705@davidflanagan.com> <48054400.7060207@metaweb.com> <48063615.3020903@davidflanagan.com> <27954233-07EF-48E6-9991-A0C6A47AA2F9@metaweb.com> Message-ID: <48064451.8040402@davidflanagan.com> John Giannandrea wrote: > Ordering is optional, and the schema doesnt tell you if it is in use. > index order can be added to any clause, so anything might be ordered. > Its just another kind of assertion, albeit an unusual one. > > While you could add index:null, sort:index to every query, it only > makes sense to do so when you know you care and at least some of the > data is ordered. So this is kind of a meta question, but how do I know when the data is ordered. I assume that somewhere, someone will write some documentation saying that /music/album/track properties are (or should be) ordered, right? (Oops, now that I've followed the link to http://freebase.com/view/guid/9202a8c04000641f800000000513b317, I see that this is in the documentation. Sorry!) It seems to me that it would be nice if there was an informative (as opposed to normative) property of /type/property to indicate that there is like to be an ordering on that property. David > In general most data is unordered and asking for things sorted is more > expensive. So it very much depends on the data set. > > -jg > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers > From crism at metaweb.com Wed Apr 16 18:40:22 2008 From: crism at metaweb.com (Christopher R. Maden) Date: Wed, 16 Apr 2008 14:40:22 -0400 (EDT) Subject: [Developers] MQL index property In-Reply-To: <48064451.8040402@davidflanagan.com> Message-ID: <12199927.161361208371222367.JavaMail.root@h00215> David Flanagan wrote: > So this is kind of a meta question, but how do I know when the data is > ordered. This is really only an issue if you are writing an ultra-general application. In that case, it?s probably best to always ask for the index if you think your users will care about the order, or at least always ask for the index for non-unique properties. (It may be worth noting at this point that the ?type? property (/type/object/type) itself is non-unique and can be ordered; this is how the Freebase client decides in what order to display the types on a topic.) I think there?s an expectation, though, that many applications will be specific to one subject matter or another and have some a priori knowledge of the schemata which they consider interesting. However, as I?ve said since I started working here, if we are successful, our users will surprise us, so expectations are certainly not binding! > It seems to me that it would be nice if there was an informative (as > opposed to normative) property of /type/property to indicate that there > is like to be an ordering on that property. This seems like a reasonable suggestion... does anyone else (who is not trying to document the entire bloody system) agree? It would be good to have a sense of the interest level. ~Chris -- Christopher R. Maden Data Architect Metaweb Technologies, Inc. From al at metaweb.com Wed Apr 16 18:50:42 2008 From: al at metaweb.com (Alexander Marks) Date: Wed, 16 Apr 2008 14:50:42 -0400 (EDT) Subject: [Developers] MQL index property In-Reply-To: <29182223.161391208371576942.JavaMail.root@h00215> Message-ID: <27829029.161441208371842472.JavaMail.root@h00215> I've thought about this too -- I think a property to represent order significance is a great idea. How about a new property hint at /freebase/property_hints/ordered? ----- Original Message ----- From: "David Flanagan" To: "For discussions about MQL, Freebase API and apps built on Freebase" Sent: Wednesday, April 16, 2008 11:24:17 AM (GMT-0800) America/Los_Angeles Subject: Re: [Developers] MQL index property John Giannandrea wrote: > Ordering is optional, and the schema doesnt tell you if it is in use. > index order can be added to any clause, so anything might be ordered. > Its just another kind of assertion, albeit an unusual one. > > While you could add index:null, sort:index to every query, it only > makes sense to do so when you know you care and at least some of the > data is ordered. So this is kind of a meta question, but how do I know when the data is ordered. I assume that somewhere, someone will write some documentation saying that /music/album/track properties are (or should be) ordered, right? (Oops, now that I've followed the link to http://freebase.com/view/guid/9202a8c04000641f800000000513b317, I see that this is in the documentation. Sorry!) It seems to me that it would be nice if there was an informative (as opposed to normative) property of /type/property to indicate that there is like to be an ordering on that property. David > In general most data is unordered and asking for things sorted is more > expensive. So it very much depends on the data set. > > -jg > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers > _______________________________________________ Developers mailing list Developers at freebase.com http://lists.freebase.com/mailman/listinfo/developers From robert at metaweb.com Wed Apr 16 18:54:42 2008 From: robert at metaweb.com (Robert Cook) Date: Wed, 16 Apr 2008 11:54:42 -0700 Subject: [Developers] MQL index property In-Reply-To: <27829029.161441208371842472.JavaMail.root@h00215> References: <27829029.161441208371842472.JavaMail.root@h00215> Message-ID: <1D2BA7E8-835B-4577-9BEE-FB5193334C86@metaweb.com> I've imagined that such a property would indicate the kind of ordering and by which sub-property if the property expects a CVT/CRT or a type with a disambiguator. R On Apr 16, 2008, at 11:50 AM, Alexander Marks wrote: > I've thought about this too -- I think a property to represent order > significance is a great idea. How about a new property hint at / > freebase/property_hints/ordered? > > ----- Original Message ----- > From: "David Flanagan" > To: "For discussions about MQL, Freebase API and apps built on > Freebase" > Sent: Wednesday, April 16, 2008 11:24:17 AM (GMT-0800) America/ > Los_Angeles > Subject: Re: [Developers] MQL index property > > John Giannandrea wrote: > >> Ordering is optional, and the schema doesnt tell you if it is in use. >> index order can be added to any clause, so anything might be ordered. >> Its just another kind of assertion, albeit an unusual one. >> >> While you could add index:null, sort:index to every query, it only >> makes sense to do so when you know you care and at least some of the >> data is ordered. > > So this is kind of a meta question, but how do I know when the data is > ordered. I assume that somewhere, someone will write some > documentation > saying that /music/album/track properties are (or should be) ordered, > right? (Oops, now that I've followed the link to > http://freebase.com/view/guid/9202a8c04000641f800000000513b317, I see > that this is in the documentation. Sorry!) > > It seems to me that it would be nice if there was an informative (as > opposed to normative) property of /type/property to indicate that > there > is like to be an ordering on that property. > > David > >> In general most data is unordered and asking for things sorted is >> more >> expensive. So it very much depends on the data set. >> >> -jg >> >> _______________________________________________ >> Developers mailing list >> Developers at freebase.com >> http://lists.freebase.com/mailman/listinfo/developers >> > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers From alecf at metaweb.com Wed Apr 16 19:17:59 2008 From: alecf at metaweb.com (Alec Flett) Date: Wed, 16 Apr 2008 12:17:59 -0700 Subject: [Developers] MQL index property In-Reply-To: <1D2BA7E8-835B-4577-9BEE-FB5193334C86@metaweb.com> References: <27829029.161441208371842472.JavaMail.root@h00215> <1D2BA7E8-835B-4577-9BEE-FB5193334C86@metaweb.com> Message-ID: I like this idea as well - the way the freebase.com software works today, it uses sort: index on pretty much every clause. But really, there are some schemas where you always want to order by name or date, or whatever... and often times you just don't care. Alec On Apr 16, 2008, at 11:54 AM, Robert Cook wrote: > I've imagined that such a property would indicate the kind of ordering > and by which sub-property if the property expects a CVT/CRT or a type > with a disambiguator. > > R > > On Apr 16, 2008, at 11:50 AM, Alexander Marks wrote: > >> I've thought about this too -- I think a property to represent order >> significance is a great idea. How about a new property hint at / >> freebase/property_hints/ordered? >> >> ----- Original Message ----- >> From: "David Flanagan" >> To: "For discussions about MQL, Freebase API and apps built on >> Freebase" >> Sent: Wednesday, April 16, 2008 11:24:17 AM (GMT-0800) America/ >> Los_Angeles >> Subject: Re: [Developers] MQL index property >> >> John Giannandrea wrote: >> >>> Ordering is optional, and the schema doesnt tell you if it is in >>> use. >>> index order can be added to any clause, so anything might be >>> ordered. >>> Its just another kind of assertion, albeit an unusual one. >>> >>> While you could add index:null, sort:index to every query, it only >>> makes sense to do so when you know you care and at least some of the >>> data is ordered. >> >> So this is kind of a meta question, but how do I know when the data >> is >> ordered. I assume that somewhere, someone will write some >> documentation >> saying that /music/album/track properties are (or should be) ordered, >> right? (Oops, now that I've followed the link to >> http://freebase.com/view/guid/9202a8c04000641f800000000513b317, I see >> that this is in the documentation. Sorry!) >> >> It seems to me that it would be nice if there was an informative (as >> opposed to normative) property of /type/property to indicate that >> there >> is like to be an ordering on that property. >> >> David >> >>> In general most data is unordered and asking for things sorted is >>> more >>> expensive. So it very much depends on the data set. >>> >>> -jg >>> >>> _______________________________________________ >>> Developers mailing list >>> Developers at freebase.com >>> http://lists.freebase.com/mailman/listinfo/developers >>> >> >> _______________________________________________ >> Developers mailing list >> Developers at freebase.com >> http://lists.freebase.com/mailman/listinfo/developers >> >> _______________________________________________ >> Developers mailing list >> Developers at freebase.com >> http://lists.freebase.com/mailman/listinfo/developers > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers From dmilbrath at metaweb.com Wed Apr 16 19:19:52 2008 From: dmilbrath at metaweb.com (Dan Milbrath) Date: Wed, 16 Apr 2008 15:19:52 -0400 (EDT) Subject: [Developers] MQL index property In-Reply-To: Message-ID: <30307406.161741208373592502.JavaMail.root@h00215> I think this feature is pretty much universally supported by everyone I've talked to about it. We'll get it in the queue for the next version of schema editor - which hopefully should be available in the next few months. ----- Original Message ----- From: "Alec Flett" To: "For discussions about MQL, Freebase API and apps built on Freebase" Sent: Wednesday, April 16, 2008 12:17:59 PM (GMT-0800) America/Los_Angeles Subject: Re: [Developers] MQL index property I like this idea as well - the way the freebase.com software works today, it uses sort: index on pretty much every clause. But really, there are some schemas where you always want to order by name or date, or whatever... and often times you just don't care. Alec On Apr 16, 2008, at 11:54 AM, Robert Cook wrote: > I've imagined that such a property would indicate the kind of ordering > and by which sub-property if the property expects a CVT/CRT or a type > with a disambiguator. > > R > > On Apr 16, 2008, at 11:50 AM, Alexander Marks wrote: > >> I've thought about this too -- I think a property to represent order >> significance is a great idea. How about a new property hint at / >> freebase/property_hints/ordered? >> >> ----- Original Message ----- >> From: "David Flanagan" >> To: "For discussions about MQL, Freebase API and apps built on >> Freebase" >> Sent: Wednesday, April 16, 2008 11:24:17 AM (GMT-0800) America/ >> Los_Angeles >> Subject: Re: [Developers] MQL index property >> >> John Giannandrea wrote: >> >>> Ordering is optional, and the schema doesnt tell you if it is in >>> use. >>> index order can be added to any clause, so anything might be >>> ordered. >>> Its just another kind of assertion, albeit an unusual one. >>> >>> While you could add index:null, sort:index to every query, it only >>> makes sense to do so when you know you care and at least some of the >>> data is ordered. >> >> So this is kind of a meta question, but how do I know when the data >> is >> ordered. I assume that somewhere, someone will write some >> documentation >> saying that /music/album/track properties are (or should be) ordered, >> right? (Oops, now that I've followed the link to >> http://freebase.com/view/guid/9202a8c04000641f800000000513b317, I see >> that this is in the documentation. Sorry!) >> >> It seems to me that it would be nice if there was an informative (as >> opposed to normative) property of /type/property to indicate that >> there >> is like to be an ordering on that property. >> >> David >> >>> In general most data is unordered and asking for things sorted is >>> more >>> expensive. So it very much depends on the data set. >>> >>> -jg >>> >>> _______________________________________________ >>> Developers mailing list >>> Developers at freebase.com >>> http://lists.freebase.com/mailman/listinfo/developers >>> >> >> _______________________________________________ >> Developers mailing list >> Developers at freebase.com >> http://lists.freebase.com/mailman/listinfo/developers >> >> _______________________________________________ >> Developers mailing list >> Developers at freebase.com >> http://lists.freebase.com/mailman/listinfo/developers > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers _______________________________________________ Developers mailing list Developers at freebase.com http://lists.freebase.com/mailman/listinfo/developers From al at metaweb.com Wed Apr 16 20:50:51 2008 From: al at metaweb.com (Alexander Marks) Date: Wed, 16 Apr 2008 16:50:51 -0400 (EDT) Subject: [Developers] Freebase WEX Data In-Reply-To: <17749384.162301208378104705.JavaMail.root@h00215> Message-ID: <18470704.162471208379051686.JavaMail.root@h00215> Kendra -- WEX is not designed for reassembling markup into HTML, which it sounds like you might be trying to do. The XML column for a "Template:%" article will not give you the markup necessary to *interpret* a Template macro, so there is really no utility in that content. WEX is designed to make querying the values of template calls in articles simple, for data mining. The data dumps that Wikipedia itself provides might be better suited for your application (http://meta.wikimedia.org/wiki/Data_dumps). Is that helpful? I'm curious: what exactly is your project? Al ----- Original Message ----- From: "Kendra Kuhl" < kendra.kuhl at juggle.com > Date: April 15, 2008 7:24:52 AM PDT To: < developers at freebase.com > Subject: [Developers] Freebase WEX Data Reply-To: "For discussions about MQL, Freebase API and apps built on Freebase" < developers at freebase.com > I'm hoping somebody can help me or point me in the right direction. I'm trying to put the Wikipedia article back together using XSLT. In trying to figure out what to do with the templates, it seemed to me that data is missing from the template article that allows me to do that. For example (also see below) in trying to reconstruct the dmoz template, I would go to the Template:Dmoz article, get the wiki markup for the template and use the data from the article with the template. The WEX dumps Template:DMOZ article doesn't contain template data. The same for the Template:Doctor_Who_RG article. The Dr. Who article contains more of the template information, but still not enough to create the template on the article side. Information I expect to be in the Template:Dmoz article: {{Pp-semi-protected|small=yes}}{{#switch: {{{3|}}} |#default=[ http://www.dmoz.org/ {{{1}}}/ {{{2|{{PAGENAME}}}}}] at the [[Open Directory Project]] |user=[ http://www.dmoz.org/profiles/ {{{1}}}.html {{{2|{{PAGENAME}}}}}] at the [[Open Directory Project]] }}{{Documentation}} Information showing in the Template:Dmoz article in the WEX dump:
This is what I see as missing: {{#switch: {{{3|}}} |#default=[ http://www.dmoz.org/ {{{1}}}/ {{{2|{{PAGENAME}}}}}] at the [[Open Directory Project]] |user=[ http://www.dmoz.org/profiles/ {{{1}}}.html {{{2|{{PAGENAME}}}}}] at the [[Open Directory Project]] }} So my questions are these: 1. Am I missing something? Is there another spot in the WEX dump that contains the information to put the template back together again? I have looked, but nothing jumps out at me. How does Metaweb / Freebase handle it? 2. Has anybody else attempted the XSLT reconstruction of the WEX data? If so, are you willing to share? I can share what I have come up with already, but I'm pretty new to XSLT. Thanks in advance!! Kendra _______________________________________________ Developers mailing list Developers at freebase.com http://lists.freebase.com/mailman/listinfo/developers From kendra.kuhl at juggle.com Thu Apr 17 14:00:26 2008 From: kendra.kuhl at juggle.com (Kendra Kuhl) Date: Thu, 17 Apr 2008 09:00:26 -0500 Subject: [Developers] Freebase WEX Data In-Reply-To: <18470704.162471208379051686.JavaMail.root@h00215> References: <17749384.162301208378104705.JavaMail.root@h00215> <18470704.162471208379051686.JavaMail.root@h00215> Message-ID: <4807584a.070c360a.76d5.7602@mx.google.com> Thanks for the response Al. True, the Template:Article won't give me the markup, but I think can use the Wikipedia rules on how they interpret templates to put the template back together again. However, the WEX data's template:articles are incomplete. We don't want to have to download, import, maintain and query through two separate data sources and Freebase WEX data is much easier to manipulate than Wikipedia's dumps. Trying to transform their data was a huge undertaking. Kendra -----Original Message----- From: Alexander Marks [mailto:al at metaweb.com] Sent: Wednesday, April 16, 2008 3:51 PM To: Kendra Kuhl Cc: developers Subject: Re: [Developers] Freebase WEX Data Kendra -- WEX is not designed for reassembling markup into HTML, which it sounds like you might be trying to do. The XML column for a "Template:%" article will not give you the markup necessary to *interpret* a Template macro, so there is really no utility in that content. WEX is designed to make querying the values of template calls in articles simple, for data mining. The data dumps that Wikipedia itself provides might be better suited for your application (http://meta.wikimedia.org/wiki/Data_dumps). Is that helpful? I'm curious: what exactly is your project? Al ----- Original Message ----- From: "Kendra Kuhl" < kendra.kuhl at juggle.com > Date: April 15, 2008 7:24:52 AM PDT To: < developers at freebase.com > Subject: [Developers] Freebase WEX Data Reply-To: "For discussions about MQL, Freebase API and apps built on Freebase" < developers at freebase.com > I'm hoping somebody can help me or point me in the right direction. I'm trying to put the Wikipedia article back together using XSLT. In trying to figure out what to do with the templates, it seemed to me that data is missing from the template article that allows me to do that. For example (also see below) in trying to reconstruct the dmoz template, I would go to the Template:Dmoz article, get the wiki markup for the template and use the data from the article with the template. The WEX dumps Template:DMOZ article doesn't contain template data. The same for the Template:Doctor_Who_RG article. The Dr. Who article contains more of the template information, but still not enough to create the template on the article side. Information I expect to be in the Template:Dmoz article: {{Pp-semi-protected|small=yes}}{{#switch: {{{3|}}} |#default=[ http://www.dmoz.org/ {{{1}}}/ {{{2|{{PAGENAME}}}}}] at the [[Open Directory Project]] |user=[ http://www.dmoz.org/profiles/ {{{1}}}.html {{{2|{{PAGENAME}}}}}] at the [[Open Directory Project]] }}{{Documentation}} Information showing in the Template:Dmoz article in the WEX dump:
This is what I see as missing: {{#switch: {{{3|}}} |#default=[ http://www.dmoz.org/ {{{1}}}/ {{{2|{{PAGENAME}}}}}] at the [[Open Directory Project]] |user=[ http://www.dmoz.org/profiles/ {{{1}}}.html {{{2|{{PAGENAME}}}}}] at the [[Open Directory Project]] }} So my questions are these: 1. Am I missing something? Is there another spot in the WEX dump that contains the information to put the template back together again? I have looked, but nothing jumps out at me. How does Metaweb / Freebase handle it? 2. Has anybody else attempted the XSLT reconstruction of the WEX data? If so, are you willing to share? I can share what I have come up with already, but I'm pretty new to XSLT. Thanks in advance!! Kendra _______________________________________________ Developers mailing list Developers at freebase.com http://lists.freebase.com/mailman/listinfo/developers From zodiac.seven at gmail.com Thu Apr 17 15:51:58 2008 From: zodiac.seven at gmail.com (Zodiac Seven) Date: Thu, 17 Apr 2008 21:21:58 +0530 Subject: [Developers] Category list In-Reply-To: <20080416154742.GI24554@metaweb.com> References: <20080416154742.GI24554@metaweb.com> Message-ID: Thank you Kurt, An off topic question: The query returns a result like this { "status": "200 OK", "code": "/api/status/ok", "results": { "code": "/api/status/ok", "result": [ { "type": "/freebase/domain_category", "name": "Sports" } ... I only need the names and I could parse those out of the string but is there a cleaner way to do it like using javascript's eval or some sort of freebase support function? I think if I could get a array of objects I could iterate through them copying 'object[i].name'. Any sample code would be helpful. On 4/16/08, Kurt Bollacker wrote: > > > > On Wed, Apr 16, 2008 at 08:44:36PM +0530, Zodiac Seven wrote: > > I'm writing a small app on FreeBase. > > I'm trying to build a category tree which shows the main categories > (sports, > > arts & crafts, etc.) and lets the user drill down to additional sub > > categories. > > Is there something like this already built which I can use? > > > Something close to what you want can be found as a MJT app at: > > http://www.mjtemplate.org/examples/schemas/ > > More about MJT can be found at: > > http://www.mjtemplate.org/ > > > > I notice that I can get a list of the categories for "Sports" like this: > > > > { "query" : [ { "domains" : [ { "id" : null, "name" : null, "type" : > > "/type/domain" } ], "name" : "Sports", "type" : > "/freebase/domain_category" > > } ]} > > > > but I can't figure out how to get a list of categories under > > "Sports/Basketball" > > > The hierarchy you are looking at has this order: > > Domain Category > Domain > Type > Property > > Your query above retrieves all of the domains in a domain category. > To get the types (e.g. Basketball Team) in a domain (e.g. Basketball), > you can use a similar query: > > { > "query" : [ > { > "name" : "Basketball", > "type" : "/type/domain", > "types" : [ > { > "id" : null, > "name" : null, > "type" : "/type/type" > } > ] > } > ] > } > > Hope this helps... Kurt :-) > > > > > Regards, > > > > Deepak. > > > _______________________________________________ > > Developers mailing list > > Developers at freebase.com > > http://lists.freebase.com/mailman/listinfo/developers > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20080417/e4c6894c/attachment-0001.htm From david at davidflanagan.com Thu Apr 17 16:31:46 2008 From: david at davidflanagan.com (David Flanagan) Date: Thu, 17 Apr 2008 09:31:46 -0700 Subject: [Developers] Category list In-Reply-To: References: <20080416154742.GI24554@metaweb.com> Message-ID: <48077B72.60605@davidflanagan.com> Zodiac Seven wrote: > > I only need the names and I could parse those out of the string but is > there a cleaner way to do it like using javascript's eval or some sort > of freebase support function? I think if I could get a array of objects > I could iterate through them copying 'object[i].name'. > Any sample code would be helpful. > Freebase queries and response are in JSON. You should be using a JSON library to serialize queries and parse responses. Also, it sounds as if you have not yet read the documentation which you can find here: http://www.freebase.com/view/freebase/api David Flanagan > > On 4/16/08, *Kurt Bollacker* > wrote: > > > > On Wed, Apr 16, 2008 at 08:44:36PM +0530, Zodiac Seven wrote: > > I'm writing a small app on FreeBase. > > I'm trying to build a category tree which shows the main > categories (sports, > > arts & crafts, etc.) and lets the user drill down to additional sub > > categories. > > Is there something like this already built which I can use? > > > Something close to what you want can be found as a MJT app at: > > http://www.mjtemplate.org/examples/schemas/ > > More about MJT can be found at: > > http://www.mjtemplate.org/ > > > > I notice that I can get a list of the categories for "Sports" > like this: > > > > { "query" : [ { "domains" : [ { "id" : null, "name" : null, "type" : > > "/type/domain" } ], "name" : "Sports", "type" : > "/freebase/domain_category" > > } ]} > > > > but I can't figure out how to get a list of categories under > > "Sports/Basketball" > > > The hierarchy you are looking at has this order: > > Domain Category > Domain > Type > Property > > Your query above retrieves all of the domains in a domain category. > To get the types (e.g. Basketball Team) in a domain (e.g. Basketball), > you can use a similar query: > > { > "query" : [ > { > "name" : "Basketball", > "type" : "/type/domain", > "types" : [ > { > "id" : null, > "name" : null, > "type" : "/type/type" > } > ] > } > ] > } > > Hope this helps... Kurt :-) > > > > > Regards, > > > > Deepak. > > > _______________________________________________ > > Developers mailing list > > Developers at freebase.com > > http://lists.freebase.com/mailman/listinfo/developers > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers From jeff at metaweb.com Thu Apr 17 19:34:27 2008 From: jeff at metaweb.com (Jeff Prucher) Date: Thu, 17 Apr 2008 12:34:27 -0700 Subject: [Developers] [Data-modeling] Awards refactoring In-Reply-To: <004001c89e8c$f01bc160$bc01a8c0@p4> References: <001c01c89b35$dc4b6640$65fa1eac@amd> <004001c89e8c$f01bc160$bc01a8c0@p4> Message-ID: <002101c8a0c2$0c8520d0$65fa1eac@amd> I've created the new "award" type and switched the keys around, and I'm crossing my fingers that nobody's code was broken! Jeff > -----Original Message----- > From: data-modeling-bounces at freebase.com > [mailto:data-modeling-bounces at freebase.com] On Behalf Of Jeff Prucher > Sent: Monday, April 14, 2008 5:09 PM > To: 'Freebase data modeling mailing list' > Subject: Re: [Data-modeling] Awards refactoring > > I'm going to go ahead and make these changes (rename "award" > to "award category", add a new type "award", and switch the > keys around) on Thursday of this week (4/17). Please jump up > and down and shout loudly if this will break any code that > you're using. > > Thanks, > Jeff Prucher > > > -----Original Message----- > > From: data-modeling-bounces at freebase.com > > [mailto:data-modeling-bounces at freebase.com] On Behalf Of > Jeff Prucher > > Sent: Thursday, April 10, 2008 11:08 AM > > To: 'Freebase data modeling mailing list' > > Subject: Re: [Data-modeling] Awards refactoring > > > > Logically, I'd say that either class of awards can be > called "award", > > and common use, even by the awards presenters, supports this. But I > > think common usage also supports refering to the specific awards as > > "categories". Some > > evidence: > > > > http://www.oscar.com/nominees/ (note "jump to a category" in left > > column) http://www.worldcon.org/hc.html > > http://www.pulitzer.org/history.html (search for the word > > "category") http://www.emmys.org/awards/awardsearch.php > > > > I couldn't find any other names for the general award type > other than > > just "award". > > > > Jeff P. > > > > > > > -----Original Message----- > > > From: data-modeling-bounces at freebase.com > > > [mailto:data-modeling-bounces at freebase.com] On Behalf Of Kirrily > > > Robert > > > Sent: Tuesday, April 08, 2008 7:00 PM > > > To: Freebase data modeling mailing list > > > Subject: Re: [Data-modeling] Awards refactoring > > > > > > I don't know. I think of a "category" as a grouping of > > things rather > > > than a specific thing. Therefore, I would think that > > "Academy Award" > > > was a category of award, and "Academy Award for Best Actor" > > would be a > > > specific award. > > > > > > K. > > > > > > ----- "Faye Li" wrote: > > > > Jeff - I can't believe you remember my suggesting this -- > > > but that's > > > > great! :) > > > > > > > > In general I agree with you that type key changes should > > be avoided > > > > and any change should be made backward-compatible. The > > > exception I'm > > > > evidently more open to, is when keeping the same key in the > > > interest > > > > of backward compatibility unintentionally but > unabashedly causes > > > > forward > > > > > > > > confusion. I can just imagine future discussion threads > > from users > > > > puzzled over the fact that the "Award" Type has the key > > > > "/award/" while "Award > > > Category" has the > > > > key "/award/award", and then some old-timer from the > > community will > > > > have to explain, sheepishly, the "legacy" schema and > > > > backward-compatibility policy that together produced > this awkward > > > > design. > > > > > > > > So my practical question is, hypothetically, if the type > > > key were to > > > > be changed to a more logical name, would that break > > anyone's code? > > > > Please > > > > > > > > speak up if this would affect you. I see a trade-off between > > > > supporting our current community now and avoiding > > confusing future > > > > users (which dare I say number much higher than they do > > > now...), and I > > > > think to evaluate that, the missing piece of information > > of actual > > > > impact of a > > > > > > > > key change must be known. > > > > > > > > -- Faye > > > > > > > > > > > > Jeff Prucher wrote: > > > > > I'm cross-posting to the developers list because this proposal > > > > touches on > > > > > the type keys in the awards domain, which might affect > > developers. > > > > > > > > > > There is a problem in the current awards schema. There is > > > no way to > > > > group > > > > > categories of awards together under the same general > award. For > > > > example, > > > > > there are topics for every Academy Award category > (best picture, > > > > best > > > > > original screenplay, etc.) of type "award", but there > > is no way to > > > > assert > > > > > that all these awards are the same sort of award. So if > > > you want to > > > > know > > > > > which picture has won the most Academy Awards, you > have to query > > > > against > > > > > every academy award topic, do some kind of string > > matching against > > > > the topic > > > > > name, or go by the awarding organization. (This last > > one wouldn't > > > > work, > > > > > actually -- different Nobels are technically awarded by > > different > > > > groups, > > > > > and some organizations sponsor multiple awards.) > > > > > > > > > > So I'm proposing (well, this was Faye's idea, really) > > > that we add a > > > > new type > > > > > that will connect to both "award" and "award presenting > > > > organization". This > > > > > would ordinarily be a very simple thing to do. The > > problem is with > > > > the > > > > > nomenclature. From a practical standpoint, the new type > > (i.e., for > > > > the > > > > > general "Academy Award") should be called simply > > "award", and the > > > > old type > > > > > (i.e., for the specific category, "Academy Award for > Best Foo") > > > > should be > > > > > renamed "award category". I'm pretty satisfied with > making that > > > > change, but > > > > > I'd like to hear other suggestions. > > > > > > > > > > My main concern with the naming I'm proposing is that the > > > type keys > > > > might be > > > > > a problem. The type "award category" (formerly known as > > > "award") has > > > > a key > > > > > of /award/award. The new type "award" can't use that, > > > since keys are > > > > unique, > > > > > so it would have to have some weirdly-named key. This > is doable, > > > > just > > > > > inelegant and probably confusing to anyone who tries to write > > > > queries using > > > > > the keys. The alternative would be to move the > > /award/award key to > > > > the new > > > > > "award" and create a new key for "award category", but > > this would > > > > completely > > > > > break any code that uses this schema, which is not > > > something I'm too > > > > keen on > > > > > doing. > > > > > > > > > > The Academy Awards (type = award): > > > > > http://sandbox.freebase.com/view/en/academy_awards > > > > > > > > > > Academy Award for Best Director (type = award category): > > > > > > > > > http://sandbox.freebase.com/view/en/academy_award_for_best_director > > > > > > > > > > The Academy of Motion Picture Arts & Sciences (type= award > > > > presenting > > > > > organization) > > > > > > > > > > > > > > > http://sandbox.freebase.com/view/en/academy_of_motion_picture_arts_and > > > > _scien > > > > > ces > > > > > > > > > > Thoughts on how best to proceed? > > > > > > > > > > Jeff Prucher > > > > > Type Librarian & Ontologist > > > > > Metaweb Technologies, Inc. > > > > > > > > > > > > > > > _______________________________________________ > > > > > Data-modeling mailing list > > > > > Data-modeling at freebase.com > > > > > http://lists.freebase.com/mailman/listinfo/data-modeling > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Data-modeling mailing list > > > > Data-modeling at freebase.com > > > > http://lists.freebase.com/mailman/listinfo/data-modeling > > > > > > > > > -- > > > Kirrily Robert > > > Freebase Community Director > > > kirrily at metaweb.com > > > > > > _______________________________________________ > > > Data-modeling mailing list > > > Data-modeling at freebase.com > > > http://lists.freebase.com/mailman/listinfo/data-modeling > > > > > > > > > _______________________________________________ > > Data-modeling mailing list > > Data-modeling at freebase.com > > http://lists.freebase.com/mailman/listinfo/data-modeling > > > > _______________________________________________ > Data-modeling mailing list > Data-modeling at freebase.com > http://lists.freebase.com/mailman/listinfo/data-modeling > From zodiac.seven at gmail.com Thu Apr 17 19:56:17 2008 From: zodiac.seven at gmail.com (Zodiac Seven) Date: Fri, 18 Apr 2008 01:26:17 +0530 Subject: [Developers] Category list In-Reply-To: <48077B72.60605@davidflanagan.com> References: <20080416154742.GI24554@metaweb.com> <48077B72.60605@davidflanagan.com> Message-ID: Thanks David, Can someone recommend a good json library. On 4/17/08, David Flanagan wrote: > > Zodiac Seven wrote: > > > > > I only need the names and I could parse those out of the string but is > > there a cleaner way to do it like using javascript's eval or some sort > > of freebase support function? I think if I could get a array of objects > > I could iterate through them copying 'object[i].name'. > > Any sample code would be helpful. > > > > > Freebase queries and response are in JSON. You should be using a JSON > library to serialize queries and parse responses. > > Also, it sounds as if you have not yet read the documentation which you > can find here: > > http://www.freebase.com/view/freebase/api > > David Flanagan > > > > > > On 4/16/08, *Kurt Bollacker* > > > wrote: > > > > > > > > On Wed, Apr 16, 2008 at 08:44:36PM +0530, Zodiac Seven wrote: > > > I'm writing a small app on FreeBase. > > > I'm trying to build a category tree which shows the main > > categories (sports, > > > arts & crafts, etc.) and lets the user drill down to additional > sub > > > categories. > > > Is there something like this already built which I can use? > > > > > > Something close to what you want can be found as a MJT app at: > > > > http://www.mjtemplate.org/examples/schemas/ > > > > More about MJT can be found at: > > > > http://www.mjtemplate.org/ > > > > > > > I notice that I can get a list of the categories for "Sports" > > like this: > > > > > > { "query" : [ { "domains" : [ { "id" : null, "name" : null, > "type" : > > > "/type/domain" } ], "name" : "Sports", "type" : > > "/freebase/domain_category" > > > } ]} > > > > > > but I can't figure out how to get a list of categories under > > > "Sports/Basketball" > > > > > > The hierarchy you are looking at has this order: > > > > Domain Category > > Domain > > Type > > Property > > > > Your query above retrieves all of the domains in a domain category. > > To get the types (e.g. Basketball Team) in a domain (e.g. > Basketball), > > you can use a similar query: > > > > { > > "query" : [ > > { > > "name" : "Basketball", > > "type" : "/type/domain", > > "types" : [ > > { > > "id" : null, > > "name" : null, > > "type" : "/type/type" > > } > > ] > > } > > ] > > } > > > > Hope this helps... Kurt > :-) > > > > > > > > > Regards, > > > > > > Deepak. > > > > > _______________________________________________ > > > Developers mailing list > > > > Developers at freebase.com > > > > http://lists.freebase.com/mailman/listinfo/developers > > > > _______________________________________________ > > Developers mailing list > > > Developers at freebase.com > > > http://lists.freebase.com/mailman/listinfo/developers > > > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Developers mailing list > > Developers at freebase.com > > http://lists.freebase.com/mailman/listinfo/developers > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20080418/d0efc777/attachment.htm From kendra.kuhl at juggle.com Thu Apr 17 19:58:04 2008 From: kendra.kuhl at juggle.com (Kendra Kuhl) Date: Thu, 17 Apr 2008 14:58:04 -0500 Subject: [Developers] Category list In-Reply-To: References: <20080416154742.GI24554@metaweb.com> <48077B72.60605@davidflanagan.com> Message-ID: <4807ac1e.395c220a.4bfe.2276@mx.google.com> LitJson is a pretty good one if you are doing .Net. It's available here: http://litjson.sourceforge.net/ From: developers-bounces at freebase.com [mailto:developers-bounces at freebase.com] On Behalf Of Zodiac Seven Sent: Thursday, April 17, 2008 2:56 PM To: For discussions about MQL, Freebase API and apps built on Freebase Subject: Re: [Developers] Category list Thanks David, Can someone recommend a good json library. On 4/17/08, David Flanagan wrote: Zodiac Seven wrote: > > I only need the names and I could parse those out of the string but is > there a cleaner way to do it like using javascript's eval or some sort > of freebase support function? I think if I could get a array of objects > I could iterate through them copying 'object[i].name'. > Any sample code would be helpful. > Freebase queries and response are in JSON. You should be using a JSON library to serialize queries and parse responses. Also, it sounds as if you have not yet read the documentation which you can find here: http://www.freebase.com/view/freebase/api David Flanagan > > On 4/16/08, *Kurt Bollacker* > wrote: > > > > On Wed, Apr 16, 2008 at 08:44:36PM +0530, Zodiac Seven wrote: > > I'm writing a small app on FreeBase. > > I'm trying to build a category tree which shows the main > categories (sports, > > arts & crafts, etc.) and lets the user drill down to additional sub > > categories. > > Is there something like this already built which I can use? > > > Something close to what you want can be found as a MJT app at: > > http://www.mjtemplate.org/examples/schemas/ > > More about MJT can be found at: > > http://www.mjtemplate.org/ > > > > I notice that I can get a list of the categories for "Sports" > like this: > > > > { "query" : [ { "domains" : [ { "id" : null, "name" : null, "type" : > > "/type/domain" } ], "name" : "Sports", "type" : > "/freebase/domain_category" > > } ]} > > > > but I can't figure out how to get a list of categories under > > "Sports/Basketball" > > > The hierarchy you are looking at has this order: > > Domain Category > Domain > Type > Property > > Your query above retrieves all of the domains in a domain category. > To get the types (e.g. Basketball Team) in a domain (e.g. Basketball), > you can use a similar query: > > { > "query" : [ > { > "name" : "Basketball", > "type" : "/type/domain", > "types" : [ > { > "id" : null, > "name" : null, > "type" : "/type/type" > } > ] > } > ] > } > > Hope this helps... Kurt :-) > > > > > Regards, > > > > Deepak. > > > _______________________________________________ > > Developers mailing list > > Developers at freebase.com > > http://lists.freebase.com/mailman/listinfo/developers > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers _______________________________________________ Developers mailing list Developers at freebase.com http://lists.freebase.com/mailman/listinfo/developers -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20080417/fc30d711/attachment-0001.htm From kurt at metaweb.com Thu Apr 17 20:12:05 2008 From: kurt at metaweb.com (Kurt Bollacker) Date: Thu, 17 Apr 2008 20:12:05 +0000 Subject: [Developers] Category list In-Reply-To: References: <20080416154742.GI24554@metaweb.com> <48077B72.60605@davidflanagan.com> Message-ID: <20080417201205.GO24554@metaweb.com> On Fri, Apr 18, 2008 at 01:26:17AM +0530, Zodiac Seven wrote: > Thanks David, > > Can someone recommend a good json library. See a large list for over 30 languages at: http://json.org/ Kurt :-) From robert at meta