Discussions on Developer Support
Start a New Discussion
-
-
-
-
Hello,
I have created a topic Concert and on its description I have added html code with a youtube video code about that concert, but I see a problem, in "edit section" I can see the video, but in the "view section" I can't. How could I see a youtube video about a topic in the Freebase view section?
Regards
-
We strip out html that you include in a description. You can use the WYSIWYG controls of the editor to add some formatting to your description, but video is not one of the things that are allowed.
If you want to add a video for a topic, you can add it in the weblinks section, located on the right of the edit page, below the image: http://www.freebase.com/edit/topic/guid/9202a8c04000641f800000000fd8bd57
-
-
-
Hello, I have been using Freebase lately and I wonder how could I put a value (URL) in a property of type "Weblink" and "Weblink with title field", since I have created several of those properties, but when I am editing a topic with that property I can't see its type.
Can you help me please?
Regards
-
Properties with these expected types are displayed in the "Weblinks" box in the right sidebar of the topic page. When you add a value to the weblinks section, you can select the property in the "type" menu.
-
Thanks, but how could I to have a link in the topic view? for example in the view: http://www.freebase.com/view/en/mariana_gurkova
I would like to have a link to youtube video. This is possible? could I have a topic with a link in a topic view?
Regards
-
-
-
Hi,
I ran a few queries in the MQL editor and I noticed that most of the contents that are returned are truncated. Say for example I tried querying information in general ("/common/topic/article") about location "Nottingham", the contents that were returned are not the full paragraph. I understand that the 'trans blurb' service only picks out text in the
tags and gets rid of the html tags but will that cause the content to be truncated ? Is there a way to get the full content ?
Thanks
-
Hi, the blurb service has a ?maxlength option which is 200 characters by default. More info in the docs.
-
but it also looks like we don't actually store the entire Wikipedia entries since the 'raw' service is also returned truncated entries: http://www.freebase.com/api/trans/raw/guid/9202a8c04000641f800000000001daf5
If this isn't enough, I suggest posting your problem (with example urls) to the developers mailing list. The developers responsible for the wikipedia loads hang out there.
-
Hi Will,
I forgot to mention that I did explicitly set the maxlength to something like 10000 bytes but that didn't help either.
I'm guessing the full content is not available on Freebase ?
With the example above on hamsters, the article content ends with the sentence "Pet Syrian hamsters are descended..." followed by a link to read the full article on Wikipedia.
Thanks once again for your assistance.
-
-
-
Hello, I have been trying out the Python API for Freebase and exploring the service as a whole. It's a fantastic service. Fantastic resource for developers. Thank you! Here's my question: Is it possible to create private topics that are only available to a single user or several users? I ask because I am partnering with museums who, although they eventually want to get their licensed content into Freebase, are not yet ready to take that big a step. I would love to use Freebase as a storage facility for them, integrating it with other information systems, and later on it will be easy to open up the topics for public access and editing. I understand why philosophically and technically you would want to avoid "private" topics, however I also know it would add enormous value for those in my situation, who are trying to advocate the "opening up" of institutionalized content via services like Freebase. Otherwise, if you can suggest other ways of safeguarding or adding legal protection to topics , which might appeal to a museum, I would love to learn more. Thoughts appreciated. Jonah Model Designer/Developer jonah@nfold.org
-
-
-
hi, I am downloading the films base. Its some 300,000 entries. As I download them into my app I encounter exceptions (stuff I can debug). However, I have to restart my download app from the begining after every patch (I guess I'm unit testing). Is there a way I can query (through mql) to fetch from where I left off? My process has already exited at this point so it gets complicated. I appreciate any pointers.
-
There appear to be less than 80,000 films (/film/film) in the database. Where are you getting 300,000 from?
The answer to your question really depends on what library you are using and how you're processing the results, but one of the easier ways to skip ahead is to use the "page" envelope parameter. As far as I can tell this parameter still isn't documented, but if you look at the Query Editor, you can figure out how it works. If you're currently using the "cursor" parameter, switch to "page" instead. If you're using something like the Python library's mqlreaditer, you'll probably need to switch to managing your own paging (it does it internally). Alternatively, you could modify your query to exclude the piece you've already processed (e.g. sort them by release date and exclude ones before/after a certain date), but you always risk introducing a different unrelated bug with that type of modification.
-
Hey Tom, Thanks for the reply. I probably have the number wrong. I am using the python lib. Can you tell me how to manage my own paging in that context? Thanks again.
-
Just pass the envelope parameter to mqlread with the page parameter set correctly:
myEnvelope = {'page':page} result = session.mqlread([myQuery],myEnvelope)
-
-
-
I have worked with javascript before, nothing too intensive. I thought I would learn how to work with Acre. I worked through some of the tutorials and they seem fine. What I've learned deals little with what I wish to do. I think I get the whole querying and text replacing thing. I do not see how to incorporate javascript. I tried looking at other code and all I see are includes when it comes to javascript. Can an Acre script variable be used in javascript in any way? Do I write my Acre sript as if it were javascript? I dont get it.
-
The first thing you need to understand, which I don't think is at all obvious, is that there are two different Javascript environments running in two different contexts -- the Acre server and the user's browser. An Acre script is Javascript, but it's running on the server, not the user's web browser.
You can include scripts in-line by using the
-
An acre server-side variable can be used by a client JS script just by referring to it using the $ syntax.
Here's a simple example: http://acre.freebase.com/#app=/user/masouras/play&file=client_js_example
The recipe 'Pass a Javascript Object on The Server Side to The Client Side' is also useful if you want to pass more complex data structures around:
-
There's also a useful video on Acre here: http://www.freebase.com/apps
-
-
-
It appears that yahoo pipes cannot handle items labeled with slashes (/architecture/structure/address for example). I realize this is a shortcommng on yahoo's part, but I was wondering if there is a way around this. Such as ... Is it possible to rename such items (to architecture:structure:address for example)?
-
You can't escape slashes?
Or use something like this example? http://pipes.yahoo.com/pipes/docs?doc=operators#Regex
or:
http://www.kiesler.at/index.php?module=wiki&page_op=raw&page=YahooPipesRegex&lay_quiet=1
http://brooksbayne.wordpress.com/2009/01/11/using-regular-expressions-with-yahoo-pipes/
-
Forgive me for not knowing the correct terminology here ... it is the name of the items and not the content. Pipes debugger displays the items ok but refuses to work with them in any way. As far as I know the only modules in Pipes that manipulate the names of the items are the Item Builder/RSS Item Builder and the Rename Operator. Neither one of those modules would recognize the items inputted. Here is a link to the pipe if that will help:
http://pipes.yahoo.com/paulspipes/9980d338e99794b9fb3d31cbba289670
-
MQL does not offer any functionality for manipulating the results in such a way. However, you can fairly easily add this functionality by using a layer of code on top of your query to traverse the resulting JSON data structure and replace the "/" characters in all the keys and values it find.
You can use Acre, the freebase development platform, to do this easily: http://www.freebase.com/apps
(check out the video on the right)
-
I think you need a Pipes expert to help you out here. Have you asked the Yahoos?
If you're going to go the Acre route, have a look at Art van Hoff's RSS app. It's so old that it's been broken by Acre changes, but I repaired the most obvious problems and put a copy at http://rss-copy.tfmorris.user.dev.freebaseapps.com/ The Google Maps won't work since the API key is bound to the web site address which is different, but there should be enough there for you to quickly figure out how to generate a GeoRSS feed.
-
-
-
-
Hello, I would like to develop an application in the ACRE Platform, but I need to start developing with Freebase client code because I just want to include an audio/video player, modify the theme, and some other stuff in a Base that I have created in Freebase.com and I find it very hard to start developing from zero, it's a lot of work. My question is: Is this posible? Could I use the option "Clone an existing app" in the Acre App Editor to get the code of web client Freebase? Please, if you could help me I would be grateful. Thanks in advance. Regards
-
The Freebase web client isn't open source licensed. Jason Douglas was playing with an Acre based clone a while back, but I don't know what the status is. You could try poking around in http://www.freebase.com/apps/directory/user/jdouglas. Everything there is supposed to be BSD licensed.
-
-
-
I have created a query that returns a long list of cities. I would like to use these results to query a topic that is 'contained by' these cities. I can do this relatively easy through programming by creating a query for each city. Each one of these queries would probably only return a couple/few items. I am wondering what the policy is concerning this. Is it not cool to run this many queries in a short time? Is it ok because the quantity of returns will not be relatively high? Is there a way to include one query to match a property of another query?
-
There's no specific restriction on query rate as far as I know, but it benefits everyone to be as efficient with queries as possible.
MQL is pretty powerful, so there's probably a way to collapse things and get all the information that you need in a single query, unless you're doing something quite exotic. One thing you can do, which you might not be aware of, is to request linked properties in a single query,
For example, you could do
"type":"city", "name":"Boston", "mayor" : {"birthplace" : {"geolocation":{"longitude":null"}}}to get the longitude of the mayor's birthplace for all cities named Boston. (Those are made up property names, so this query is just for illustration purposes and won't actually run)
-
-
-
I tried to use the mql_filter with Suggest, but I can't even get the basic example from the tutorial working; Suggest simply returns no results. Is there some detail I am missing? $("#ent_exp") .suggest({ type: '/music/album', mql_filter: [{"artist": [{"id": "/en/carly_simon"}]}] });
-
Sorry about that, the example is wrong. It should use the fully qualified property name: /music/album/artist $("#ent_exp").suggest({type: '/music/album', mql_filter: [{"/music/album/artist": [{"id": "/en/carly_simon"}] }] })
Example 5 in the docs is correct. I've removed the incorrect example in the next version of the docs. Thanks!
-
Thanks!
Here is another question that I could not find in the documentation for Suggest: Is it possible to do a compound mql_filter.
For example, could I ask for the albums from carly_simon OR janet_jackson?
-
That should work if you use
id!=[id1,id2]Here's a link to the != operator docs.
-
Sorry, that should be
|= -
Perfect! Thank you so much for your help.
When using this method for Suggest, I noticed (and saw it noted in your docs) that using mql_filter impacts performance considerably. My goal is to find actors whether they were in film or television, but it looks like this would be prohibited because the types are exclusive (/film/actor & /tv/tv_actor) so I would not be able to use the filter in the same way.
Should I create a new base with type "performance" (for example) and combine the two types of data programatically in my own base?
-
Yes you can specify multiple type ids (or even names) to the type parameter. But also, the type_strict parameter works in conjunction with the type parameter. {"type": ["/film/actor", "/tv/tv_actor"], "type_strict": "all"} should only match on topics that are both film AND tv actors, where as when type_strict = "any" matches topics that are either film OR tv actors.
-
Thank you both for your reply. I have done both types of queries, but my question is Suggest-specific. I hope I can clarify.
I understand that I can use mqlfilter_ to provide a union of music artists. For example:
// Both Jewel & Leona Lewis have an album named "Spirit" $("#ent_exp") .suggest({ type: '/music/album', mql_filter: [{"/music/album/artist": [{"id|=": ["/en/leona_lewis", "/en/jewel"]}] }] });This works because both Jewel and Leona are of type /music/album/artist. However, I'd like to list all the films OR TV shows that Brad Pitt was in. I know that I can list any films or TV shows like this:
// Any film or TV show $("#ent_exp") .suggest({ type: ['/film/actor', '/tv/tv_actor'], type_strict: 'any' });But when I try to constrain it to Brad Pitt, I'm not sure of the syntax, or if it's possible because Brad Pitt is of a different type depending on film or TV:
// Brad Pitt films or TV shows $("#ent_exp") .suggest({ type: ['/film/film', '/tv/tv_program'], mql_filter: [{"/film/actor": [{"id": "/en/brad_pitt"}] OR {"/tv/tv_actor": [{"id": "/en/brad_pitt"}]}] // I know this syntax is wrong }); -
I do not think you can do this in one MQL query. Please refer to "3.6.5. Expressing AND, OR, and NOT in MQL" selction in the MQL Reference
-
-
-
I'm working with the freebase datadump now and I'm particulary interested in the aliases of an entity. From what I understand, this information is found in the /Common/Topics.tsv file. That file has an Alias column where for example Bill Gates has the following entry: William H Gates,William Henry Gates,William H. Gates III,William H. Gates,William Henry Gates III Looks like a comma-separated list, which is great, until you have a look at "Otter Creek Township", which has the following entry in the alias column: Otter Creek Township, Jersey County, Illinois The problem is that the entry above is only one alias containing comma-characters. Is there anyway that I can separate the two entries, or will I not be able to extract alias from the dump? thanks Bjorn
-
-
-
I just downloaded the freebase wex dump, and since I'm working from Stockholm, my first test case was "Stockholm". The GUID for "Stockholm" in freebase.com is "9202a8c04000641f8000000000034f98", however, when I compare that to the GUID in the wex dump, it refers to a completely different entity : "Kungliga tennishallen" (royal tennis coart) How can this be?? Isn't the whole idea behind the freebase data model that one guid always will referr to the same entity? Any help or explanation is appreciated. Thanks.
-
There have been a number of issues with the pipeline that reconciles Wikipedia articles with Freebase topics in the past, particularly to do with articles which have been merged and split multiple times. I believe the Stockholm topic has been affected by this issue.
A new version of this pipeline has recently been rolled out which should have fixed most of these issues, so the live data you'll see on freebase.com will be from this pipeline. However, the WEX dumps are older than the new pipeline, so you'll see the incorrect data there.
Hope this helps.
-
I don't think any problems with IDs should affect the stability of Freebase GUIDs. Having said that, I believe the original poster was refering to the dump which is described as "a processed dump of the English language Wikipedia." (emphasis added).
WEX (or something very similar to it) is an input to Freebase, so any GUIDs that it uses are disjoint from Freebase's. Of course, the IDs aren't really as "globally unique" as they might be if there's overlap between the ID spaces of Freebase and Wex.
If you were to work with the actual Freebase data dumps (The Freebase Wikipedia Extraction (WEX) is a processed dump of the English language Wikipedia), the IDs should match up (and it's bug if they don't).
-
-
-
I've just started using Freebase Suggest and was wondering how the calls are calculated. I did not have to sign up for an API ID to use the plugin. Is it based on IP address?
For example, if I have an application hosted on App Engine that uses your API, does each user of my app get 100,000 calls, or does my domain rack up the calls?
Also, does each event fire a call? For example, if I type "the" does each keydown register so that this is 3 calls, or is it 1 call?
Thanks!
-
-
-
We are developing application on tcl (http://www.tcl.tk), and consider option of integration with your database. But we need API-library for tcl. Is it possible for you to release such library?
-
-
-
What I'm trying to do is identify keywords that are strongly associated with a geographic location (for example: San Francisco). Now, there's the San Francisco view page, which contains quite a bit of the information that I want, but not all. Furthermore, I want to get all this data for an arbitrary region (Silicon Valley or Greater Los Angeles, for example). Now, this is the sort of info I want to gather: names of cities/towns, neighborhoods, tourist destinations, transit info (like from the SF view page) names of schools/colleges/universities, companies & organizations headquartered there names of persons in the news (politicians, celebrities, captains of industry) but not statistics like population, or every taco stand, copy shop, bong vendor etc in the vicinity My final use for this is just a long list of words that will be used to filter other data to identify regional items. incidentally, I've been doing quite a bit of editing on companies (trying to clear up whether a company is still active for the purposes of the headquarters bit), updating various entities "containedby" info and other incidental tweaks. Hopefully I'm doing it right. Here's how I was getting a list of all the towns in the SF Bay Area and trying to not get every dogpatch, trailer park, campground or hobo camp therein. [{ "!pd:/location/location/contains": [{ "id": "/en/san_francisco_bay_area" }], "name": null, "type": "/location/us_county", "/location/location/contains": [{ "type": "/location/citytown", "name": null, "id": null }] }] I'd prefer not to have to have a different query for every wad of data I want but I also realize that this is quite a bit of data. Here's another example that finds Stanford, but not UC Berkeley: http://bit.ly/b8ild (it's a full permanent link to a Query page). It's also really messy Suggestions? I have some other, related questions. Separate post for those, though.
-
Here's the formatted code, I didn't see the Markdown business before posting…
[{ "!pd:/location/location/contains": [{ "id": "/en/san_francisco_bay_area" }], "name": null, "type": "/location/us_county", "/location/location/contains": [{ "type": "/location/citytown", "name": null, "!sv0:/location/mailing_address/citytown": [{ "!sv0:/business/company/headquarters": [{ "optional": true, "name": null }] }], "!sv1:/location/mailing_address/citytown": [{ "!sv0:/organization/organization/headquarters": [{ "optional": true, "name": null }] }], "!sv2:/location/mailing_address/citytown": [{ "!sv0:/education/educational_institution/address": [{ "optional": true, "name": null }] }] }] }] -
In fact, the entire post looks like a mud fence.
What I'm trying to do is identify keywords that are strongly associated with any arbitrary location (for example: San Francisco, Silicon Valley or Greater Los Angeles).
Now, there's the San Francisco view page, which contains quite a bit of the information that I want, but not all. This is the sort of info I want to gather: names of : * cities/towns containedy * neighborhoods containedby * tourist destinations associated witth * cities/towns containedy * neighborhoods containedby * tourist destinations associated with * transit info (like from the SF view page) associated with * names of schools/colleges/universities located there * companies & organizations headquartered there * names of persons in the news (politicians, celebrities, captains of industry) but not * statistics like population * names of every: * taco stand * copy shop * bong vendor * dogpatch * trailer park * campground * hobo camp
My final use for this is just a long list of words that will be used to filter other data to identify regional items.
Incidentally I've been doing quite a bit of editing on companies (trying to clear up whether a company is still active for the purposes of the headquarters bit), updating various entities "containedby" info and other incidental tweaks. Hopefully I'm doing it right.
I'd prefer not to have to have a different query for every wad of data I want but I also realize that this is quite a bit of data. Here's another example that finds Stanford but not UC Berkeley: http://bit.ly/b8ild (it's a full permanent link to a Query page). It's also really messy
Suggestions? I have some other related questions. Separate post for those though.
-
* names of : * cities/towns containedy * neighborhoods containedby * tourist destinations associated witth * cities/towns containedy * neighborhoods containedby * tourist destinations associated with * transit info (like from the SF view page) associated with * names of schools/colleges/universities located there * companies & organizations headquartered there * names of persons in the news (politicians, celebrities, captains of industry) * but not * statistics like population * names of every: * taco stand * copy shop * bong vendor * dogpatch * trailer park * campground * hobo camp -
There seems to be two parts in you problem:
identify the entity you want data about (e.g. San Francisco)
getting the relevant data you want for that entity
For the first problem, a simple solution would be to use the name of the location you want when you do a query. For example:
[{ 'name' : 'San Francisco', 'type' : '/location/location'}]will match the san francisco topic.
The properties /location/contains and /location/contained_by can help you navigate the georgraphic hierarchy. Note that the 'contains' property of a given location does not include all the locations that are contained but the immediate descendants. You have to walk that tree on your own using MQL.
For the second problem, once you have the location you want, you can use MQL to get the specific additional properties that you wish. For example, this query: http://tinyurl.com/lblnx3 will give you all the locations contained within san francisco. You can add as many properties you want in the same query, so you don't have to do a different query for every property.
An alternative approach to what you are doing is to use our geo service to get your proximity data: http://www.freebase.com/docs/geosearch
This service also takes mql as parameters so that you can ask it 'Give me all the museums close to San Francisco for example'.
-
Thanks, but I can DO that already...
My embedded example was my attempt to do the first part, that is determine all the locations I was interested in (it does find all the counties in the SFBA and each of the cities each county contains. Then using the address city/town, I was trying to find corporations, organizations and schools, but it doesn't do a very good job.
That's what I need help with.
-
If you take out the "optional":true lines, you should get only the Company, Organization, and Educational Institution types returned, rather than all addresses.
-
-
-
Given the following query, how do I get the content of the article? [{ "type": "/base/usnris/nris_listing", "limit": 1, "/common/topic/article": [{}] }]
-
You need to use a separate API end point, the trans service. http://www.freebase.com/docs/mql/ch04.html#transservice (Yes, I know it's not a very mnemonic name. Don't blame me!)
-
-
-
hi there, i need a sample mql to list all genres under film_genre. For instance, the result would have "Anime", "Thriller", etc. Thanks
-
Try this. Hope this helps!
-
-
-
Hi, I'm trying to understand how and if it is possible to get a list of all the items changed in a type. To be clearer: with
[{ "name": null, "timestamp": null, "type": "/film/film" }]
I get a list off all movies and their relative timestamp i.e their CREATION date.
What I'm trying to do is to get a similar list but with an UPDATE/LAST EDITED date, so that I can select all movies, for instance, whose info, any info have been updated since last month. As far I've understood, you can get the timestamp of any action done over a link between facts quite easily
For instance:
[{ "name": null, "timestamp": null, "type": "/film/film", "genre": [{ "name": null, "index": null, "sort": "-index", "limit": 1, "link": [{ "timestamp": null }] }] }]
should get the latest date of a link action, i.e an UPDATE date on the genre property
Thus,
[{ "name": null, "timestamp": null, "type": "/film/film", "genre": [{ "name": null, "limit": 1, "link": [{ "timestamp": null, "timestamp>": "2008" }] }] }]
should give me all movies whose genre info have been UPDATED since 2008
But if the name of the movie, or an actor, etc have been changed while the genre does not, a query like the previous has no use as it will track only the "genre" changes. And I do not think I should query all the properties of the film type to check if there have been updates. It will be a nightmarish query and a sure performance disaster.
On a hopeful note I see that items (in the freebase interface) do have on the top right a box were you are shown both the CREATED ON date and the LAST EDITED ON date. Thus I believe that it is possible ...
Can somebody point me in the right direction?
Thanks
-
You'll need to use some of the more advanced capabilities of MQL to do this kind of thing. A query along the lines of this will give you the most recently updated links from any /film/film topic (I've just realised you'll have to extend the query a bit to get deletions of links as well). If you then repeat that query with the "type":"/film/film" clause in the target clause rather than the source clause, you'll get all links made to /film/film topics.
That leaves values, which may be harder. For a specific topic, you can use /type/reflect/* pseudoproperties (see section 3.7.3 of the MQL Reference Guide), but I can't see a way of doing that for all /film/film topics.
-
-
-
Hey, is there a generic way to differentiate between things that have the same name and the same type? take for example The Italian Job and Ocean's Eleven, both have remakes, how can I know which is the original and which is the remake? in freebase search web service sometimes the remake has a year attached to it but other times the original has. my question is not just about movies, it's about anything with the same type and the same name. thanks in advance.
-
I think this is a domain-specific question, the answer to which will vary with what you're looking at. In the case of Ocean's Eleven, the remake is flagged as being adapted from the original. The same is (now) true of the Italian Job as well.
In other cases, say this book and this book, there is no connection between the two. I'm not sure what sort of answer you're looking for here.
-
I think adaption and adapted work are your best bet.
The namesake and name source types might also be useful for things named after something else.
-
There are certain properties in each type that are marked as disambiguators - which is exactly what you want. The freebase suggest (this is the drop-down that tries to auto-complete your input in the search box) flyout is supposed to show you those properties, so if you are hovering over an item in the returned list, you should be able to see the difference.
Of course this will only work if these propertiesare filled out. In the case they are not, your last resort is to look at any wikipedia or other external links that are attached to them.
-
-
-
My query, simplified, is:
"id" : "/en/whatever",
"artist" : [{ "name" : null }]
I get an error with the message:
"Type /type/object does not have property artist"
Obviously, I could specify the type to be /music/album, but I'm running an app here so the type isn't always an album, and I'd rather not use an additional query to get the type beforehand for performance reasons.
Is there someway to query for the artist property when applicable, and have the API ignore that property request when it's not applicable (like when I'm querying for a film)?
Thanks so much.
-
-
-
I was wondering if there is a way to get Freebase Suggest to return types, except ones in the /user/* and /base/* domains. I've tried: $('#searchtype').suggest({"type":"/type/type"}) to restrict the search to types, but is there a way to filter it further? Thanks!
-
$("#searchtype").suggest({
type:"/type/type",
mql_filter:[{
"/type/type/domain": {
"key": [{"namespace": "/"}]
}
}]
})should get you what you want.
-
Thanks for your help! It worked perfectly.
-
Great! Just for future reference, you may want to subscribe to our developers mailing list and get answers to your questions faster. lists.freebase.com
-
-
-
In the following query, when I added the "/people/person/place_of_birth" criteria, the other information requested isn't returned if there is no place of birth info in the DB. How can I change the query to still return the other info? For example, using "/en/bob_dylan" in the following query returns the desired results. { "/common/topic/image": [{ "id": null }], "/music/group_member/membership": [{ "group": { "name": null, "id": null, "/common/topic/image": [{ "id": null }], "/music/musical_group/member": [{ "member": { "name": null, "id": null, "/common/topic/image": [{ "id": null }] } }] } }], "id": "/en/doane_perry", "name": null, "type": "/music/artist", "/people/person/place_of_birth": { "name": null, "/location/location/geolocation": { "latitude": null, "longitude": null } } } This query, by the way, is part of a JavaFX example that I'm building in a series on the JavaFXpert blog: http://learnjavafx.typepad.com/weblog/freebase-contributing-artists-app/ Thanks, Jim Weaver
-
Hi Jim, try making place_of_birth optional:true. See http://www.freebase.com/docs/mql/ch03.html#optionaldirective
-
That worked. Thanks Will!
Jim Weaver
-
-
-
Hello, I would like to develop an application in the ACRE Platform, but I need to start developing with Freebase client code because I just want to include an audio/video player, modify the theme, and some other stuff in a Base that I have created in Freebase.com and I find it very hard to start from zero, it's a lot of work. My question is...Is this possible? Could I use the option "Clone an existing app" in the Acre App Editor? Please, if you could help me I would be grateful. Thanks in advance. Regards
-
-
-
Hi, does anybody know a way to pinpoint the porn movies in the film type? I do not have anything against them being in the database, but I'd like to be able to filter them out from my queries. Currently, the GENRE property is not accurate/complete enough for this. I've read in the documentation somewhere that there is also a "authority/imdb" namespace, with title and ID values. I suppose this id is the ttXXXXX IMDB code. If it were possible to complement the film type data with a IMDB code, it might do the trick, providing: - that all or most of the non-porn movies do have a tt code - conversely, that IMDB does not attribute codes to porn movies :-) Has anyone faced this problem before? Thanks
-
There are a few different porn related genres (e.g. Softcore porn, gay porn, etc), so you'll want to make sure to exclude them all. There's a huge amount of gay porn which is in the gay porn "base" so you could exclude anything which is part of that base. You could use the film rating, although I doubt that's very well populated in the database.
You'll probably end up having to use a set of hand tuned heuristics which get you "close enough" to the effect that you're trying to achieve. Of course, the first thing you'll have to do is decide what you consider "porn." For example, a movie like Showgirls has a NC-17 rating, but also is listed in IMDB and had a general theatrical release.
-
Thanks. Yes I noticed that there are various generes which I could consider as part of a "porn" group and exlude. But, roughly, half of the movies in the base do not have any genere attached. Rating is much more sparingly used and doesen't help.
And many of those non "tagged" entries do have explicit and quite "graphic" tiles ...
I can of course consider only the films tagged by genre, with genres outside the porn "domain", but this will reduce the base to 1/3, rougly, or even less ...
-
If you're worried about "naughty words" in the titles, then you could create a blacklist of words which cause films to be excluded. Of course that won't catch the ever popular double entendres.
Another approach to the problem would be to work on enhancing the database so that all the movies have a genre attached. Create a work flow and set of tools, then recruit some people to help you do all the tagging (or just pay folks to do it).
-
I think that this might be solvable, at least for films that are clearly pornography.
First, I'm told by Jon Reitsma that everything in the Gay Porn base has the genre "/en/gay_pornography".
Next, I know that most pornographic actors in Freebase have the profession, "/en/pornographic_actor", thanks to a mapping from the equivalent category in Wikipedia.
This means we could mod Typewriter to create a data game to crowdsource the marking of pornographic films as such so they can be excluded from queries.
I created this query which displays films not marked as pornography that has actors with the profession pornographic actor.
It would need some refinement to also exclude films marked with subgenres of Pornographic movie as well.
-
That's very useful
I'll try and work a bit to adapt it to all subgenres and post a few results
Thanks
-
That query returns things like Scary Movie 4 and Toxic Avenger due to cross over actors. They're not great movies, but they're not porn by any stretch of the imagination either.
On the other hand, a movie like Aunt Peg *is* porn, but you can't tell from the title (unless you're a huge porn fan) or from any information which is in Freebase, so you'd have to do external research to exclude it.
-
Clearly, the description for Scary Movie 4, Toxic Avenger (and pretty much any Troma production) is going to be caught by this query. This is why it would be the input to a typewriter-like tool -- for human screening.
Regarding Aunt Peg -- there will always be edge cases. I think we should at least get started fixing the most egregious cases and then work out how to handle the outliers later.
Here's an updated version of the query: http://tinyurl.com/klzy5o
-
I did some checks and will be doing more on the topic
As far I was able, this is the actual full list of porn-related genres:
There are some other generes that actually are borderline, though
Currently, it returns 6396 movies.
Considering the nearly 73K film/film entries in the base, it's just a tiny amount ...
BTW, I used names instead if ids. Does this in your opinion have any impact on performances?
Also, the query on people's profession actually returns a few thousand movies, so id does not seem a definitive solution.
For the sake of precision I did this query:
[{
"type": "/film/film",
"starring": [{
"actor": {
"/people/person/profession": {
"id": "/en/pornographic_actor"
}
}
}],
"return": "count"
}]and it returns 4861 entries
-
A few more tweaks:
- There are 131 Adult Entertainers who don't have Porn as their profession, so you probably want to exclude them by type instead
"a:actor": {
"type": {
"id": "/base/adultentertainment/adult_entertainer"
},
"optional": "forbidden"
}- There are some pornos that only have a title and director. Most them seem to be actor/directors, so you could exclude them using
"directed_by": {
"/people/person/profession": {
"id": "/en/pornographic_actor"
},
"optional": "forbidden"
},- You could add various adult awards and film festivals as exclusion criteria if you're still getting undesirable results.
-
@naram: ids are always better than names, but in this case it probably wouldn't make a huge difference. Also, 6396 movies sounds about right in terms of proportion. I imagine that there are a small number of thousand other films that are not yet marked with a pornographic genre.
@tom: I agree that there are additional heuristics we should bake in to the query.
My hope is to create a typewriter-like app that takes these as inputs to generate a work queue. Users would mark films as the "pornographic movie" genre.
When people want to exclude these from applications, they could use a query similar to the one that naram gives above. Or, alternatively, we could create a denormalization that flattens the genre hierarchy so that the query is simpler. It might take the form of a node called "Porn sentry" that points to all films that have any of the genres listed in naram's query. It would be updated nightly and only writeable by the bot.
-
Ok, I've tried a few tweaks and the results are not that much positive: too many false negatives or false positives, alas.
One of the original options was to develop some tools and manually catalogue the movies. If I can make a "tool" good enough, then this is what I'll try.
Here's my idea.
1) create an environment (domain?) I can write to without overwriting or otherwise disturbing the main film/film base. A sort of test base ...
2) create an applicaton in acre that shows the movies (may be in reverse date order so to start with the most recent) in the base with a few info and links (freebase itself, optionally wikipedia and IMDB) so that we can asses the content of the file. Then is needed something like two buttons like "Porn" - "No Porn". Pressing the button just writes in the test base associating the genre info to a movie ID
3) create a way to link this test infoand the base so that it is possible to filter out the movies already categorized as "porn" or "no porn"
It will take time and a few people but in this way we could try to solve the issue.
As an alternative, we could add to genre=porn to the movies directly in the film base. But I'm not sure if this is feasible. Also I'd prefer not to mess things in the general base, even if it were possible.
Now, I'm very new at this kind of development. First: is either one of the previous solution possible? Second: will it be complicated to do? Can somebody give me some starting tips?
Thanks
-
I think you and Robert are basically describing the same kind of kind of application. It's certainly feasible to do. It's just a matter of a) doing the programming and b) recruiting/hiring folks to use the app to generate the data.
You should be able to separate the films into three categories: 1) porn, 2) not porn (films that have G ratings, etc), and 3) unknown. It's only those in category 3 that you need to worry about handling manually.
-
-
-
Hi, I'm currently a web app which would really benefit from freebase data. My users are German though - I know that Freebase stores certain localized information. Is there a way to access that data? thanks, Vincent
-
* I'm currently developing a web app
-
Names of topics derived from Wikipedia usually have equivalents in other languages, but I'm not sure how much other information is available in non-English languages.
The web client is English only, but if you use the MQL query language, you can access the underlying data in whatever languages are available. The following query will return the name of the Germany topic in a) the default (English), b) German, and c) all available languages, tagged with their language.
[{
"id": "/en/germany",
"name": null,
"n1:name": [{
"lang": "/lang/de",
"value": null
}],
"n2:name": [{
"lang": null,
"value": null
}]
}] -
Ah thank you! I guess just haven't really understood the MQL syntax because I couldn't get that query to work.
-
-
-
How can I query for each row of http://www.freebase.com/history/view/en/penguins?
-
See http://mql.freebaseapps.com/ch03.html#history Something along the lines of the following two queries which get the incoming and outgoing links, both valid and invalid (ie deleted or overwritten), sorted in reverse order by time:
[{
"type": "/type/link",
"valid": null,
"master_property": null,
"source": {},
"target_value": null,
"target":{"id":"/en/penguins"},
"timestamp": null,
"sort": "-timestamp"
}][{
"type": "/type/link",
"valid": null,
"master_property": null,
"source": {"id":"/en/penguins"},
"target_value": null,
"target":{},
"timestamp": null,
"sort": "-timestamp"
}]
-
-
-
I am sure that I am not the first, so maybe someone can give me tips and/or warnings. I would like to build an application which automatically populates a "staging" base which is than manually managed by another (web) application which facilitates moving staged information into a public base. Do you have any pointers, thoughts, ideas, caveats? It seems like it would be as straight forward as keeping a private base for "staging" and a second public base? Thanks, Phil.
-
When you say 'base' are you talking about a Freebase base? You're aware that all Freebase bases are basically public, right?
One technique that they use for the Wall Street Journal film reviews is to use the as_of timestamps to basically snapshot the database in a state that's acceptable to you. This means you need to fix up the "real" base to the what you want it to look like, but you can then "freeze" it until time you come back and do the next review.
If you're talking about having your staging database outside of Freebase, you can obviously manage things in whatever way suits your purposes.
-
-
-
Hello, I would like to know if it is possible to embed html code in Freebase, and if I could build my own themes for my space in Freebase instead of just changing the color. Thanks in advance Kind regards
-
Sort of! Base customisation is limited to colour-picking and a header image. However, if you want to make fully functional templates with as much HTML and programmatic logic as you like, check out our developer platform at http://freebaseapps.com/
-
-
-
I would like to know how would I be able to retrieve the summary or content of an article using MQL.
-
Hiya.
The "trans" service is what you're after here; please see the relevant section of the MQL documentation.
Hope this helps.
-
-
-
Hello, I tried to load a subset of freebase data in a Mysql database. However, some of the characters are not displayed correctly. Can you tell me what is the character encoding of freebase data. I also noticed that some characters are not displayed correctly by the browser, e.g. http://www.freebase.com/view/en/old_house_at_s_vres Best wishes, Elen
-
All text strings are encoded in UTF-8.
In the example you gave, that is being displayed as expected; the topic really does have the name "Old House at S(square root)(registered trademark)vres". This is obviously not the correct name for the topic, but that's "just" a data problem which can easily be corrected.
Hope this helps.
-
That example may reflect either an old bug in the client code or perhaps misconfiguration of the operating system or browser used to enter the data. Character encoding issues are particularly insidious since they almost always appear fine to the original user who is using incorrect, but matching, transformations on both the input and output.
-
elen, what character doesn't display properly on that page - it looks fine to me.
-
Oops! Should have added that I fixed the data problem before I posted my reply. Sorry to send you on a wild goose chase Michael.
-
Yes, this particular page look fine now, thanks. But I do not think that you fixed the problem in general - looking at the data I saw that specifically french names share this problem. I guess it might have been some encoding problem as you initially imported the data.
e.g.
http://www.freebase.com/view/en/charles_n_gre
http://www.freebase.com/view/en/t_te_trois_quarts_et_profil_buste_de_diego
It would be great if you could fix the data in the database and update the dumps.
Thanks,
Elen
-
Freebase is a community edited and built database, so please feel very free to fix this kind of error anywhere you see it :-)
-
well, in my view systematic errors are easier to fix replacing strings automatically directly in the database. The links I provide are just some examples, you have lots of these cases throughout the data.
-
I don't know if you're aware, but all the examples you've given so far have been created by the same member of the community. There's a small problem there (I make it the user has created 25 topics with (square root)(registered trademark) in the name), but (IMO) it's rapidly approaching the level where it's not worth Metaweb staff spending their time on something the community can fix without too much effort.
-
It looks like the person doing the entry was probably using a Mac Roman character encoding, but claiming it was UTF-8. There are actually more like 300+ entries messed up, but it's still a vanishingly small percentage of the database. Nonetheless, I've reported it as bug https://bugs.freebase.com/browse/FREEBASE-888 Whether or not it'll get fixed before the next quarterly data dump or not will depend on how it gets prioritized relative to other work, but anyone can fix it themselves using the transformation described in the bug report.
BTW, all the web links back to the SF MOMA web site are broken as well.
-
-
-
If I want to test some code I'm developing are there any default test objects (types, topics, etc) that could be used for expected results? Maybe some simple normal objects would be fine but there is always the chance they could change.
-
We have a sandbox graph at www.sandbox-freebase.com that is refreshed weekly on Mondays.
-
If you're just going to be doing reads, the MQL as_of_time envelope parameter will let you see the state of the graph at any point in history, which obviously means consistent results.
-
as_of_time also works in the URL:
http://www.freebase.com/view/en/on_the_road?as_of_time=2008-05-01
-
-
-
JQuery.getJSON(...) uses GET method. Since my query is recursive and very long, it seems not working with GET method if depth of the recursive query is very long. So, I tried Jquery.post(...) like the following: jQuery.post("http://api.freebase.com/api/service/mqlread?callback=?", {query: JSON.stringify(envelope)}, callback, 'json'); but, it is not working. am I doing something wrong? any suggestion or solution? messy source code is available here: https://graphics.stanford.edu/~namwkim/freebase/js/genealogy.js ** if there is no workaround, I might consider decomposing query into separate queries. Thanks!
-
-
-
I got a Freebase data dump file of all of the movies info (as of March 2009) . It is basically a lot of TSV flat files. One file, called films.tsv (after extraction) is a list of over 59,000 movies, with a lot of columns for dates and director and other things that have a 1 to 1 relationship with a film, including columns for a netflix id and an imdb id. This is where I would expect to find the exact data I want. In that entire file, I did not see a single value in the "netflix id" column. The same with the imdb id column: no data for any of the 60,000 movies in there. I DID however see a blog posting (back in October?) saying that Netflix keys for over 23,000 movies were recently added to the films base. Does anyone know if it is possible to find these in one of the data dump files?
-
The TSV data dumps don't currently include any keys. If you'd like to download keys in bulk, you can use the Link Export (1.6 GB, http://download.freebase.com/datadumps/). In that file, IMDB and Netflix keys will look like this:
/guid/9202a8c04000641f8000000000009e89 /type/object/key /authority/imdb/title tt0083658
/guid/9202a8c04000641f8000000000009e89 /type/object/key /authority/netflix/movie 70053131Will that work for you? Let me know if there's anything else I can help with.
-
I think it should work, depending on the formatting within the dump files, and how long it takes me to successfully pull down a 1.6 gig file...
I'll post back when done. Thanks!
-
OK. It took about an hour to download, which was faster than I expected. It also took about an hour to unzip, which was quite a bit more.
I am afraid that I now have a 25 gig file here that I am not sure how to approach. I think i still have much reading to do on your site (or somewhere) to figure out how I can start parsing some data out of that file.
Do I need to run a graph database over here locally for this?
-
Or, let me back up. What I am really trying to get is something that would normally be returned by a SQL query that looks something like this:
SELECT imdb_id, netflix_id WHERE imdb_id IS NOT NULL and netflix_id IS NOT NULL;
Is there a simpler way to get this subset of data easily?
-
You don't need any kind of database to start using this data. If you're using a Unix-like environment, the simplest way to get at the keys you want is to directly filter it as a text-file for the key-namespaces you want using grep, like this:
grep "/authority/imdb/title" freebase-datadump-quadruples.tsv > imdb_keys.tsvIn this file, keys are represented as "id property key-namespace key-value". You could also filter by "/type/object/key" to get all the keys in Freebase.
-
That worked like a charm with the imdb data giving 19,558 records.
The netflix version returned 0 records, so I shortened the "search for" string down to "/netflix/" and got a lot of records with:
/user/hal/netflix/movie (23,929 records)
and /user/hal/netflix/role (8,397 records)
Are these the netflix records you referred to above as:
guid/9202a8c04000641f8000000000009e89 /type/object/key /authority/netflix/movie 70053131
?
-
Correlating the /user/hal/netflix/movie records with the
/authority/imdb/title records, i know have 11,189 matches -- that is 11,189 movies in the freebase dump file that have both an imdb id and a netflix id.
Does that sound about right?
-
As I write this, there are 11,182 topics on the live graph which have both IMDB and Netflix title keys, so 11,189 from the slightly out of date data in the dumps is a perfectly reasonable number.
As an aside, 19 of those topics are not currently typed as a film. The first one of those that I looked at, The Human Factor, is a book and needs to be split into two topics; similar things may well apply for the other 18. Just a small health warning :-)
-
Yep, that looks right. Sorry about the namespace confusion: /user/hal/netflix/movie is correct -- it's actually exactly the same as /authority/netflix/movie. We should probably deprecate the /user/hal name for it.
-
-
-
As I used the List Import tool, there was a crash, an error, and suddenly all 415 bits of my supposedly imported data went to the general "Topic" instead of "Second Life Region". Egad! Help?
-
Is this your list of topics?
You need to edit the view (blue-colored text 'Edit view' link below the 'Share This' button).
Click on the 'advanced filters' in blue text under the 'Filters' and change the first timestamp value from 'Jun 15 2009 12:00 am' to that of 'Jun 16...' etc.
See this image as an example on restricting the topics to ones you just added.
Now see the gear icon (next to the Add more button with the green "+") click it and you have an option to do many great things, one of which is to add the topics of this particular view to a type. Click on the 'Add to another type' and enter in the type name (Second Life Region?) and that should do it..
Example picture here.
-
@librarianavenger, I'm sorry to hear about your list importer implosion :( Unfortunately this is a known bug, that the list importer degrades in performance and starts flaking out when you put lots of topics in at once. In my experience, it's best to import in batches of around 50 at a time, to be on the safe side. I'd love to get the tool rewritten in Acre or somthing, and fix it up; I was talking to jdouglas about this just yesterday in fact (Cc'ing him so he sees this thread).
The workaround gmackenz suggests should work, however.
And can I just say how pleased I am to see you're working on the SL base again? YAY. Also, did you know we have another Hack Day coming up on July 11th?
-
gmackenz - thanks for the excellent workaround - sadly I seem to get an error when either filtering things I created on the 16th, or navigating there via activity history. I'll keep trying and hope something shakes loose.
Hi Skud!!!! Freebase is totally feeding the librarian compulsion. We should get brunch this weekend. I miss you guys!
-
Well, I would be happy to do it if you want. You'll want to check to confirm afterwards, let me know.
-
-
-
I'm executing this query in the test console, but I am getting only null values in the governing officials. This is the query: [{ "type" : "/government/governmental_jurisdiction", "id" : null, "name" : "San Francisco", "governing_officials" : [] }]
-
That's because Government Position Held is a Compound Value Type (CVT), which doesn't have a name itself. You'll need to expand out the properties you're interested in from the CVT, for example like this.
Hope this helps.
-
Thanks that worked. Could you help me now with this... I need a disjunctive query, for example to get the governing officials from San Francisco OR Edmonton... I tried this, but does not work
[{
"type": "/government/governmental_jurisdiction",
"id": null,
"name": { "San Francisco", "Edmonton" },
"governing_officials": [{
"office_holder": null,
"office_position_or_title": null,
"from": null,
"to": null
}]
}]Thanks in advance
-
You need the "one of" operator:
[{
"type": "/government/governmental_jurisdiction",
"id": null,
"name|=": [ "San Francisco", "Edmonton" ],
"governing_officials": [{
"office_holder": null,
"office_position_or_title": null,
"from": null,
"to": null
}]
}]
-
-
-
I want to make a disjunctive query... for example to get data from two locations: Edmonton OR San Francisco. I tried writing "name" : { "Edmonton", "San Francisco" } but didn't work. Can you help me please?
-
Hi, try using the |= operator with the topics id's. Check out this section of the mql manual.
-
-
-
Is it possible to add images to a topic using the API?
-
Yes, you should be able to use /api/service/form_upload_image (or /api/service/form_upload) to programatically upload an image and create a /type/content topic.
-
-
-
-
-
I am trying to use the Query Editor to do multiple MQL Writes in a single 'query' envelope. (I'd like to try and avoid using 'queries')Firstly, is this even possible? Using the following mql, I've tried various alternatives of colon and square bracket, but can't seem to find a way which works. Where am I going wrong?{ "query":[ { "id" : "/guid/9202a8c04000641f80000000001ead71", "type" : { "connect" : "insert", "id" : "/royalty/chivalric_order_member" } }, { "id" : "/guid/9202a8c04000641f8000000000630b8e", "type" : { "connect" : "insert", "id" : "/royalty/chivalric_order_member" } }, { "id" : "/guid/9202a8c04000641f80000000007e0325", "type" : { "connect" : "insert", "id" : "/royalty/chivalric_order_member" } } ] }
-
A list of mqlwrite directives should work - it worked in the old query editor, and our MQL documentation has an example of it. Can you submit a bug regarding this?
-
Correct -- this previously worked and doesn't any more. This is a bug and Jason and David are aware of it, but it's good to have more use cases/examples of people being caught by it.
-
Oops, that's a bug in the query editor. It should be fixed now. You'd need to shift-reload to get the browser to load the latest code of query editor. Try again and let us know if it works or doesn't.
-
Still not working - this time it correctly identifies the above mql as a write, but returns the error /api/status/error/mql/type, "Type /type/object does not have property query".
I've created CLI-8201 in JIRA.
-
It doesn't understand the envelope, so if you remove the outer { "query" : ... } and just keep the array, like so
it should work. It just did for me.
-
Great just worked - thanks for your help.
-
-
-
-
Given a person's id, I am querying all the genealogical data of the person (e.g.ancestors and descendants etc) Problem is I don't know how many people there in his genealogy in advance, so I couldn't pre-build the query. The following function is a recursive function following parents and children links of the person. So the total number of queries is equal to the number of people in the genealogy. I am getting a time-limit exceeded message. I am suspecting that I am sending too many queries (not sure, though). Do you have anyidea to resolve this problem? to regenerate the problem, go to my application web page and try 'Elizabeth II': http://gendata.namwkim.user.dev.freebaseapps.com/index Code: function expand(id, set, depth){ //acre.write("depth:"+depth); //acre.write("id:"+id); var query = { "id" : id, "guid" : null, "name" : null, "type" : "/people/person", "gender" : null, "date_of_birth" : null, "/people/deceased_person/date_of_death" : null, "parents":[{"id" : null, "name" : null, "gender" : null, "date_of_birth" : null, "/people/deceased_person/date_of_death" : null,"guid" : null, "type": "/people/person", "optional":true}], "children":[{"id" : null, "name" : null, "gender" : null, "date_of_birth" : null, "/people/deceased_person/date_of_death" : null,"guid" : null, "type": "/people/person", "optional":true}] }; var r= acre.freebase.MqlRead(query).result; //acre.write("::"+r.id+"::"+r.name+"\n"); set[id] = id;// add this node to visited node set //acre.write("("+r.name+","+depth+","+r.parents.length+","+r.children.length+")\n"); if(r.parents!=null){ for (var i=0; i
-
- Sorry, the format of the above writing is kind of messy. To see the function code (e.g. expand(....)) please visit here:
-
There's already a genealogy graphing application here http://genealogy.alexander.user.dev.freebaseapps.com/index?person=%2Fen%2Felizabeth_ii_of_the_united_kingdom
which seems to work fine with Elizabeth II. Why not just use it?
A common programming problem with recursion is a logic flaw which causes the recursion to be infinite. Are you sure your recursion terminates? I'd start by adding debug logging to your app so that you can tell what progress it's making. That should narrow things down to the specific section of the code that's got the bug in it.
-
My version is the extended version of the application. The application does not get the whole genealogy data, but just a subset. Mine is trying to get the whole data. you can try charles darwin on both application and see difference.
I am sure my app terminates. You may not look at the code carefully, but I am maintaining a Set containing all the visited nodes. So, I never visit already visited nodes.
-
So instead of what genealogists call an "hour glass chart" showing direct descendants and direct ancesters, you want an "everyone chart" that includes all siblings/cousins as well? You understand that this will quickly make the graph layout exceeding difficult, right?
Why do you think the problem is too many queries? Since you're sure that the recursion terminates, presumably you know how long it takes. How much time is being spent collecting data? How much time is being spent by GraphViz trying to lay things out? Are the timeouts dependent on purely the number of nodes in the graph or also the complexity of their interconnections (edges)? Do you limit the number of nodes that you attempt to lay out? What happens if you change the type of graph that you're asking GraphViz to plot? What happens if you skip the GraphViz stage altogether and just output a list of names and dates?
If you could get the attention of a Metaweb staffer who knows Acre, you could ask them:
- what the time limit is for constructing a page using Acre
- whether the limit can be increased
- whether the timer can be reset by some simple technique such as using a periodic "Working..." message
-
Thanks so much for such a great advice.
I am collecting genealogy data for my research. that is why I was trying to get the whole genealogy (e.g. ancestors of descendant etc)
I asked a Metaweb staffer about increasing time limit, but did not get a reply. : )
I talked to professor and we decided to narrow focus to parent-child relationship and spose-relationship. So I don't think I need to get the whole genealogy anymore.
Anyway, thank you so much again.
Nam
-
-
-
Hey, I accidentally posted this in General support. I am writing an application in which I want to give the user direct control of the base being uploaded to and the different MQL attributes being uploaded along with it. This means that I would want both sides of an MQL write query to be variables. Just as the sample upload.py has 'release': fields[1], I would like to have fields[0]: fields[1]. Unfortunately, it tells me that this is not valid syntax. How can I fix this?
-
This is really a Python programming question. Check any Python tutorial for how to use dictionaries (dict(), {}, etc).
Having said that, the example that you gave in your other note over in General Support sounds dangerous to me in that it's going to potentially give the user the ability to generate lots of new topics without the verification that's implicit in manually selecting things from an autocomplete box.
Remember that even if things are in a user-specific domain, they are visible globally, so it's going to be confusing to have lots of duplication.
Can you describe a little bit more about the type of data that you want users to be able to upload in this way?
-
-
-
http://mjtemplate.org/dist/mjt-0.6/mjt.js this javascript not working in internet explore but work in mozila.so to run successfuly in internet explore what to do this error is also placed fmdb application thank ufor help
-
-
-
-
-
Hello, I am a developer and I am new to MQL and the Freebase Apps. I was wondering if there was a way to edit the data that's retrieved from Freebase on a website without going back to Freebase.com to edit it? Thanks
-
Yes. There are several options, depending on the level of customization vs. level of work you're up for.
At the lowest level, we use OAuth to support authenticating users so they can then write via third-party apps using the APIs (mqlwrite, upload, etc.). OAuth is kind of a tricky protocol to work with directly, but there are libraries. However, the easiest way to use it by far is via Acre, our hosted application development platform, as we've baked it in there with some APIs. Even if the rest of your app isn't written in Acre, you might still want to use Acre for glue... depends on the use case.
how to: http://freebaseapps.com/wiki/writing_to_freebase
some apps that use oauth + Acre:
http://typewriter.freebaseapps.com
We've also been working on a new jquery plugin to make it easier to build your own forms using a more inline style of editing, but that's not ready for primetime yet. Here's an example page that renders a whole topic as editable (be careful, editing it will edit freebase.com as you go! :-).
-
Okay thanks JDouglas.
I love Freebase so far and thanks again for anwsering my question.
-
-
-
I am extracting genealogical data given a person name. The application suddenly stopped because it exceed the time limit. Please let me know how I can increase the time limit. Thanks Nam
-
namwkim, are you using Acre our our REST API? That will change the answer slightly. However, in both cases, the usual way to get around this is to improve your MQL query, or to use cursors to page through the results a chunk at a time, to prevent timeouts.
-
Thanks for your replay
I am using Acre....
I think I saw some functions which modify the time limit. I don't remember where I found it. Do you have any idea on that?
Right now I am querying database for each person. I could reduce the number of queries if I know the size of genealogy in advance. But for now, I don't think that is possible.
Could you explain more about the latter? Sorry, I don't know what you mean by 'use cursors to page through the results'.
-
-
-
Is it possible to search for the value of string or numerical data types in either freebase or parallax? For example: date of birth, or height, or age?
-
Sure, what's the exact query you're trying to do?
-
I've created a test data set in my draft domain called 'aptamer test'. In the domain, there's two topics of type 'peptide' named A1 and A3. They each have a property called 'sequence' which is a machine readable string.
I would like to search for this string, but in freebase, searching 'LGHH', which is the value of sequence for A1, doesn't give any results, and in parallax, a similar search also doesn't return anything.
This is important because if I run a query for all peptides that have a sequence value in parallax and get 400 hits, going through each one to find a specific sequence would be really painful.
-
Right. Our search/autocomplete interface (the search box on the top right corner of the page on freebase.com) only uses a subset of properties to search on: name, also known as, and the description field.
If you want to search by other fields, the best way to do it is with our filter/table view. Go to your type's page, then click "Edit view", and you can filter by whatever you want. You can then save this filtered view under a new name. Take a look at Using the Filter View for more information.
-
Ahh ok I see. That's what I was looking for.
Thanks for your help.
Matt
-
-
-
Hello, we query freebase to get some semantic infos on a search string (get a list of types within a result). Example: "Berlin" will return a lot of semantic infos (= freebase types for us) such as the freebase type City/Town. The mass of information is a problem here. Berlin as capital of germany seems to be more relevant than some band called "Berlin". The Text-Search on freebase.com seems to sort the results according to its relevance. Is there a way to implement this in a MQL search request? Best regards from Dresden, Niels
-
If you are happy with Freebase's default relevance ordering (the order you get when you type 'Berlin' in the search box in the upper left corner), then you can use the search API to get the same results.
It a separate endpoint/API from the mqlread end point. There's documentation at http://www.freebase.com/view/en/api_service_search and http://www.freebase.com/api/service/search?help
Of course "most relevant" depends on a lot on context, so if you've got additional information available to you, you can do things like constrain the search to certain types or use types to influence the weighting.
-
-
-
I have a city name .I have to select nearby cities name by using freebase api Please help
-
Hi jivaannushilu. Our data model doesn't exactly list "nearby" cities, so you can't do this with a simple MQL query. You might want to look at the geo-coordinates on the location type, and work from there. There is also an experimental geosearch API being worked on, which should help you with radius-based queries. If you're interested I can put you in touch with the developer who's working on that.
-
-
-
Looking at the film.tsv file, and a few API examples, I do not see how to query for the images/cover art. For example: Bourne Identity GUI reports not found when calling: http://www.freebase.com/api/trans/raw/guid/9202a8c04000641f80000000003ced86 in the film data I see no other id that corrisponds to cover art..is this not possible? I see when I search for Bourne Idenity an image is shown from (http://www.freebase.com/view/wikipedia/images/en_id/2447247) which I would have assumed would be somehow present in the flim.tsv file..yet..I do not see it.
-
It doesn't report "not found," it reports "invalid content type" which is something else entirely.
If you use the guid for the cover, it works fine http://www.freebase.com/api/trans/raw/guid/9202a8c04000641f800000000119c88a
Don't forget to check the license and provide the proper attribution, etc if plan to reuse the image.
-
-
-
is there a recent ruby gem? This one appears to be quite out of date: http://trevoro.ca/blog/2009/01/16/quickly-understanding-freebase/comment-page-1/ thanks!
-
I'm not aware of anything more recent than that. You might like to ask on our Developer mailing list.
-
Via the mailing list:
gem install echoe
gem install httparty
--------------------------------
require 'httparty'
class Freebase
include HTTParty
format :json
base_uri 'http://www.freebase.com/api'
def self.read(q)
return get('/service/mqlread?', :query => {:query => '{"query":' + q + '}'})['result']
end
end
query = '{"id":"/en/peru","capital":null,"type":"/location/country"}'puts Freebase.read(query)['capital']
-
Thanks so much!
-
I've just pushed an initial version of Ken, my attempt of a Ruby Freebase API, to Github.
http://github.com/michael/ken/
Maybe one wants to have a look at it...
-
-
-
Hi. If I use the service: api/trans/blurb , for a topic's overview, how can I tell if the topic comes from wikipedia or not? Thanks, -JT
-
You'll have to do a MQL query as well, to find out. There's a MQL Cookbook entry to help get you started: http://www.freebase.com/view/en/wikipedia_article_text
-
There was an email or article which wrote about this in the context of telling when you need to give Wikipedia attribution credit for reuse, but it apparently didn't make it into the MQL cookbook and I can't remember where I saw it.
Using the Radiohead example from Kirrily's cookbook article, look at the Document for the topic in the explore view (press F8 and choose Explore view).
http://www.freebase.com/tools/explore/guid/9202a8c04000641f800000000004c272
The property /common/document/source_uri is the one of interest. If it's got a value that begins with http://wp/ then you've got a Wikipedia blurb.
I don't know if this is the technique that my dimly remembered article recommended, but it should work.
-
-
-
For example the /api/trans/blurb reference page has the following example: http://www.freebase.com/api/trans/blurb/guid/9202a8c04000641f800000000001daf5?maxlength=30&callback=foo This causes a HTTP 500 error.
-
Yeah, that's a problem. I've raised a ticket here. Thanks for reporting it.
-
Hey, this got fixed last week, sorry for the delay.
-
-
-
-
Is it possible to query a base and order the results based on when the items were updated?
-
in the Freebase Web client, you can subscribe to the RSS feed for the base; that will get you the latest changes.
If you are using MQL, then it depends on what kinds of changes you want. For any property or topic anywhere in Freebase—and bases are just a special kind of topic—you can ask for the creation and update times, and you can sort to get the most recent ones.
-
How do you request update times? I have only been able to find one timestamp, called timestamp.
-
Are you using the Freebase Web client or MQL?
-
MQL
-
For any property, you can ask about the link associated with the property value. For example:
{"album":[{"id":null,"link":{"timestamp":null},"name":null}],"id":"/en/tori_amos","type":"/music/artist"}
will tell you when all of Tori Amos’s albums were added in Freebase.
-
-
-
we can help you to correct it
-
Great! Freebase is a community database, so help from all of its users is exactly how it is supposed to work. It doesn’t look like you’ve edited Bhavnagar, but please do go ahead.
BTW, could you please add some text to Bhavnagar para? It’s not at all clear what it is. Is Bhavnagar inside it? Outside it? Are they the same thing?
-
-
-
I'm trying to write an MQL query that will get the summary and main image for a topic. In this case http://www.freebase.com/view/en/bill_gates.
This is my first MQL query and I'm not seeing properties like Image and Summary on the Bill Gates entity when I execute this query:
[
{
"*" : null,
"name" : "Bill Gates",
"type" : "/people/person"
}
]How can I get this information?
-
Because you've specified the type /people/person, you need to fully specify the path to properties associated with other types (and "*" won't find them).
[{
"/common/topic/article" : [{}],
"/common/topic/image" : [{}],
"name" : "Bill Gates",
"type" : "/people/person"
}]Also, a better idiom for "*" : null is "*" : [{}] which will show you the internal structure of the linked object, not just its name (or id)
-
p.s. you'll need to fetch the actual contents of the article and image using the "trans" service. See Ch. 4 of the MQL reference.
-
-
-
Musicians (singers...) that have participated in a film return the type:"film/actor" before "music/artist" and causes a false assumption by our apps. Take Britney Spears. She is a singer no doubt but she has also appeared on few films. So when I do a search I get back the type "film/actor" instead "music/artist". I think that the type parameter should also have a score and not just the article as a whole.
-
That’s not currently how the system works, but types, like any other property, can be ordered. The Freebase.com client does not currently respect that order, but it could.
I have posted a feature request on our tracking system. You can log in there and vote for the feature to support it.
-
i couldn't find the way you mentioned about sorting properties like types. can you describe how can i do it?
-
There is an ongoing internal discussion/work on notable types and how we could try different means in displaying some types more prominantly than others for a topic. Hopefully we will be able to have something interesting to the community in the near future (if all goes well).
-
-
-
Sorry for the super easy question. It seems that the schema page for common/topic is not loading (http://www.freebase.com/type/schema/common/topic), and I'm not able to guess the correct property type to return the weblinks (assuming this is the type they are a property of). Thanks, -JT
-
-
-
I took a look at your dump and your API, but neither seems to give me access to the list of bases nor the views within each base.
-
The TSV data dumps only contain information from the Commons.
For questions abou the API, the Explore view is really invaluable. For instance, if you look at the Louvre base in Explore, you can see that the base has a /type/object/type link that goes to /type/domain. This will be true of all bases and Commons domains. Additionally, you will see that it has a key in the /base namespace, which will be true of all bases created since the feature first became available. The views are marked a little more obscurely; they are instances of type /freebase/query and link to the base (rather than vice versa) using the /freebase/query_hints/related_domain property. (The featured views are highlighted with the /freebase/domain_profile/featured_views property.)
-
-
-
Hi, I'm using the example quarters.py script with a few modifications to write to the sandbox. The library I am using is the metaweb.py lib hosted on google code. mqlread works without a hitch. I have also inspected the query and it seems to work without issue. The writes keep reporting a HTTP400. Here is a stack trace: Traceback (most recent call last): File "sequence.py", line 46, in result=metaweb.write(query) File "/home/matthew/Documents/FreebaseLibs/metaweb.py", line 331, in write f = urllib2.urlopen(req) File "/usr/lib64/python2.5/urllib2.py", line 121, in urlopen return _opener.open(url, data) File "/usr/lib64/python2.5/urllib2.py", line 380, in open response = meth(req, response) File "/usr/lib64/python2.5/urllib2.py", line 491, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib64/python2.5/urllib2.py", line 418, in error return self._call_chain(*args) File "/usr/lib64/python2.5/urllib2.py", line 353, in _call_chain result = func(*args) File "/usr/lib64/python2.5/urllib2.py", line 499, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 400: Bad Request Thanks, Matt
-
Matt, can you paste a code snippet please? We need to see how you're using the library.
-
Are you logged in (and accepting cookies)? That's the most likely cause of a Bad Request error. If it was working for a while and then stopped working, they probably rebooted the server on you in the middle of your run.
-
Hi, sorry for the slow reply.
Yes, I was having trouble with cookies and authentication. Thanks very much for the help.
Matt
-
-