From niallo at metaweb.com Tue Jun 5 00:04:47 2007 From: niallo at metaweb.com (Niall O'Higgins) Date: Mon, 04 Jun 2007 17:04:47 -0700 Subject: [Developers] sandbox.freebase.com updating shortly Message-ID: <4664A89F.6070601@metaweb.com> Hi, Weekly data refresh and software update for http://sandbox.freebase.com/ will be happening over the next few minutes. -- Niall O'Higgins Software Engineer Metaweb Technologies, Inc. From niallo at metaweb.com Tue Jun 5 00:24:55 2007 From: niallo at metaweb.com (Niall O'Higgins) Date: Mon, 04 Jun 2007 17:24:55 -0700 Subject: [Developers] sandbox.freebase.com updating shortly In-Reply-To: <4664A89F.6070601@metaweb.com> References: <4664A89F.6070601@metaweb.com> Message-ID: <4664AD57.5020100@metaweb.com> Update complete. Niall O'Higgins wrote: > Hi, > > Weekly data refresh and software update for http://sandbox.freebase.com/ > will be happening over the next few minutes. > > -- Niall O'Higgins Software Engineer Metaweb Technologies, Inc. From alecf at metaweb.com Tue Jun 5 19:29:48 2007 From: alecf at metaweb.com (Alec Flett) Date: Tue, 05 Jun 2007 12:29:48 -0700 Subject: [Developers] Flash Data Mob: My Home Town Message-ID: <4665B9AC.1090007@metaweb.com> For those of you who've filled out your freebase profile, (http://www.freebase.com/view/user) and entered your home town, you've probably noticed that (at least in the US) Freebase has an amazing breadth of location data - thanks in part to Wikipedia and some free data from the US Government... Well, now's the chance to make sure your home town and grade school is properly represented in Freebase. When you were growing up, you probably always heard the legend that someone famous was from your town, went to your school, or that some famous thing was invented there. I'm from Lexington, MA, which is not just a historical town (the American Revolution began just a mile from the house I grew up in) but was also a frequent filming location for "This Old House" - yeah, I know, it's a fascinating place. I'll spare you more AMAZING facts about Lexington and move onto the task at hand. Go take all the trivia that you know about your town, your school, whatever, and see if you can figure out a way to represent this in Freebase. Here are a few ideas from different Freebase domains: * famous actors/musicians/scientists/politicians/athletes/etc born your town - visit the topic page for that person, and add it * famous actors/etc that went to your high school/grade school/etc - make sure you school is there and then enter stuff in the "Students/Graduates" section * films or tv shows that were filmed in your town - cotype your town as a "film location" and enter their names * Fictional works that take place in your town - cotype your town as a fictional setting * Fill out your school's data - school news paper, mascot, when it was founded, etc * Companies or websites that are in your town * Notable buildings * Notable schools, colleges, etc * Sports teams from or that play in your town * Famous military conflicts Anything else? For more inspiration, check out the full list of other types that use "Location" on the location schema page: http://www.freebase.com/view/schema?id=/location/location And for the bonus: I'd like to challenge someone to come up with a "Welcome to ...." MQL page which captures all of this information for any given location across all these different domains. Alec P.S. I was playing with IMDB searches and discovered this: http://www.imdb.com/List?locations=Lexington,%20Massachusetts,%20USA There isn't a real form on imdb.com that allows you to get there but you can figure out how to tweak the above URL.. but I'd be curious if there are other locations on the web to gather trivia about specific locations - post here and share with your fellow freebasers! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20070605/1d3caa3e/attachment.html From odp at freenet.de Tue Jun 5 21:17:28 2007 From: odp at freenet.de (Chris) Date: Tue, 05 Jun 2007 23:17:28 +0200 Subject: [Developers] dealing with duplicates Message-ID: <4665D2E8.7030503@freenet.de> Apologies for posting on a developers list as a completely non-technical person, but the convergence problem is simply too tempting to keep my mouth shut ;-) Alec Flett wrote: "This is a great question - convergence problems are always going to exist in freebase and it would be great to flush out some specific patterns to deal with them. After all, it takes just one broken program or person creating a second topic called "The Beatles" - even if some process clear up duplicates in 6 hours, that's 6 hours of "confused" data. I'd love to hear some suggestions on how to address this. " I?d try to combine various external authoritative resources, and the authority of the human contributors. For many topics, Freebase already has a link to the corresponding Wikipedia article: it?s currently used to display the Wikipedia description for a topic if there?s no user-defined description yet. If you?d not only use these links for finding the Wiki descriptions, but store them as an extra "Corresponding Wikipedia article" default property and encourage people to actively maintain these links, that would give an external authority for a whole lot of topics... especially if it is forbidden, or at least made a bit more difficult, to enter a specific article more than once into this "Corresponding Wikipedia article" field in the complete Freebase. If someone tries to enter a link to a Wikipedia article that has already been used elsewhere, display a note "already used for topic x, please make sure there?s no duplication". This would help people to find duplicates or overlaps, and create a bit healthy pressure to discuss problem cases too. The IMDB entries which are already used in the Music domain could probably be used like this, too. Other candidates are links to Musicmoz/Chefmoz/ODP categories (affiliation disclosure: I am editing at dmoz.org), or the Yahoo directory. Or expert resources that are used only for specific domains. A developer who wants to use Freebase content combined with an external authority could choose any of these external resources as his main authority. E.g. for searches on films IMDB might be the best fit. Or depending of what you use the data for, you could assign higher value to a topic that has matches at several of these selected resources. Regards, Chris (chris2 at Freebase) From niallo at metaweb.com Tue Jun 5 23:27:57 2007 From: niallo at metaweb.com (Niall O'Higgins) Date: Tue, 05 Jun 2007 16:27:57 -0700 Subject: [Developers] www.freebase.com software update Message-ID: <4665F17D.3020302@metaweb.com> Hi, Software update of www.freebase.com happening over the next few minutes. -- Niall O'Higgins Software Engineer Metaweb Technologies, Inc. From niallo at metaweb.com Tue Jun 5 23:54:46 2007 From: niallo at metaweb.com (Niall O'Higgins) Date: Tue, 05 Jun 2007 16:54:46 -0700 Subject: [Developers] www.freebase.com software update In-Reply-To: <4665F17D.3020302@metaweb.com> References: <4665F17D.3020302@metaweb.com> Message-ID: <4665F7C6.4070605@metaweb.com> Update complete. Niall O'Higgins wrote: > Hi, > > Software update of www.freebase.com happening over the next few minutes. > > -- Niall O'Higgins Software Engineer Metaweb Technologies, Inc. From daepark at metaweb.com Mon Jun 11 19:11:26 2007 From: daepark at metaweb.com (Dae Park) Date: Mon, 11 Jun 2007 12:11:26 -0700 Subject: [Developers] mjt Message-ID: <536CD7DD-FE30-43BB-B54E-7E98A468C4E1@metaweb.com> I am trying to do a generic topic viewer using mjt but using a specialized web service other than the mjt.mqlread. This web service I am writing myself and will support the callback= paramater. My question is how do I then invoke that web service using the
framework? -dae From nix at metaweb.com Mon Jun 11 20:42:46 2007 From: nix at metaweb.com (Nick Thompson) Date: Mon, 11 Jun 2007 13:42:46 -0700 Subject: [Developers] mjt In-Reply-To: <536CD7DD-FE30-43BB-B54E-7E98A468C4E1@metaweb.com> References: <536CD7DD-FE30-43BB-B54E-7E98A468C4E1@metaweb.com> Message-ID: <466DB3C6.1090700@metaweb.com> Dae Park wrote: > I am trying to do a generic topic viewer using mjt but using a > specialized web service other than the mjt.mqlread. This web service I > am writing myself and will support the callback= paramater. My question > is how do I then invoke that web service using the
> framework? good question. long answer =). there's an example of doing this for one of the yahoo apis, but i now see it's out of date, eek! http://mjtemplate.org/examples/yahoo/imagesearch.html i'll fix this in the next push to the website, but for now the best code to start from is probably these three functions in mjt.js: mjt.BlobGetTask(...) mjt.BlobGetTask.prototype.enqueue() mjt.parse_metaweb_script_response(task, envelope) general doc: i'm not that happy with the api for extending tasks, i'd appreciate any comments or suggestions. generally you need to implement three functions for each task: 1. MyTask(...) is the constructor. it should start with mjt.Task.apply(this); and it can be invoked with
new MyTask(...)
2. MyTask.prototype.enqueue() invokes the web service mjt will call this when it needs to run the task: this should invoke your web service by whatever means needed. mjt has some convenience functions that you'll probably want to use for a json/callback= service, you can copy much of mjt.BlobGetTask. the enqueue() function must also set up a callback for when the request completes or times out. 3. when the service responds, the callback must translate the response into the mjt task format. in mjt.BlobGetTask this is done with an auxillary function, mjt.parse_metaweb_script_response(task, envelope). this function distinguishes between timeout, error, and successful responses. the response handler is definitely the complicated part, because it has to fold several kinds of responses together: 1. successful service response (service-specific format) 2. service errors (service-specific format) 3. mjt or network layer errors like timeouts or http errors number 3 is not very well-defined unfortunately - the mjt task format started as a variation on the mqlread envelope, but things have drifted a bit and need to be rationalized. here are the current rules: task.state MUST be a string, one of 'init', 'wait', 'ready' or 'error'. the response handler should set it to either 'ready' or 'error' if task.state == 'ready', task.result should contain the result or results from the web service. if task.state == 'error', task.messages should be an array of message objects: task = { state: 'error', messages: [{ type: '...', text: '...' }] } for some services it makes sense to have an empty result trigger state 'error', in other cases this might be considered 'ready'. the message object format will definitely evolve. you can use a service-specific error format if you want, but you'll have to translate mjt level errors into that format. or, you can translate the service-specific errors into something more like the existing freebase mjt services, which might be nicer if you want to enable mash-ups with your service but would require more code in your response handler. settling on a format for results and messages would simplify this description, but i haven't had enough experience with it yet. hopefully i can re-use some of the design that's been done on defining the envelopes for the freebase service. nick From niallo at metaweb.com Tue Jun 12 00:00:45 2007 From: niallo at metaweb.com (Niall O'Higgins) Date: Mon, 11 Jun 2007 17:00:45 -0700 Subject: [Developers] sandbox.freebase.com update Message-ID: <466DE22D.5060900@metaweb.com> Hi, Weekly software update and data refresh of sandbox.freebase.com is happening over the next few minutes. -- Niall O'Higgins Software Engineer Metaweb Technologies, Inc. From niallo at metaweb.com Tue Jun 12 00:27:35 2007 From: niallo at metaweb.com (Niall O'Higgins) Date: Mon, 11 Jun 2007 17:27:35 -0700 Subject: [Developers] sandbox.freebase.com update complete Message-ID: <466DE877.6070803@metaweb.com> Data refresh and software update completed. -- Niall O'Higgins Software Engineer Metaweb Technologies, Inc. From darin at metaweb.com Tue Jun 12 18:17:04 2007 From: darin at metaweb.com (Darin Wilson) Date: Tue, 12 Jun 2007 11:17:04 -0700 Subject: [Developers] /people/religion type soon to be removed Message-ID: Hi- The /people/religion type has been deprecated and replaced with a more complete /religion/religion type as part of the new /religion domain. /people/religion now has the "published" flag turned off, and will be removed in two weeks. If this creates any problems, or you need help migrating to the new type, please let me know. Thanks, Darin From patrick at metaweb.com Tue Jun 12 19:17:42 2007 From: patrick at metaweb.com (Patrick Tufts) Date: Tue, 12 Jun 2007 12:17:42 -0700 Subject: [Developers] Boat domain overhaul In-Reply-To: References: Message-ID: <466EF156.707@metaweb.com> I've got an overhaul of the boat domain that's ready to launch. For a description of the changes, please see: http://www.freebase.com/discuss/view?id=%2Fboats%2Fboat I plan to make the changes this week. --Pat From ssak at appliedminds.com Tue Jun 12 20:25:01 2007 From: ssak at appliedminds.com (Steve Sak) Date: Tue, 12 Jun 2007 16:25:01 -0400 Subject: [Developers] /people/religion type soon to be removed In-Reply-To: References: Message-ID: <466F011D.6030906@appliedminds.com> This raises an interesting question regarding type names. Does a type name have to be related to the domain it's in? It seems that it could be any token you want and there's nothing special from the freebase perspective that requires it to be related to its domain, its purely for human understandability. Darin Wilson wrote: > Hi- > > The /people/religion type has been deprecated and replaced with a > more complete /religion/religion type as part of the new /religion > domain. > > /people/religion now has the "published" flag turned off, and will be > removed in two weeks. If this creates any problems, or you need help > migrating to the new type, please let me know. > > Thanks, > Darin > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers > -- Steven G Sak Applied Minds, Inc. 11718 Bowman Green Drive Reston, Virginia 20190 o: (703) 483-2207 c: (703) 626-2557 From darin at metaweb.com Tue Jun 12 20:59:52 2007 From: darin at metaweb.com (Darin Wilson) Date: Tue, 12 Jun 2007 13:59:52 -0700 Subject: [Developers] /people/religion type soon to be removed In-Reply-To: <466F011D.6030906@appliedminds.com> References: <466F011D.6030906@appliedminds.com> Message-ID: <8E5B9310-7392-41CB-B891-BEE4DD39261D@metaweb.com> In this specific case, we had a single type called "religion" in the "people" domain, and as we looked into expanding the data around religion, we realized that we needed a number of other types to cover the space thoroughly. This led to the creation of a new "religion" domain that could hold all of the religion-related types, as it didn't seem appropriate to keep things like "religious organization" in the "people" domain. Strictly speaking, type names don't have to be related to the domains they're in, but I think it makes things more lucid if they do. Darin On Jun 12, 2007, at 1:25 PM, Steve Sak wrote: > > This raises an interesting question regarding type names. Does a type > name have to be related to the domain it's in? It seems that it > could be > any token you want and there's nothing special from the freebase > perspective that requires it to be related to its domain, its > purely for > human understandability. > > > Darin Wilson wrote: >> Hi- >> >> The /people/religion type has been deprecated and replaced with a >> more complete /religion/religion type as part of the new /religion >> domain. >> >> /people/religion now has the "published" flag turned off, and will be >> removed in two weeks. If this creates any problems, or you need help >> migrating to the new type, please let me know. >> >> Thanks, >> Darin >> _______________________________________________ >> Developers mailing list >> Developers at freebase.com >> http://lists.freebase.com/mailman/listinfo/developers >> > > -- > Steven G Sak > Applied Minds, Inc. > 11718 Bowman Green Drive > Reston, Virginia 20190 > o: (703) 483-2207 > c: (703) 626-2557 > From daepark at metaweb.com Wed Jun 13 01:44:55 2007 From: daepark at metaweb.com (Dae Park) Date: Tue, 12 Jun 2007 18:44:55 -0700 Subject: [Developers] mql boolean constraint Message-ID: If I have a unique property (i.e., /type/foo/bar) who's expected type is /type/boolean, does providing a "false" constraint on that property also match those that have null values for that property. For example: [{ id: null, type: "/type/foo", bar: false }] Will this give me all instances of /type/foo that has not yet set a boolean value for the "bar" property? -dae From kurt at metaweb.com Wed Jun 13 02:01:33 2007 From: kurt at metaweb.com (Kurt Bollacker) Date: Tue, 12 Jun 2007 19:01:33 -0700 Subject: [Developers] mql boolean constraint In-Reply-To: References: Message-ID: <20070613020133.GH578@metaweb.com> On Tue, Jun 12, 2007 at 06:44:55PM -0700, Dae Park wrote: > If I have a unique property (i.e., /type/foo/bar) who's expected type > is /type/boolean, does providing a "false" constraint on that > property also match those that have null values for that property. > For example: > > [{ > id: null, > type: "/type/foo", > bar: false > }] > > Will this give me all instances of /type/foo that has not yet set a > boolean value for the "bar" property? No. "false" (a positive assertion of falsehood) is different than no assertion. Kurt :-) From tsturge at metaweb.com Wed Jun 13 03:24:55 2007 From: tsturge at metaweb.com (Tim Sturge) Date: Tue, 12 Jun 2007 20:24:55 -0700 Subject: [Developers] mql boolean constraint In-Reply-To: References: Message-ID: <466F6387.7030003@metaweb.com> That would be really nice, but unfortunately MQL doesn't work that way. null in MQL is a special value which indicates the absence of a value. So bar: null (there is no value for bar) is like name: null (there is no name). false is just another value, so bar: false is like name: "anything here", there's a value that you can exactly match on. Likewise the integer 0 and the floating point value 0.0 are just values like any other integer or floating point value. There's currently no way in MQL to ask "give me only the things that don't have a value for bar (or for name)". It's been requested several times, but is hard to implement (mostly because you have to look at everything to decide that nothing matches). I'm trying to think of a way to work around this, but nothing obvious comes to mind. Since it's pretty common just to use true and leave things that should be false unset entirely I agree MQL should provide a way to ask for "false or not set at all" even if we don't solve the general "things that don't have a value" problem (although whether this one case is easier than the general problem is doubtful.) Tim Dae Park wrote: > If I have a unique property (i.e., /type/foo/bar) who's expected type > is /type/boolean, does providing a "false" constraint on that > property also match those that have null values for that property. > For example: > > [{ > id: null, > type: "/type/foo", > bar: false > }] > > Will this give me all instances of /type/foo that has not yet set a > boolean value for the "bar" property? > > -dae > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers > From daepark at metaweb.com Wed Jun 13 17:57:44 2007 From: daepark at metaweb.com (Dae Park) Date: Wed, 13 Jun 2007 10:57:44 -0700 Subject: [Developers] mjt.mqlread support posts or macros Message-ID: <2126BD9C-D56B-4222-A343-F07843B03AB5@metaweb.com> Is there a way to print out the query url generated by mjt.mqlread? I am suspecting my dynamic query is "too long". If this is the case I see couple of alternatives: (1) does mjt.mqlread support posts or (2) I've heard Tim mentioning mql supporting a macros, if so, can mjt.mqlread support these mql query envelope-level constraints like cursor, permission and perhaps, macro? -dae From daepark at metaweb.com Wed Jun 13 18:08:29 2007 From: daepark at metaweb.com (Dae Park) Date: Wed, 13 Jun 2007 11:08:29 -0700 Subject: [Developers] mjt.mqlread support posts or macros In-Reply-To: <2126BD9C-D56B-4222-A343-F07843B03AB5@metaweb.com> References: <2126BD9C-D56B-4222-A343-F07843B03AB5@metaweb.com> Message-ID: On Jun 13, 2007, at 10:57 AM, Dae Park wrote: > Is there a way to print out the query url generated by mjt.mqlread? Doh! you can just view the generated source. From will at hamstersoup.com Thu Jun 14 00:26:09 2007 From: will at hamstersoup.com (Will Moffat) Date: Thu, 14 Jun 2007 02:26:09 +0200 Subject: [Developers] Can the trans service generate JSON? Message-ID: <2f665fe20706131726s3d457e42kfc72ca7cfc4aba23@mail.gmail.com> Dear developers, Can the trans service generate JSON (with a callback) rather than raw data? Why on earth would somebody want to do this? * To work around corrupt raw data. To compensate for my appalling bad visual memory I made a list of Metaweb staff: http://hamstersoup.com/freebase_private/projects/simple/Groups/groups.html Since this a MJT app, the only way I know to include content from the data-store is using an IMG or IFRAME tag with the trans service. But some of this data has the wrong MIME-type, example: http://www.freebase.com/api/trans/raw/%239202a8c04000641f8000000003e02ba7 And since it's in an IFRAME, there's nothing I can do about it. If it was JSON then I could process it before display. * Client-side processing of data Since the data is loaded into an IFRAME I can't access it with Javascript. It would be cool if I could process and format the data on the client. (examples: make a tag-cloud, customized blurb, total control of formatting) regards, --Will From jg at metaweb.com Thu Jun 14 07:58:06 2007 From: jg at metaweb.com (John Giannandrea) Date: Thu, 14 Jun 2007 00:58:06 -0700 Subject: [Developers] Can the trans service generate JSON? In-Reply-To: <2f665fe20706131726s3d457e42kfc72ca7cfc4aba23@mail.gmail.com> References: <2f665fe20706131726s3d457e42kfc72ca7cfc4aba23@mail.gmail.com> Message-ID: <031A772A-198F-4CC4-88B2-F816ED585E1F@metaweb.com> Will Moffat wrote: > Since this a MJT app, the only way I know to include content from the > data-store is using an IMG or IFRAME tag with the trans service. Will, take a look at mjt.BlobGetTask as used in the examples/freebase/posts.html example. -jg From will at hamstersoup.com Thu Jun 14 13:17:42 2007 From: will at hamstersoup.com (Will Moffat) Date: Thu, 14 Jun 2007 15:17:42 +0200 Subject: [Developers] Can the trans service generate JSON? In-Reply-To: <031A772A-198F-4CC4-88B2-F816ED585E1F@metaweb.com> References: <2f665fe20706131726s3d457e42kfc72ca7cfc4aba23@mail.gmail.com> <031A772A-198F-4CC4-88B2-F816ED585E1F@metaweb.com> Message-ID: <2f665fe20706140617u163c85baof401ee1e0650e174@mail.gmail.com> Thanks for the feedback guys, for the record: If you append ?callback=... to the trans url then you get the desired JSON object and callback. (Doh! Why didn't I just try that?) Example: http://www.freebase.com/api/trans/raw/%239202a8c04000641f8000000003e02ba7?callback=cb Nick has wrapped this very nicely in mjt.BlobGetTask So I think you'll agree that this version of the group lister looks much better: http://hamstersoup.com/freebase_private/projects/simple/Groups/groups.html regards, --Will From tim at metaweb.com Thu Jun 14 18:57:01 2007 From: tim at metaweb.com (Tim Kientzle) Date: Thu, 14 Jun 2007 11:57:01 -0700 Subject: [Developers] Changes to Freebase API. Message-ID: We're making some minor changes to the way we return status information in the Freebase HTTP API. The primary goal is to make the different API requests return JSON-structured information consistently, so that your code can retrieve error information more easily. The key changes are the addition of a new "code" field that provides more useful and consistent status information and some adjustments to the layout of the "messages" array. Many of you are probably using the "status" field in the outer envelope, which carries an HTTP-like status code. Generally, if the string value begins with "200", then the request succeeded, otherwise it failed. But HTTP status codes don't really provide enough information to distinguish a range of specific errors, so we're adding a new "code" field that contains a path-like string. That string will always begin with "/api/status/ok" or "/api/status/error". Check for one of those prefixes to tell whether a request succeeded or failed. Most error statuses will contain additional detail that you can use to determine the best way to handle this error. For example, the /api/ trans services will return "/api/status/error/trans/notfound" to indicate that a requested object was not found. Many of our existing APIs have a "messages" array. Unfortunately, these have been formatted somewhat inconsistently, so we're going to adjust our current APIs to make them more consistent. Each element of the "messages" array describes a single specific problem. For a form submission, for example, there can be a separate message for each submitted field. Generally, the first message will be the most important; if your UI only supports a single message, use that one. Each element of the "messages" array is itself a dictionary with at least two fields: * "message" is a free-form English-language description of a problem. This should be suitable for display to end users. * "code" is a status code similar to the "code" field in the outer envelope, though generally more specific. For example, some problems will elicit a simple "/api/status/error" in the outer envelope and each message dictionary will contain a more precise code for a single problem. We intend the code values to be useful as keys for looking up customized error messages. * Other fields may also appear, depending on context. We'll be updating our documentation soon to reflect these changes. In the meantime, feel free to ask questions on developers at freebase.com about any aspect of our API. These changes were deployed to sandbox.freebase.com on Monday, June 11, and should reach www.freebase.com later today. Tim Kientzle Metaweb Technologies, Inc. From jfry at metaweb.com Fri Jun 15 22:48:33 2007 From: jfry at metaweb.com (Jeff Fry) Date: Fri, 15 Jun 2007 15:48:33 -0700 Subject: [Developers] query for property with > 1 value? Message-ID: <46731741.3080002@metaweb.com> Hi, Is it possible to write a query for all topics of a type with > 1 value for a property (e.g. all people with > 1 DOB)? Thanks, Jeff From nix at metaweb.com Sat Jun 16 01:19:11 2007 From: nix at metaweb.com (Nick Thompson) Date: Fri, 15 Jun 2007 18:19:11 -0700 Subject: [Developers] mjt and the freebase api changes In-Reply-To: References: Message-ID: <46733A8F.4090908@metaweb.com> i've had reports that http://mjtemplate.org isn't up to date with the recent freebase api change, so the freebase examples there are broken. i'm hoping to push out mjt 0.5 on tuesday or wednesday, which will fix this issue as well as adding some nifty new features. in the meantime, i've uploaded the most recent development version of mjt.js to http://mjtemplate.org/dist/dev/mjt.js - it hasn't been through a full round of testing (and is probably broken on IE6) but it should work well enough on firefox. more next week! nick From altano at gmail.com Sat Jun 16 02:44:01 2007 From: altano at gmail.com (Norbauer Alan) Date: Fri, 15 Jun 2007 22:44:01 -0400 Subject: [Developers] Having trouble with a query Message-ID: I'm having trouble getting a query to work. I'm trying to search on the "Open Times" of retail locations without much luck. Despite the documentation saying that this is a "Date/Time", it doesn't appear to behave as such. For example, the following works: { "query":[{ "/business/retail_location/hours":[{ "hour_end":{ "value":null }, "weekday_start":"Saturday" }], "limit":4, "name":null, "sort":"name" }] } Meanwhile, the following doesn't: { "query":[{ "/business/retail_location/hours":[{ "hour_end":{ "value>=":"15:00" }, "weekday_start":"Saturday" }], "limit":4, "name":null, "sort":"name" }] } And neither does: { "query":[{ "/business/retail_location/hours":[{ "hour_end>=":"15:00", "weekday_start":"Saturday" }], "limit":4, "name":null, "sort":"name" }] } I'm trying to make heads or tails of all these braces and brackets and it's driving me nuts. Any help here? Relevant docs: Retail Location type: http://www.freebase.com/view/schema?id=% 2Fbusiness%2Fretail_location Open Times type: http://www.freebase.com/view/schema?id=%2Fbusiness% 2Fopen_times Date/Time type: http://www.freebase.com/view/schema?id=%2Ftype% 2Fdatetime ^^^^ The Date/Time documentation is quite perplexing... it appears to have nothing to do with a date or time? Thanks in advance, Alan From daepark at metaweb.com Sat Jun 16 03:00:38 2007 From: daepark at metaweb.com (Dae Park) Date: Fri, 15 Jun 2007 20:00:38 -0700 Subject: [Developers] Having trouble with a query In-Reply-To: References: Message-ID: When your using the constraints syntax (~=, <, >, <=, and >= operators) you must also ask for the thing that your constraining on. Try: { "query":[{ "/business/retail_location/hours":[{ "hour_end":null, "hour_end>=":"15:00", "weekday_start":"Saturday" }], "limit":4, "name":null, "sort":"name" }] } For more help on pattern matching and constraints: http://www.freebase.com/view/documentation/ch03.html#id2614666 -dae On Jun 15, 2007, at 7:44 PM, Norbauer Alan wrote: > { > "query":[{ > "/business/retail_location/hours":[{ > "hour_end>=":"15:00", > "weekday_start":"Saturday" > }], > "limit":4, > "name":null, > "sort":"name" > }] > } From jg at metaweb.com Sat Jun 16 06:54:54 2007 From: jg at metaweb.com (John Giannandrea) Date: Fri, 15 Jun 2007 23:54:54 -0700 Subject: [Developers] query for property with > 1 value? In-Reply-To: <46731741.3080002@metaweb.com> References: <46731741.3080002@metaweb.com> Message-ID: <3E61C73D-8700-4296-A0D9-8494BE6C7F2C@metaweb.com> Jeff Fry wrote: > Is it possible to write a query for all topics of a type with > 1 > value > for a property (e.g. all people with > 1 DOB)? Unfortunately I dont believe it is currently possible to do this. You can test for >0 properties with some value, but there is no easy way to count >=2 other than asking for limit:2 and post processing the result. -jg From will at hamstersoup.com Sat Jun 16 14:18:26 2007 From: will at hamstersoup.com (Will Moffat) Date: Sat, 16 Jun 2007 16:18:26 +0200 Subject: [Developers] mjt and the freebase api changes In-Reply-To: <46733A8F.4090908@metaweb.com> References: <46733A8F.4090908@metaweb.com> Message-ID: <2f665fe20706160718x2c1a180dv5324af2a372ff3cc@mail.gmail.com> Dear Freebase MJT users, On 6/16/07, Nick Thompson wrote: > i've had reports that http://mjtemplate.org isn't up to date with the > recent freebase api change If you are getting MJT Freebase withdrawal symptoms this weekend, here's the simple fix: In mjt.MqlReadRequest.prototype.response_handler Make this change: //if (sr.status == '/mql/status/ok') { //OLD if (sr.code == '/api/status/ok') { //NEW Or just override the whole function by copying the code below into in your own .js file. regards, --Will // // handle a query response. // do most of the work for all json callback handlers // mjt.MqlReadRequest.prototype.response_handler = function(o) { if (typeof(o) == 'string' && o == mjt._timeout_token) { mjt.task_timeout(this); } else { this.state = 'ready'; } // split result and notify all dependents for (var sqk in this.subqueries) { var sq = this.subqueries[sqk]; if (typeof(o) == 'string' && o == mjt._timeout_token) { sq.state = 'error'; sq._error_type = '/user/mjt/messages/script_timeout'; sq.messages = [{ type: '/user/mjt/messages/script_timeout', text: "browser could not contact the server", level: 'error' }]; } else { var sr = o[sqk]; if ('cursor' in sr) sq.next_cursor = sr.cursor; if ('messages' in sr) sq.messages = sr.messages; //if (sr.status == '/mql/status/ok') { //OLD if (sr.code == '/api/status/ok') { //NEW if (sr.result == null) { sq.state = 'error'; sq.messages = [{ type: '/user/mjt/messages/empty_result', text: "no results found", level: 'error' }]; } else { sq.result = sr.result; sq.state = 'ready'; } } else { sq.state = 'error'; sq._error_type = sr.status; mjt.debug && mjt.spew('mqlread failed', sq); } } //if (sq.state == 'ready' && sq.result == null) // sq.state = 'nomatch'; mjt.notify(sq); } }; From niallo at metaweb.com Mon Jun 18 23:28:53 2007 From: niallo at metaweb.com (Niall O'Higgins) Date: Mon, 18 Jun 2007 16:28:53 -0700 Subject: [Developers] Sandbox data refresh Message-ID: <46771535.4090209@metaweb.com> Hi, Weekly data refresh of sandbox.freebase.com happening over the next few minutes. -- Niall O'Higgins Software Engineer Metaweb Technologies, Inc. From niallo at metaweb.com Mon Jun 18 23:33:22 2007 From: niallo at metaweb.com (Niall O'Higgins) Date: Mon, 18 Jun 2007 16:33:22 -0700 Subject: [Developers] Sandbox data refresh In-Reply-To: <46771535.4090209@metaweb.com> References: <46771535.4090209@metaweb.com> Message-ID: <46771642.9020702@metaweb.com> Done. Niall O'Higgins wrote: > Hi, > > Weekly data refresh of sandbox.freebase.com happening over the next few > minutes. > > -- Niall O'Higgins Software Engineer Metaweb Technologies, Inc. From arto.bendiken at gmail.com Tue Jun 19 08:17:36 2007 From: arto.bendiken at gmail.com (Arto Bendiken) Date: Tue, 19 Jun 2007 10:17:36 +0200 Subject: [Developers] Regarding library naming Message-ID: <47fe11b70706190117l3e85c593p9a79fa9b5c12274f@mail.gmail.com> I'm developing libraries to access Freebase in Scheme and Ruby, and am wondering about nomenclature; specifically, whether to name the packages 'metaweb' or 'freebase'. The developer guide does have a brief note about Metaweb vs Freebase right on the introduction page, and the way the examples are named (metaweb.py, metaweb.js, etc) would certainly indicate that the "Metaweb API" would be the preferred name, even more so if Freebase doesn't end up being the only public instantiation of the technology. However, given that this is your company name as well, I wanted to explicitly seek a blessing on the matter before going off publishing publicly available third-party libraries that use your name. So: do you guys have any objections to developers naming Metaweb API libraries generically after Metaweb instead of specifically after Freebase? -- Arto Bendiken | http://bendiken.net/ From jg at metaweb.com Tue Jun 19 16:40:27 2007 From: jg at metaweb.com (John Giannandrea) Date: Tue, 19 Jun 2007 09:40:27 -0700 Subject: [Developers] Regarding library naming In-Reply-To: <47fe11b70706190117l3e85c593p9a79fa9b5c12274f@mail.gmail.com> References: <47fe11b70706190117l3e85c593p9a79fa9b5c12274f@mail.gmail.com> Message-ID: <83C92BDA-F0D9-4C8F-BD34-DBC2FAFF5108@metaweb.com> Hi metaweb is an appropriate name for the API. You have our blessing :-) -jg On Jun 19, 2007, at 1:17 AM, Arto Bendiken wrote: > I'm developing libraries to access Freebase in Scheme and Ruby, and am > wondering about nomenclature; specifically, whether to name the > packages 'metaweb' or 'freebase'. > > The developer guide does have a brief note about Metaweb vs Freebase > right on the introduction page, and the way the examples are named > (metaweb.py, metaweb.js, etc) would certainly indicate that the > "Metaweb API" would be the preferred name, even more so if Freebase > doesn't end up being the only public instantiation of the technology. > > However, given that this is your company name as well, I wanted to > explicitly seek a blessing on the matter before going off publishing > publicly available third-party libraries that use your name. > > So: do you guys have any objections to developers naming Metaweb API > libraries generically after Metaweb instead of specifically after > Freebase? > > -- > Arto Bendiken | http://bendiken.net/ > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers From robert at metaweb.com Tue Jun 19 16:43:52 2007 From: robert at metaweb.com (robert cook) Date: Tue, 19 Jun 2007 09:43:52 -0700 Subject: [Developers] Regarding library naming In-Reply-To: <47fe11b70706190117l3e85c593p9a79fa9b5c12274f@mail.gmail.com> References: <47fe11b70706190117l3e85c593p9a79fa9b5c12274f@mail.gmail.com> Message-ID: <50EAA68A-72ED-48E5-BDFA-50C7BAC4B3E5@metaweb.com> Arto -- Metaweb is the technology and the platform, whereas Freebase is an application and a data set on that platform. More succinctly -- there is not a Freebase API. Metaweb would be the right name to use in this case. Robert On Jun 19, 2007, at 1:17 AM, Arto Bendiken wrote: > I'm developing libraries to access Freebase in Scheme and Ruby, and am > wondering about nomenclature; specifically, whether to name the > packages 'metaweb' or 'freebase'. > > The developer guide does have a brief note about Metaweb vs Freebase > right on the introduction page, and the way the examples are named > (metaweb.py, metaweb.js, etc) would certainly indicate that the > "Metaweb API" would be the preferred name, even more so if Freebase > doesn't end up being the only public instantiation of the technology. > > However, given that this is your company name as well, I wanted to > explicitly seek a blessing on the matter before going off publishing > publicly available third-party libraries that use your name. > > So: do you guys have any objections to developers naming Metaweb API > libraries generically after Metaweb instead of specifically after > Freebase? > > -- > Arto Bendiken | http://bendiken.net/ > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers From nix at metaweb.com Wed Jun 20 00:14:42 2007 From: nix at metaweb.com (Nick Thompson) Date: Tue, 19 Jun 2007 17:14:42 -0700 Subject: [Developers] mjt and the freebase api changes In-Reply-To: <2f665fe20706160718x2c1a180dv5324af2a372ff3cc@mail.gmail.com> References: <46733A8F.4090908@metaweb.com> <2f665fe20706160718x2c1a180dv5324af2a372ff3cc@mail.gmail.com> Message-ID: <46787172.3070500@metaweb.com> i made this change on mjtemplate.org/dist/mjt-0.4/mjt.js so people linking to that should be up and running again. mjt 0.5 coming soon. thanks will! nick Will Moffat wrote: > Dear Freebase MJT users, > > On 6/16/07, Nick Thompson wrote: >> i've had reports that http://mjtemplate.org isn't up to date with the >> recent freebase api change > > If you are getting MJT Freebase withdrawal symptoms this weekend, > here's the simple fix: > > In mjt.MqlReadRequest.prototype.response_handler > > Make this change: > //if (sr.status == '/mql/status/ok') { //OLD > if (sr.code == '/api/status/ok') { //NEW > > Or just override the whole function by copying the code below into in > your own .js file. > regards, > --Will > > > // > // handle a query response. > // do most of the work for all json callback handlers > // > mjt.MqlReadRequest.prototype.response_handler = function(o) { > > if (typeof(o) == 'string' && o == mjt._timeout_token) { > mjt.task_timeout(this); > } else { > this.state = 'ready'; > } > > // split result and notify all dependents > for (var sqk in this.subqueries) { > var sq = this.subqueries[sqk]; > > if (typeof(o) == 'string' && o == mjt._timeout_token) { > sq.state = 'error'; > sq._error_type = '/user/mjt/messages/script_timeout'; > sq.messages = [{ > type: '/user/mjt/messages/script_timeout', > text: "browser could not contact the server", > level: 'error' > }]; > } else { > var sr = o[sqk]; > > if ('cursor' in sr) > sq.next_cursor = sr.cursor; > > if ('messages' in sr) > sq.messages = sr.messages; > > //if (sr.status == '/mql/status/ok') { //OLD > if (sr.code == '/api/status/ok') { //NEW > if (sr.result == null) { > sq.state = 'error'; > sq.messages = [{ > type: '/user/mjt/messages/empty_result', > text: "no results found", > level: 'error' > }]; > } else { > sq.result = sr.result; > sq.state = 'ready'; > } > } else { > sq.state = 'error'; > sq._error_type = sr.status; > mjt.debug && mjt.spew('mqlread failed', sq); > } > } > > //if (sq.state == 'ready' && sq.result == null) > // sq.state = 'nomatch'; > mjt.notify(sq); > } > }; From daepark at metaweb.com Fri Jun 22 08:33:19 2007 From: daepark at metaweb.com (Dae Park) Date: Fri, 22 Jun 2007 01:33:19 -0700 Subject: [Developers] mjt.for Message-ID: Feature request: Can you extend mjt.for="k,v in object" to arrays as well, like jQuery's $.each(array, function(i,n){})? -dae From nix at metaweb.com Fri Jun 22 17:21:41 2007 From: nix at metaweb.com (Nick Thompson) Date: Fri, 22 Jun 2007 10:21:41 -0700 Subject: [Developers] mjt.for In-Reply-To: References: Message-ID: <467C0525.40002@metaweb.com> this should already work for javascript's built-in Array. jQuery result sets aren't true arrays though, which might be what you're seeing? the next release will treat jQuery "arrays" as Array for mjt.for= iteration purposes. if there other pseudo-Array objects that should behave like arrays in mjt.for=, i can hopefully add them too... nick Dae Park wrote: > Feature request: > > Can you extend mjt.for="k,v in object" to arrays as well, like jQuery's > $.each(array, function(i,n){})? > > -dae From alecf at metaweb.com Fri Jun 22 18:57:38 2007 From: alecf at metaweb.com (Alec Flett) Date: Fri, 22 Jun 2007 11:57:38 -0700 Subject: [Developers] mjt.for In-Reply-To: <467C0525.40002@metaweb.com> References: <467C0525.40002@metaweb.com> Message-ID: <467C1BA2.1090606@metaweb.com> I think part of the problem is that a number of DOM arrays are only psuedo-Arrays as well. try this in firebug: > >> for (var k in document.childNodes) { console.log(k, " = ", x[k]) } 0 = 1 1 = 2 length = 3 item lovely, eh? IE behaves a little differently too I believe... Alec Nick Thompson wrote: > this should already work for javascript's built-in Array. > jQuery result sets aren't true arrays though, which might be > what you're seeing? > > the next release will treat jQuery "arrays" as Array for > mjt.for= iteration purposes. if there other pseudo-Array > objects that should behave like arrays in mjt.for=, i can > hopefully add them too... > > nick > > Dae Park wrote: > >> Feature request: >> >> Can you extend mjt.for="k,v in object" to arrays as well, like jQuery's >> $.each(array, function(i,n){})? >> >> -dae >> > _______________________________________________ > 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/20070622/d3fe3031/attachment.html From niallo at metaweb.com Tue Jun 26 00:04:19 2007 From: niallo at metaweb.com (Niall O'Higgins) Date: Mon, 25 Jun 2007 17:04:19 -0700 Subject: [Developers] Weekly sandbox refresh Message-ID: <20070626000419.GC31482@digdug.inet> Hi, Updating data and software on http://sandbox.freebase.com over the next few minutes. -- Niall O'Higgins Software Engineer Metaweb Technologies, Inc. From niallo at metaweb.com Tue Jun 26 00:39:09 2007 From: niallo at metaweb.com (Niall O'Higgins) Date: Mon, 25 Jun 2007 17:39:09 -0700 Subject: [Developers] Weekly sandbox refresh In-Reply-To: <20070626000419.GC31482@digdug.inet> References: <20070626000419.GC31482@digdug.inet> Message-ID: <20070626003909.GE31482@digdug.inet> Update complete. On Mon, Jun 25, 2007 at 05:04:19PM -0700, Niall O'Higgins wrote: > Hi, > > Updating data and software on http://sandbox.freebase.com over the next few minutes. > > -- > Niall O'Higgins > Software Engineer > Metaweb Technologies, Inc. > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers -- Niall O'Higgins Software Engineer Metaweb Technologies, Inc. From niallo at metaweb.com Tue Jun 26 23:35:55 2007 From: niallo at metaweb.com (Niall O'Higgins) Date: Tue, 26 Jun 2007 16:35:55 -0700 Subject: [Developers] www.freebase.com software update Message-ID: <20070626233555.GC12616@digdug.inet> Hi, Updating the software on www.freebase.com over the next few minutes. -- Niall O'Higgins Software Engineer Metaweb Technologies, Inc. From niallo at metaweb.com Wed Jun 27 00:11:53 2007 From: niallo at metaweb.com (Niall O'Higgins) Date: Tue, 26 Jun 2007 17:11:53 -0700 Subject: [Developers] www.freebase.com software update In-Reply-To: <20070626233555.GC12616@digdug.inet> References: <20070626233555.GC12616@digdug.inet> Message-ID: <20070627001153.GF12616@digdug.inet> Update complete. On Tue, Jun 26, 2007 at 04:35:55PM -0700, Niall O'Higgins wrote: > Hi, > > Updating the software on www.freebase.com over the next few minutes. > > > -- > Niall O'Higgins > Software Engineer > Metaweb Technologies, Inc. > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers -- Niall O'Higgins Software Engineer Metaweb Technologies, Inc. From nix at metaweb.com Wed Jun 27 21:56:06 2007 From: nix at metaweb.com (Nick Thompson) Date: Wed, 27 Jun 2007 14:56:06 -0700 Subject: [Developers] mjt 0.5 is released Message-ID: <4682DCF6.6080303@metaweb.com> Mjt 0.5 has been released: for more info see http://mjtemplate.org/ This release has plenty of new features and examples: mjt.else and mjt.elif attributes when combined with mjt.if, these attributes eliminate many cumbersome uses of mjt.choose. mjt.on* event handlers Mjt provides handler attributes like mjt.onclick, mjt.onsubmit, etc. Unlike the usual DOM event handlers, the event body is compiled within the current lexical scope. mjt.for creates a new variable scope This is done by wrapping the body in a javascript function() {...} declaration. This results in the variable capture semantics that most people expect when writing event handlers. mjt.run() does the right thing without arguments If mjt.run() has no arguments, it will implicitly treat the element as a template, compile it, and replace it. This removes the tedious
...
boilerplate from every mjt page. mjt.run() has several other arguments that allow you to run templates that were declared previously, rather than compiling and expanding in-place. This allows more dynamic apps. mjt.attrs lets you dynamically add attributes to the generated html using a Javascript expression. examples are Valid XHTML + Mjt The examples now validate against mjt.rnc and xhtml.rnc, using James Clark's nxml-mode. experimental: support for including mjt using an inline