Discussions on Help Center
Start a New Discussion
-
-
Hi!
I've created an "equine anatomy" type for my horses base. It shows up as a table in my base.
I'd really prefer it was a gallery, but I can't figure out how to do this. If I go in and edit the view to a gallery, I need to "Save As..." -- which creates a redundant, duplicate view.
What do I do just to make the default type view be a gallery?
Thanks!
Brian
-
Yeah, what you're seeing there is called a "synthetic view". These exist for any type in the system. You can't edit and re-save a synthetic view, you can only re-save as another one.
If you want a gallery, I'd recommend saving a second one, then going into the "All views" page and de-featuring the one you don't want.
-
Have you tried a little MQL? The property that you want to update is /freebase/query_hints/preferred_view .
-
Hi Bryan --
Interesting suggestion, but it doesn't seem to work.
Check out the explore page for the synthetic view. I've got the "Gallery" property on the view, but it still shows up as a table.
Brian
-
Hmmm, this might be a client enhancement. I saved a copy of your view, and it displays as a gallery. Granted, it's now a user-defined query. As a workaround you can do what skud suggests and save the view as a user-defined one, but I would also file a client enhancement.
-
try running this query:
[{
"id": "/base/horsefacts/views/equine_anatomy",
"/freebase/query_hints/preferred_view": {
"id": "/freebase/view_type/gallery",
"connect": "update"
}
}]
-
-
-
I've got two questions:
1. What should be discussed in the forums/discussion hub vs on the data modeling email list? For example, the discussion around the Person topic has a bunch of stuff which is very similar to things that get discussed on the list and I can't really tell what is appropriate for which medium?
2. I just discovered replies to comments that I posted several months ago. I'm pretty sure that I never got email notification of them, but that could have been operator error. Are notifications turned on by default? Do notifications result in email or do they just add an entry to the tab on my main discussion hub page (ie I have to log in to see if anything happened)?
Tom
-
Hi, Tom.
1. The forums are good places for discussing specifics of a topic, type, or domain, especially for communicating with a user on his or her page, or as the owner of a domain. The data-modeling list is a good place to discuss general issues, ask for help with a model, or to alert people to changes.
2. We don’t have e-mail notification for discussion posts. You can ask for an RSS feed of the posts on any particular topic, and your Freebase home page will show replies to you.
Since we at Metaweb are all users of this system, we are aware of the challenges in tracking discussion. We are working on better communication tools, so stay tuned. -
regarding 2, we now have email notifcations for discussion post replies, posts to domains you administer, and posts to you profile. in fact you will both be receiving an email notification for this post right now.
more notifications are coming soon. you can update your subscriptions on your settings page.
-
-
-
Hi all, thank you for checking out this post. I am a new user to Freebase and I need some assistence.
I am tasked with a project of obtaining information for dog breeds. Typing into the search box for dog breeds I get a nice relational tabled representation of the data with the name and breed group. Clicking on one of the dog names itself gives me a little further information such as it's height and temperment.
Although if I search for Hypoallergenic Dogs, that base exposes other information immediately, such as their height.
What it comes down to is I need a way to pull this set of criteria (although it seems that Freebase does not have some of this data yet):
dog name, most popular by city, size, excercise needs, temperment, coat length, group, life span, energy level, hypo allergenic, family friendly and apartment friendly.
I've also noticed from runing some of the example queries from the help area, that data comes out as a hierarchical model rather than a relational model used by SQL or Excel. Is there a way to convert this into a kind of tabled form such as if you were to use the search bar on the top right?
Thank you in advance.
-
Create the table that you want with the right filters and right columns displayed, then click on the little gear icon on the top and select "Download as a file."
Don't forget that the Terms of Service require attribution back to Metaweb/Freebase.
Not sure what you mean about the heirarchical vs relational, but the database isn't either really. If you're talking about the information displayed on a topic page in Label: Value form, you can get all that to come out in table views as well with the appropriate amount fiddling about the the table settings (click Edit View and add additional types/columns).
For data that's missing, feel free to add it if you've got a good source that's license compatible.
-
-
-
I asked this in another thread, but apparently it got lost in the noise:
How do I create a public table view, or better yet a collection of related public table views, which operates on the full public database, not just the subset tagged with a particular base's Topic type?
-
If anyone who's attending the Freebase seminar in SF today sees this note, could you do me a favor and ask the assembled Freebasers if any of them know the answer to this question? Thanks!
-
I believe you can create a view off the commons and save it anywhere you like, including to a base, and this will work. I just tested this on Sandbox by creating a view of female authors from the Publishing commons, saving it to a Test Base, then going to my own person topic and typing myself as an Author. When I went to the base and looked at that view, there I was.
The "base topic" thing mostly comes into play if you are using the "Add Data" feature from the "Edit Base" interface. We're making changes to this, so the annoyances related to "base topic" will hopefully go away in time.
-
Thanks for the tip. I'll try recreating all my views from outside the base.
-
-
-
-
-
OK, this is driving me nuts. How do I get a table view to refresh itself? I have a table view in the sandbox http://usnris.sandbox.freebase.com/view/base/usnris/views/national_memorials which shows topics, but if I say "show query" and "show in query editor" and run the identical query, I get 10 topics returned.
I have tried F8->Refresh, refreshing the browser cache, and I even fired up IE, which I never use, to make sure Firefox wasn't doing any funky caching.
What gives? How do I fix it?
-
Firstly, use sandbox-freebase.com instead of sandbox.freebase.com. With the latter, cookies for freebase.com apply; that’s why the former was created. Try that and see if you still have a problem.
-
It's a weirdness of the base system. In order for things to show up in that view, they also have to be "in the base". Something that's in the base is co-typed with /base/usnris/topic -- this is what you see in the "All Topics" view in your base. So if you want them to show up there, you need to apply that type as well.
-
Chris - I'll do that for the future, but I'd also like to note that all of your documentation refers to the sub-domain, not the hyphenated domain.
Kirrily - That sounds like the problem. I guess I was inappropriately seduced by all the "Make a base! Make a base!" exhortations. All I want is a couple of new types and a handful of public views which operate on the standard data set. I don't want to have to manually update the views when new data gets added to the system. Is there a way to do that? For testing purposes, I guess I can just change my upload program to co-type everything with the funky /base/usnris/topic type (at the expense of another chunk of write quota), but that's not really what I'd want in the long run.
-
ps It's not good to exclude the /base/unsris/topic qualifier from the query if that's what's being used to generate the view. It's needlessly confusing.
pps My original note should have compared the 4 vs 10 topics. It's needlessly confusing omiting one of the values. :-)
-
-
-
According to the Freebase MQL Write tutorial, it say that my write request must have a cookie header that contains the authentication cookies returned by the login service. Where do I go to find the "authentication cookies"? or how do I access them?
Thanks.
-
There is some additional detail on logging into Freebase and storing cookies in section 6.1 of the MQL Reference Guide.
-
-
-
What cookie information do I need to store at Freebase login and what needs to be passed back to Freebase in order for me to do a MQL write function? I have the Write Query done, but just cant process it through to Freebase using my servlet.
I had a read about the help information on freebase, but all of them are in python, and I'm using Java Servlet. So reading those codes got me a bit lost.
P.S. I'm new to Freebase, and Cookie. Sorry -_-''
-
-
-
I'm having a problem with trying to do a MQLWrite function using a Java Servlet. After I logged in using my servlet and do a MQLWrite using Freebase's API, it gives me a HTTP 405 Error?
Does anyone have any suggestions as what I should do to fix this error? Thanks.
p.s. my MQLWrite query works in the query editor on Freebase's website.
-
Are you perhaps trying to do a GET rather than a POST with your servlet? A 405 is usually triggered by using an incorrect method for a Web service, and only POST is allowed for mqlWrite. Since your query works through the Query Editor, this is my first guess. You might also want to take a look at Chapter 6 of the MQL Reference Guide, which covers the mqlWrite service:
-
But im using the "doPost" method in a servlet created by Eclipse? Are there example MQLWrite java codes provided by Freebase?
Thanks
-
-
-
I've set up this table view for U. S. National Landmarks which does what I want on the filtering/viewing side of things, but I can't seem to get it configured to do what I want for data entry.
If someone adds a topic, I'd like it to be typed as a Listed Site (works fine) with a single entry for the property "Designation as Natural or Cultural Site" which contains *both* a designation as "National Register of History Places" and a category of "National Historic Landmark."
Instead, all my attempts to date have resulted in two separate property values getting added, each with half of the information. Of course this doesn't pass the filter, so it doesn't show up in the table view and if you add it again, you get four! entries.
How do I adjust this view to do the right thing?
-
The fields in the "add more" menu represent a couple things. Ones that are filled in automatically are properties that were used to create the view. (The + symbol is for adding additional instances to that property, which is why you're getting two property values. It would make sense if you were adding something that was on the NHRP as both an NHL and a National Monument or something.) The other way properties appear in the menu is if they are marked as disambiguating properties. So the way to handle this particular case is to base the view off of the Natural or Cultural Site Listing CVT.
However, in this specific case, I have a question. Based on the Wikipedia article, it seems like the National Register of Historic Places has five categories: building, structure, object, site, and district. Additional listings like National Historic Landmark, National Historic Site, and the like seem like they should be a separate listing, especially since some of these other listings should be treated as Protected Sites (i.e., National Battlefield Parks). Does that agree with your understanding of these lists?
-
Well, there are categories and then there are categories. The National Register Information System (NRIS) schema calls that calls that a "resource type." The things that I've been working with as a category in this sense are what the NRIS calls a "nominator name" and they also have a "level of significance" which can be International, National, State, or Local.
Here are the counts for some of the nominator names of sites which are of international or national significance (30 and 7119 sites respectively).
1723 National Historic Landmark
26 National Park
24 National Historical Park
20 National Historic Site
13 National Memorial
9 National Recreation Area
9 National Monument
5 National Seashore
4 National Battlefield
3 National River
3 National Capital ParkThere are a couple dozen of these. As you can see from the counts, the most common category, even for things which are supposedly significant is "none."
I've been mostly following the UK model for Listed Building, but this could be sliced a few different ways. The U.S. National Register is a little unusual also in that although the National Park Service adminsters it, some things like National Memorials get designated by Congress and added automatically.
As far as protection status goes, the vast majority have no direct protection. Even National Historic Landmarks have limited direct protection, particularly if privately owned. Much of the protection is indirect (e.g. additional reviews required for federally funded projects).
-
BTW, this would be useful to cross-post to Protected Places but I can't seem to get the cross posting to "take"
-
I guess I still think of those nominator names as being discrete listings; certainly anything has as nominator value of National Park should be typed as a Protected Place with a "system" value of United States National Park System. Using "category" for these loses us the ability to easily distinguish districts from buildings from objects.
In terms of values like "level of significance" and "area of significance", it might be worth having a separate type for NHRP sites, since these sort of values seem to be specific to it; that would give us a place to put the enumeration property, as well.
I don't know what's going on with the cross-posting; I can't do it either. I'll file a bug on it.
-
Designing a new type would certainly make my head hurt a lot less, but I'm worried that it would weaken the ability to treat sites uniformly on a global basis.
Can't one distinguish buildings from districts by how they're typed? I haven't done an exhaustive search of the NRIS database, but I'm not sure I'd put too much stock in the type. I noticed for instance that they have all boats typed as "structures."
What do you think about the UK precedent of using "category" for level of significance? Are they going about it the wrong way?
I can see arguments for both sides, but I think a UK Grade I Listed Building and a US National Historic Landmark should be treated similarly.
-
-
-
Hi, I am new to Freebase. I have download some of the data dumps and imported them into Access, and I notice that in many of the fields instead of the actual data there is something like /guid/9202a8c04000641f8000000003e64301. What is the best way to repace these id numbers with the actual data?
-
I haven't worked with the dumps myself, but they probably map to what you think of as foreign keys. Every object in Freebase has a unique ID (GUID) and these are used in references/links between objects.
-
How can I make calls to the Freebase API from within an Access query?
-
You need to make an HTTP query to our REST API. I'd recommend looking up the Access documentation to see how to do that; I'm sure there's a library for it.
-
-
-
I created a new type which includes a property that is an enumeration and then co-typed it with /common/foreign_key_property so that I could provide a URI template for it. I actually wanted two templates, so I created both and assigned them to the URI Template property, but after adding the second and refreshing the page, the first template, which had been displaying correctly, got dropped and only the second was displayed.
Does the formatter for the web pages restrict types to contributing only a single template? Is there a way to work around this?
An example of a topic which uses the new types is http://usnris.freebase.com/view/en/washington_monument
-
/common/uri_template/template is a unique property, so the second URI replaced the first.
A workaround would be to create another property and template that property, however that may be a denormalization of your data.
-
I guess the client was confused then, because it let me add a second value to the property, reorder the values, etc. It definitely didn't think it was unique.
If the topic page formatter thinks it's unique though, that's what counts. I guess I'll have to figure out a way to provide a landing page or some other mechanism to work around the limitiation.
-
-
-
Is there a way to constrain a query to return either only those topics which have a single type or only those topics which have the type /common/topic and no other? I'm presuming these two queries are equivalent in practical terms.
I wasn't able to find any MQL set operators that look like they're powerful enough to do the trick.
-
Thanks, that does the trick. I'm not sure I would have thought to look up all types and exclude all of them except the one I wanted.
-
Neither would I! - just that I had asked a similar query a while ago and someone else had been kind enough to provide the above.
Be careful with attempting to type untyped topics, as I ended up creating a lot of bucket/catch-all types on subjects I know very little about - see my Politics, Philosophy and Economics base for example!
Also, be careful with meta topics - they are named 'x of y'; such as 'Economy of Angola' or 'Politics of Angola' - and cannot really be typed that well, (except perhaps as a book subject or field of study, but that isn't really too useful). For these I think it is best to extract the facts from them (e.g. the GDP from Economy, or a list of politicians from Politics) and then delete the meta topic. You can then fill in the 'Angola' topic with these facts.
-
If you're interested in typing currently-untyped topics, you might like to look at Typewriter. We've typed something like 43,000 topics in the last week or so. I'm after them to add in features to let you search on a term (eg. "monastery") and specify a type (eg. /base/monasteries/monastery) to type the things as. We might see that feature soon, I hope!
-
Sigh. Typewriter.
-
Typewriter looks cool, but it's pretty well hidden. How do users find out about it?
Where does feedback on it go? If you're not logged in it just gives you a blank screen when you click on a type without any hint as to what's wrong.
It also doesn't seem to be working off the live database since many of the "place of interment" listings already got typed as part of my Cemetery sweep. If you click through to the topic from the list, you can see that they've got both Cemetery and Place of interment assigned. How often do the lists get regenerated?
-
Typewriter is new in the last few days. It's still in shake-out phase, but I'll be blogging about it shortly. Meanwhile, you can see new Freebase apps by going to our app editor and checking either Recent Apps or Featured Apps. (I should really ask Jason to feature Typewriter, not to mention putting an attribution on it linking back to Acre!)
The source of the assertions is a database we have of "partial evidence". Al tells me that the data is currently a couple of weeks old, but there's a plan to have it update nightly. I could also ask Jason to have the Typewriter app itself skip any that already have been asserted. Maybe he'll join this conversation -- I'll point him over here.
-
Others who are doing data cleanup tasks which can be driven off topic name keywords and don't want to be constrained by what Typewriter thinks is important might be interested in my Untyped application. Give it a keyword and it'll find all topics which have that word in the topic name, but which haven't been typed.
Want to make sure that all things "Boston" are typed in some fashion? This is your tool.
This should be possible to do directly from the topic table view, but it doesn't appear to be.
-
Thanks, tfmorris! This will definitely be helpful for people who do that sort of thing -- me included!
The ability to specify a search term of your own for Typewriter is one that's been asked for already. I believe they're working on it. The hard bit (oddly enough) is remembering what people have voted "no" on.
-
I'd like to be able to define a new typewriter queue just based on any arbitrary mql query. Hopefully, I'll convince the right people to make that possible. :-)
-
Thank you so much for the untyped application! this will probably be my new addiction :)
-
oh, and am I the only one who can't get Typewriter to work?? I can finally log in, but now I keep getting an error when I click on a type:
Unhandled exception: TypeError: Cannot read property "score" from undefined (/freebase/apps/hosts/com/freebaseapps/typewriter/queue#9)
- /freebase/apps/hosts/com/freebaseapps/typewriter/queue:9
- mjt/src/template.js:246
- mjt/src/linker.js:414
- mjt/src/linker.js:368
-
@evening -- I've commented that part of the app out (was for a future feature anyway). But I'm guessing that you're still not really logged in.
Can you try one more time after hitting the browser refresh button with the shift key held down?
The next step I guess would be to actually look at your cookies...
-
jdouglas - going back to the site and it now works, so the not really logged in was probably it. thanks!
-
Does anyone know if the typewriter app is logging a user's accuracy? - i.e. having two or more different people vote on a topic, noting how often they agree and generating the statistics...
-
of course I like that idea...that's just fun. But it would also be interesting...esp if we could incorporate if someone like me untypes what someone did via Typewriter (doubt that's possible). Someone said a race car was a company. Um, no.
-
Untyped now shows article blurbs along with topic names. I thought of adding write support to allow you to type things from the index page, but for right now I'm going to force people to go to the topic page (which will hopefully encourage them to extract more structured data from the article). I cleaned up a few other minor things and added some more query examples, but that's probably it for the time being unless people have requests.
As far as Typewriter stats goes, you could definitely go nuts with this, doing stats by user, by user by domain, by Wikipedia category (which appears to be what the source lists are), flagging low quality taggers, controversial topics, etc.
-
-
-
My queries are returning a bunch of images which have been snarfed up from Wikipedia, but I can't see anything in their metadata which allows them to be identified as an image other than names of the form "File: .jpg".
Is there a property which identifies these as images someplace?
Failing that, is there a way to negate the text comparison operators? ie does not contain instead of contains
-
These "images" should be gone shortly - see this dev list email for some more details.
-
Thanks for the pointer. I had seen that email, but didn't associate it with the phenomenom that I was seeing.
-
-
-
I thought I'd play with a little data cleanup task to become more familiar with Freebase. There seem to be lots of cemetery topics which aren't tagged with any types at all, so that seemed like an easy one to tackle.
A little playing with MQL gave me the following query that seems to do what I want
[
{
"name" : null,
"name~=" : "cemetery",
"type" : [
{
"optional" : "forbidden",
"type" : "/location/cemetery"
}
]
}
]but when I click on "Table View," I get an empty table.
I first tried doing this directly from the views on the Explore menu, but wasn't able to figure out how to make that work either.
I'm sure I could write a program to do this, but at this point I'd just like to figure out a way to do it via the web interface. Is it possible to get a list of candidate topics to review and clean up?
On a related note, many of these topics have no type at all. When I type them as "Cemetery" I'd expect that to automatically imply "Location" and "Place of Interment" but it seems that each of these types needs to be added separately. Is that correct or am I misunderstanding something?
Tom
-
I tried the same thing you were trying, and got the same results. I would suggest filing a client bug at bugs.freebase.com (if you don't mind).
Currently cemetery doesn't have any included types - we can add that. When you type something in the client, the client handles adding the included types. If you are going to type in MQL, you will have to make sure to add the included types in your type assertion.
-
The bug is https://bugs.freebase.com/browse/CLI-7404
Any suggestions on workarounds to get the desired list?
-
I've added Location and Place of Interment as included types now. We still have to go in and add those to all the existing cemeteries.
-
Thanks Jeff.
I just realized that my original query is actually *not* doing what I want. It is returning all topics which have "cemetery" in their name and is not excluding those which are of type "/location/cemetery" as I'd hoped.
Do I have the nested query wrong? How do I exclude things already typed as cemetery?
-
Never mind, I figured it out.
"type" : [{"optional" : "forbidden", "type" : "/location/cemetery"}]
needs to be
"type" : [{"optional" : "forbidden", "id" : "/location/cemetery"}]
-
-
-
Hi all,
I have just studied in Freebase. The database is very interesting and, I hope my project can use it. When studying your dump-date, I have something I am not sure. So I have some question.Firstly about Freebase dump data structure :
- You public the dump-data each three month, don't you ?- I downloaded your dump data, there is many folder and file, and I do
not really understand its structure :
+ Does each folder correspond to a domain ?
+ Does each domain correspong to a folder ? :D that is two different
questions, I mean 1-1 correspondance.
+ Does files.tsv correspond 1-1 to a type ?
Secondly, Is there inheritance relation between two Types ? Because I
found that almost folders in dump date have not any sub folder, instead
of the "base" folder.Thanks in advance.
-
-
-
Hi,
I am a new member here, and have some questions in mind where I cannot find the answers.
Anyway, let us say as a new member, I created a new base, and I wanted to add some topic about "Roger Federer", the tennis player. The truth is, he already exists in "Tennis" base. but my question is, how do I know that someone has already described him, and how could I RE-USE the same URI that has been assigned to him? If I re-invent a new URI for him, then how data aggregation could ever be done?
Hope I am making sense, and I hope to hear from you guys soon.
-
Hi, Liyang, and welcome. Roger Federer isn’t represented by a URI in Freebase, but by a node in our graph database. If you add him as a topic to your Swiss People base (let’s say), you are adding the same concept, and any additional information you add about him will accrete to the original Roger Federer topic.
The way you know that someone has already described him is that if you start to create a new topic called “Roger Federer,” the Web client auto-complete box will show you that there is a topic of that name which is a Person, Tennis Player, Olympic athlete, Pro Athlete, etc. If you are looking for that Roger Federer, you would select it instead of creating a new one. On the other hand, if you were trying to describe your cousin Roger Federer the couch potato, you would create a new Person of that name instead.
Using the API, it is very easy to create redundant new topics, which is why we ask that API users be careful to reconcile topics before importing data.
-
Thanks Crism for quick response.
So it is fair to say that it is up to the GUI side (client auto-complete box) to hint us that an existing instance could be the one we want to describe, in our example, this pre-existing instance is called "Roger Federer", and we indicate that this instance is indeed the one we want to add extra facts to by selecting it.
However, in real world, different word could mean the exact same instance (topic). For example, some one has already described a camera topic (instance) call "Nikon D70" (a digital camera) and without knowing this, I start to add a new topic int the same camera bass, and I named it "D-70 by Nikon", in this case, can the auto complete-box show me the pre-existing "Nikon D70" instance - the point I am trying to make is that I am a little worried that there might be cases where we created multiple instances for exactly the same "thing" in the real world, and data aggregation will then cannot be done correctly.
-
The goal of the Web UI is to make reconciliation as easy as possible. The name is not the only thing that is used; the relevance algorithm is constantly being tweaked to try for the best possible results.
There will inevitably be duplicates created. That is why we have the “flag for merge” operation; when users spot redundancies, they can flag them for other users to vote on. If the vote passes, the topics are brought back together.
-
I see. Thank you very much for making this clear.
-
Hi Liyang, I won't repeat what crism has well explained, but I wanted to highlight one feature for noting the multitude of names for a topic: every topic has an alias field, or "also known as", under the topic name. If you come across a topic with other known (English) names, please do fill them in.
For example, "Gordon Sumner" is an alias (his real) for Sting; "American Automobile Association" is an alias for AAA. This simple feature has done wonders for effectively cutting down duplicate creation.
-
thanks! this makes me feel much better now. :-)
-
-
-
Hi my friends,
I want to get all types (guid & name) in a domain with a given guid (id) of the domain by a MQL. Example with domain architecture with "id:= /architecture"or guid = "#9202a8c04000641f8000000003c94278"
First, I did:
[
{
"domain" : "/architecture",
"guid" : null,
"id" : null,
"timestamp" : null,
"type" : "/type/type"
}
]However, I only want get all types by domain's guid:
[
{
"domain" : [
{
"guid" : "#9202a8c04000641f8000000003c94278",
"type" : [
{
"guid" : null,
"name" : null
}
]
}
]
}
]Of course, the second query is error, but how I can get by domain's guid.
Thank you.
-
-
-
Hi,
I want to delete my complete profile from FreeBase. I also want to remove all my Groups/Topics/Base in short everything from FreeBase.
Please let me know how to delete the account permanently.
Thanks,
Kapil
-
This is currently a feature that is being worked on (http://www.freebase.com/view/guid/9202a8c04000641f8000000008647dce); however, in the meantime, I will find someone to take care of your delete request.
-
-
-
Hi,
I am a new member here, and I am already impressed by the work here, I really like this site and I hope something extra-ordinary can come out of this.
It seems a little confusing to me why freebase uses some different terminology. For example, my understanding is that "base" in fact means a "domain", "type" maps to class in ontology, and "topic" basically maps to "instance". so why not directly use the concept of ontology?
Also, why not re-use some existing ontologies? For example, FOAF is good for describing people, Dublin Code for publications, like Yahoo has chosen couple existing ontologies...
Anyway, I like the site a lot, but just have some questions as above. I appreciate your answers!
-
You're right, there is a lot of overlap between Freebase terminology and SemWeb terminology but I'm not convinced that Freebase would be any more accessible or easy to use if it adopted standard SemWeb terminology. As I see it, Freebase types and properties less sophisticated than classes and attributes in something like OWL Lite so to give them the same name might give people false expectations about how they behave. For example, you mentioned that Freebase topics are like ontology instances but in fact Freebase has a lower level type called Object which is like an ontology instance and Topics are more like SKOS Concepts (at least in my opinion). For the average Freebase member who just wants to make a base about their favorite sports team, these type of distinctions just aren't relevant. So I think that the folks at Freebase have taken the right approach in choosing to define their own set of terms that appeal to a much wider audience.
All that being said, the underlying technology that powers Freebase is very compatible with the ideas of the Semantic Web and there are efforts underway from people like Jamie Taylor to bridge the gaps between the two communities. In October, Freebase started publishing all of their content as linked open data. Shortly after that, Chis Bizer from DBpedia created a set of links from DBpedia instances to Freebase topics and just recently the Open Calais project has announced that their upcoming release will automatically annotate text with Freebase topic URIs. I've also been working on developing some of my own mappings between Freebase types and some common ontology types like FOAF in my Ontologies base. The next step for me would be to combine these two approaches to make Freebase data available as RDF data using common ontology types.
-
-
-
Hi my friends, I'm sorry for re-post.1. I'm going to divide Freebase into 4 categories of topics:
- Real topics are topics implemented other types, for example: "Obama".
- Domain topics are domains in freebase.
- Type topics are types in freebase.
- Property topics are properties in freebase.
I queried with each guid (id) to get its types, then base on these types I'll separate each topic into each group. How can I categorize them correctly?
2. Because we have type/domain equivalent topic, so that in order to classifying "a real topic is a child of a another real topic" (example: "Obama is a child of topic person", "OpenOffice is a child of topic software" )
Then with real topics, first, I'll create following types:
- Person(created by freebase): real human, this type is associated with type person
- Animal (of course not person): each topic add this type will be known as an animal, this type is associated with type animal.
- Abstract (except action): each topic add this type will be known as an abstract definition, example: "software" is a abstract definition, this type is associated with type abstract.
- Material (objects): each topic add this type will be known as an object is constructed by a specific kind of material, for instance, "table" is made from "wood", this type is associated with type material.
- Action: topics are verbs such as: "repair", this type is associated with type action.
* Second, with each group of topics I have to add this group with an appropriate type that is one of 5 former types, so my question is:
- How I can add all topics in to a type: by a tool of freebase (in freebase has a tool for adding but it limits the number of topics) or using MQL write?-
B.B., I think it might help if you went up a level and explained what your goal is in broader terms. It’s hard to understand how to help you from that description.
You’re talking about real topics, domain topics, etc.; in Freebase, we just call those topics, domains, types, and properties. And we don’t say, “Obama is a child of topic person,” but, “Obama is an instance of type Person.” We also already have types for Person and Animal; the other three seem interesting, but as with other type proposals, the big question is this: What properties distinguish these types and make them interesting?
Once you have created a type, you can add multiple topics to that type by using the view associated with that type. Take a look at any type in Freebase currently; you will see controls on that page for adding new instances. You can also use MQL writes; any operation that the Web client does is done via MQL, and can always be executed directly.
Please remember to do your testing on sandbox-freebase.com. (-:
-
Hi crism,
Thank you for your answer.
Freebase is constituted by a huge collection of topics and others, in general they are broad but we can say they belong to and are categorized into 5 groups as I metioned before in order to help users could understand and use them easily.
If I create type Abstract (Action or Meterial), I'll care about its properties not deeply because I only need to focus on what topics'll add it as a type, for example, when say about "software, virus, expressionism, etc" people'll understand they are abstract definition not other. With type Action, if we have verbs: "repair, burn, compare, etc" we'll know that they have action. I'm concentrating on what topics adding other types.
Thanks for supporting
-
-
-
This is the first time since the new Base focus update that I've created a new base. in the Add Data area, I added all the recommended topcis/types. But now there's two of everything. Did I accidentally add things twice? Or is this a bug?
-
I haven't seen this happen with the bases I've created, so I think this may be user error, but can you point us to the base in question so we can have a look?
-
It is the Vermont base. Thanks
-
Hey Evening, had a look at this yesterday afternoon and I think it's user error; I had a similar thing happen when I made my Pink Floyd base as a result of accidentally hitting the "Add Data" button twice. It looks like you've cleared out the extra views, if you have any other problems let us know.
-
-
-
Hi my friends,
I want to create some new types after that I will add a group of topics or a base, for example:
I'll make type "Abstract"
so any topic adds this type then it is considered that it has the abstraction (an idea, feeling or quality, not as a material object) such as: software, human, and there are many terms have meaning like that, but I can't add each keyword manually; thus, how I can add all the topics (keywords) as I mentioned before.
Thanks u.-
Topics can be list imported to types using the import tool links that display after clicking "Add it" or "Add more" on a view. Data can be list imported to topic properties by clicking on the "Import list" button next to the property.
-
Thanks u, spatiled.
-
Yes, I did it, I've not read MQL write, but I want to add multiple topics to a type by using a MQL query. Is it possible?
-
-
-
Hi friends,
I'm sorry if I ask you this question although I know name and id are the basic properties in Freebase. However, I want to have the certain confirmation abou that.
-
Every Object in Freebase has an ID and a name and as far as I know all the data commons and user-generated types are objects. Compound Value Types are objects so they have IDs and names but most people don't use the name property since its not displayed in the UI.
Primitive data types like Date/Time and URI are not objects so they don't have names or IDs.
-
Thanks you, narphorim.
-
-
-
Hi Guys,
I looked through data dump available from Freebase site but couldn't figure it out how to convert this into RDF. I need help in form of tool or just simple description of this format and how it relates to rdf.
Rajeev
-
I don't think the data dumps are available as RDF. The data dumps that are available right now are formated as TSV files and as far as I know there is no direct relationship between those files and the linked data that Freebase provides.
-
This is description i found on download page:
Link Export - A full dump of Freebase assertions in a simple utf8 text format. This is a complete "low level" dump of data which is suitable for post processing into RDF or XML datasets.
So i beleive it is suitable for coversion into RDF. I have also seen some threads on different discussion boards where people has done it but i couldn't find any direct reccomendation on how to do it.
-
I forgot about the full link export. Freebase is built as a collection of links just as RDF datastores are built as a collection triples. So the link export is like a complete copy of the underlying Freebase graph.
I don't have any experience converting between Freebase links and RDF triples but you can get a good idea of how they map to one another by comparing the sample data provided on the download page with the RDF of the same topic as it appears in Freebase.
I'd also like to put in a shameless plug for my ontologies base which provides some mappings from Freebase types to common web ontologies.
-
Rajeevpra -
Narphorium's direction with the Link Export is the easiest way to proceed.
More specifically, think of the rows in the Link Export as N-Triples (http://www.w3.org/2001/sw/RDFCore/ntriples/) where the first column is the subject, the second column is the predicate and the third column is the object (when the object is a resource, otherwise the fourth column is the literal with type info in the third column.)
Its easy to construct Freebase RDF URIs from the Link Export data. The URIs take the form http://rdf.freebase.com/ns/FREEBASE_IDENTIFIER - where the FREEBASE_IDENTIFIER is a valid Freebase ID with the slashes replaced by dots.
/guid/9202a8c04000641f8000000001100826 becomes
http://rdf.freebase.com/ns/guid.9202a8c04000641f8000000001100826
and /film/performance/actor becomes
http://rdf.freebase.com/ns/film.performance.actor
So the row in the Link Export that reads:
/guid/9202a8c04000641f8000000001100826 /film/performance/actor /guid/9202a8c04000641f80000000000afc87
becomes the N-Triple:
http://rdf.freebase.com/guid.9202a8c04000641f8000000001100826> http://rdf.freebase.com/film.performance.actor> http://rdf.freebase.com/guid.9202a8c04000641f80000000000afc87> .
and
/guid/9202a8c04000641f80000000000afc87 /type/object/name /lang/fr Steve Martin
becomes
http://rdf.freebase.com/guid.9202a8c04000641f80000000000afc87> http://rdf.freebase.com/type.object.name> "Steve Martin"@fr .
I was thinking a good Hack Day hack would have been to write a sed script to do this....but I couldn't find any collaborators. If your interested, I'd also be up for collaborator to help create/test an open source script that would do the conversion and add in some additional bells like vocabulary mapping, etc.
J
-
-
-
Hi my friends,
I was wondering some questions:
- First, I want to devided our topics into 2 groups: topics have action like "repair" and topics don't have action like "software".
- Second, I like discovering the relation among "real" topics that are not "types","domains" or "bases", for example:
Topic "Obama" and topic "human", it's clear to see " Obama is an instance of huma", so that we can say "Obama" belongs to "human", and "human" is "parent" of "Obama".
We can do it by MQL query? or by any others ways in freebase?
Thank you.
-
In Freebase, most of the topics are named entities like "software". Actions like "repair" are mostly represented in the schema as properties. If you'd like to model the relationship between "action" words and their corresponding Freebase properties I've created a simple type that can represent those relations for you. Once you've entered a bunch of those relations you should be able to start data mining some text. Another user was asking a similar question on the developer mailing list last week
Thinkbase is a really cool application that lets you browse through the relationships between Freebase topics. If you want to find those releationships in MQL you need to query the underlying links like this.
-
Thank you, narphorium.
It's great. I've just read yours. I'll try it immediately.
-
Hi narphorium,
I found it is ok, but I'm wondering :
- How topics have their relationship in Metaweb?
- We could name these relationship, for example: "parent-child" in "human-Obama" and other relationships if it has?
I query by using MQL, but I understand it not clearly.
-
Topics are related to each other in MQL using links. Each link has a source a target and a property so in your example, the source is /en/barack_obama, the target is /people/person and the property is /type/object/type. This is what's commonly known as an is-a relationship but there are many different relations available in Freebase as you can see here.
Another common relation between topics is broader/narrower. This type of relation is used in several places in Freebase like Organism Classification, Location, File Format & Profession. I have started mapping some of these common relationships onto the SKOS ontology which is a popular framework for this type of work.
-
Thanks a lot, narphorium
I think Freebase is quite well for people discovering themself, open, large as its name. I'm asking myself:
- Does freebase evaluate the weight of a term? for instance, if I type "arnol", freebase suggests me "Arnold Schwarzenegger" in the first list. It means "Arnold Schwarzenegger" is more important than others?
-
Yes, I don't know the specifics of how they weight the terms but if you search for "arnold" using the Search API you will see that each result has a relevence:score and that "Arnold Schwartzenegger" is ranked first.
-
Thanks you, narphorium
You support me very well, I'll try myself.
-
-
-
I have a website that incorporates the freebase suggest tool. Im having an issue when not all topics have
ID`s in the form of
http://www.freebase.com/view/en/george_w_bush for example in searching for George W. Bush
an example is
http://www.freebase.com/view/guid/9202a8c04000641f80000000047953d8
in searching for Iphone.Why dosn`t
-
Some Freebase topics (like George W. Bush) use Wikipedia keys as their ID but there is no rule that says that they have to. By default, Freebase assigns the GUID as the ID.
Why is this breaking your website? Freebase-suggest should be giving you the correct ID (/guid/9202a8c04000641f80000000047953d8) when you handle the fb-select event. Then you just append it to http://www.freebase.com/view and you have a valid link to that topic.
-
I have a database that isn't ported to freebase. It was easier to link with the Freebase topics (like George W. Bush).
How do I do a nested query by id/name/keyword and return 1 guid,
take that guid and query its primary properties?
-
Reconciling an existing database with Freebase can be a challenging task because Freebase has so much information that you often have several topics that share the same name. For example, Freebase has 179 different topics all named "London".
If you know the Freebase type that you're looking for you can use the Reconciliation Service to get a ranked list of cities named London, for example. In practice, a lot of the terms will have an obvious match but many of them will still have to be reconciled manually or by using additional heuristics.
Once, you've reconciled each topic in your database with its corresponding Freebase topic ID you can query the Read Service for the properties of an individual entry. There are no "primary properties" per se, just different views of a topic's properties depending on which type you're looking at.
I recommend reading the first two chapters of the MQL Reference Guide. to help famililiarize yourself with some of the basic concepts.
-
-
-
I am a new users and I created a table, named "Kampung Museum" in error.
Having been trying to deleting it but cannot seems to find away.
Can anyone help me with this. Many thanks in advance for the assistance.
-
From your home page click on My Types and then click on the Kampung Museum type. This will show your table in "schema view". At the top right of that view there should be a tiny link that says delete.
-
HI Narphorium,
Thanks very much, found it. Appreciate your help.
-
HI Narphorium,
Thanks very much, found it. Appreciate your help.
-
-
-
Hi,I have a rather simple question about a query in php, I would just like my result to return (in this case) any album name which contains the word "love". For the moment, it just spits out all albums...I'm not sure how to get it to narrow down with this criteria
"type" => "/music/album",
"limit" => 200,
"name" => array()));Thanks!
-
The MQL Cheatsheet covers this exact problem under Textual Comparisons.
In your case, I think you just need to add the following line:
"name~=" => "love",
-
awesome, thanks!
do you have any idea how to get this done, but with many different terms? the "|=" works to check for multiple terms, but it looks for an exact match, while the "~=" will only accept one parameter...
-
I don't think its possible to do that all in one query. You'll have to build a seperate query for each term and merge the results in your application.
Luckily Freebase allows you to send multiple queries at once. An example of how this is done is shown on page 2 of the cheatsheet.
-
great! thanks for your time.
-
-
-
I have a query:
http://www.freebase.com/api/service/mqlread?queries={"a0":{"query":{"type": [],"guid":"#9202a8c04000641f8000000009219644"}}}
I also tried by using C#, but it still raised error.
Did I make a mistake?
-
I believe you have to escape the #. An alternative, and probably preferred way it to refer to topics by id (not guid) like, http://www.freebase.com/api/service/mqlread?queries={"a0":{"query":{"type":[],"id":"/guid/9202a8c04000641f8000000009219644"}}}
-
Thanks cheunger, by testing your query, it run well
I tried by using query editor then it's ok, but in my C# program I set "#9202a8c04000641f80000000000ce52c" as the input parameter, and I got the url exactly as u seen above, however it didnt run.
-
As I mentioned above, you need to URL encode the # symbol.
-
Hi cheunger,
I did exactly what examples guide. I tested successfully with input parameter as "name", but it is failed with "guid".
private static string server = "http://www.freebase.com";
private static string queryurl = "/api/service/mqlread";
private static string trans = "api/trans/blurb";
string keyword;string query = "{\"type\": [],\"id\": \"" + keyword + "\"}";
string envelope = "{\"a0\":{\"query\":"+query+"}}";
string url = server + queryurl + "?queries=" + System.Web.HttpUtility.UrlDecode(envelope);
HttpWebRequest request = (HttpWebRequest)System.Net.WebRequest.Create(url);
request.Method = "GET";
request.ContentType = "application/x-www-form-urlencoded";
request.CookieContainer = authCookies;
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
StreamReader reader = new StreamReader(response.GetResponseStream());
StreamWriter sw = new StreamWriter("freebase.txt", false, Encoding.UTF8);
string content = string.Empty;
content = reader.ReadToEnd();
sw.Write(content);
sw.Flush();
sw.Close(); -
Shouldn't you use System.Web.HttpUtility.UrlEncode(envelope) ?
-
Hi,
I also used System.Web.HttpUtility.UrlEncode(envelope, but it's not different from UrlDecode() function.
-
The easiest way to debug this problem is to print your "url" variable to the console and enter it into a web browser. From there, the read service will return an error message which will help you figure out why the query is failing.
In this case, the problem is that your query envelope is constructed using the multi-query notation but you are passing it using the single query parameter. You need to use the parameter "queries" instead of "query".
-
Hi narphorium,
I used string url = server + queryurl + "?queries=" +", I aslo print the value of this url in debugger of C#, it's fine, but when I put it in the browser it failed. I'll check it carefully why. Thanks
-
-
-
Hi all,
First, I make a query with input is a "name" or "id" or "guid" in order to retrieve all "topic" associate with input parameter.
Second, I want to get "id" or "guid" of all received topics by using a query (include guid of parent and child topic/type)
Finally, I like forming a query include two quereis above.
How can I do that?
Thanks
-
If your first query was:
[ { "name" : "John Smith", "type" : "/people/person" } ]
Then all you have to do to get the id and guid is to add them to the query with null as the value and freebase will fill the values in.
[ { "guid" : null, "id" : null, "name" : "John Smith", "type" : "/people/person" }]
The MQL Reference Guide goes over this in more detail. You should read though some of the examples to get familliar with how MQL queries are constructed.
-
Hi narphorium,
Thanks for your answer. I've read MQL guide, and did both two query seperately, but I found difficult to resolve it. I'll try more.
-
If you post the two queries that you're trying to combine, I'd be happy to take at look at them.
-
Thanks for your support, narphorim,
First, I have a query to get all parent types, for example:
{
"id":"/guid/9202a8c04000641f800000000001805e",
"type":[]
}And the result is:
{
"id" : "/guid/9202a8c04000641f800000000001805e",
"type" : [
"/common/topic",
"/people/person",
"/people/deceased_person",
"/government/politician"
]
}So I split it to obtain all types:"topic, person, deceased_person, politician".
Then did I make right query to retrieve "id" or "guid" of these types by using this query?
such as:
{
"guid" : null,
"id" : null,
"name" : "politician"
}You can combine two query in the right way to get exactly "id" of each type?
-
I did in this query:
{
"id" : "/guid/9202a8c04000641f800000000001805e",
"type" : [
{
"guid" : null,
"id" : null,
"name" : null
}
]
} -
Yup, that query looks like it gives you what you want.
-
It's ok if I use "guid" as an input, but suppose I use a name such as "People" like:
{
"name" : "People",
"type" : [
{
"guid" : null,
"id" : null,
"name" : null
}
]
}It is not satisfied my desire.
-
If you type that query into the MQL Query Editor it returns the following error message (way at the bottom):
"Unique query may have at most one result. Got 100",
This is a common mistake that happens when you format you query like this {...} instead of like this [{...}]. The first form means that you are asking for a single object, the second form means you are asking for multiple objects. You can fix your query by enclosing it in square brackets like this:
[ { "name" : "People", "type" : [ { "guid" : null, "id" : null, "name" : null } ] }]
-
The easiest way to avoid that problem is to always use the second form. It will work for any number of results.
-
Thanks narphorium,
I've done and got that.
-
-
-
Hi - First off I'd like to say: great service! Thanks guys!
I tried accessing Freebase through the API from a Google AppEngine application to no avail: the google proxy server returns an error to the effect that Freebase has blocked the proxy.
Is this on purpose? i.e. is Freebase blocking the google proxy?
Regards,
Jean-Lou Dupont
-
Hi Jean-Lou,
we've been having some technical difficulties with Google today and our technical support team is looking into it. I'll post back when we have more info, but you may want to try again later and see how things work out. If you still have problems, let me know what kind of error messages/etc. you get and I'll relay them to the appropriate people.
-
No, we do not explicitly block the Google proxy, and the issue that Phil was referring to is unrelated.
Could you give us more details about the exact request you were making, the exact error message, and the exact time? (The time will help me locate anything relevant in our system logs.)
-
Jean-Lou, can you provide more specific detail about what the proxy server error message was?
-
As well as what you were attempting to do when you got the messge?
-
-
-
Example with this query
http://www.freebase.com/view/en/arnold_schwarzenegger
How I can gain the description of Arnold Schwarzenegger by a MQL query:
"Arnold Schwarzenegger is an Austrian-born bodybuilder (Mr. Olympia), actor (The Terminator), and politician (Governor of California)"
-
Hi there,
you might want to check out this discussion on the developer's email discussion list:
http://lists.freebase.com/pipermail/developers/2008-June/001753.html
The basic answer is: you can't because the description is stored in a file system rather than in the graph database, which is what MQL queries. If you want to get the description you have to do it by means of the API trans service. Here are the details for that:
http://www.freebase.com/view/guid/9202a8c04000641f8000000006cf5605
You'll need the GUID of the content that you want to retrieve.
-
Thanks philg, but I think everyone likes retrieving description that is included in MQL query rather than using trans service or re-quering wikipedia.
It's my opinion.
-
Opinion noted. Meanwhile, you still need to use the trans service.
-
I agreed. Everyone wants the description. I get that it is painful to put that in the tree but geez that would have been a lot more convenient...
Don't take it wrong, but learning first how to use MQL ( ok, I get it, you don't like sql... ) and then learning that it is not what you have to use...
I bet you have that sort of topic every two weeks !!
-
Another feedback on the documentation :
Use a FAQ and a lot more examples of queries.
Examples are fast to understand. A lot more faster than everything else.
Just a page with 30 typical queries with description, image and stuff like that. That would be cool.
-
There are some MQL query examples at the bottom of the queryeditor.
-
Useful, but hard to find !!!
I had no way to find these without knowing it.
It should at least be put on top
-
-
-
Hi my friends,
I have got the description of a keyword by using trans service, and now I want to gain this for each "type/topic" in freebase.
How I can do that ?
-
The Freebase Data Dumps are a good place to download all the topics of a specific type. From there, you can look up each GUI the using the trans service to get the description.
Alternately, you can query the Freebase Read Service to get a list of topics and their GUIDs by type. For example, all people with articles.
-
Thanks, I understand yours
-
-
-
Hello. I'm a senior Computer Science major and I'd like to use Freebase in my senior project. However, I've never worked with an API like this before and I'm finding it difficult to find examples for basic programs. How do I call the Freebase service in my code? Which languages can I use? What kind of format does the data have to be in before I can upload it, and does uploading it mean it appears on the Metaweb servers as if someone had added something through the website? It doesn't seem well-organized for the novice programmer, and I could really use some help.
-
Did you check out the Help page? In the bottom right is a screencast of API & sample apps. The links under "Developing Applications" should also be helpful.
-
In addition to Ed’s suggestion… The API is HTTP-based, so any language with TCP capabilities can be used, which is to say, pretty much any language. You will find it easiest to use a language with libraries for HTTP connections and JSON serialization and parsing, but those are also thick upon the ground.
When you write information with the API, it is indeed the same as if the write had been done through the Freebase.com Web site. However, the Web client has some knowledge of the Freebase data model and generally keeps things clean; making direct writes via the API, it is possible to create broken shapes, so testing on the sandbox server is strongly encouraged.
If you are looking to load a lot of data, please contact us first; we have some internal prototype tools that can ease the process, and we can also help you test your code before unleashing it on the main server.
I would also strongly recommend joining the developers e-mail list, as well.
-
Okay, is there a set of example codes which do simple things? Nothing as large as the appendix B with that amount of Python code. I'm looking for bite-sized chunks in order to become familiar with how everything works.
-
That's weird... I just wrote a reply and it vanished. What i said was that I'd like to see smaller chunk of bite-sized code performing minimal functionality, just so I get an idea of how each discrete part works.
-
You should have a look at our Acre Server and App Editor:
http://www.freebase.com/view/guid/9202a8c04000641f80000000086ea59b
With app editor you can create hosted, server-side applications that use Freebase data. Better yet, you can clone files (like templates) and entire applications from other users, then tweak around with them to get them to perform in the way you want.
In a couple months we hope to have some more of the bite-sized example code you're looking for available, but, if you have some knowledge of HTML and JavaScript, App Editor should help you get started.
-
Which language would you like to use for your project? I'm sure there's someone here who could help you out with any of the mainstream programming langauges.
If you know Javascript and you've got experience with something like ASP, JSP or PHP then you should be able to put together a small sample application in less than an hour by looking at the existing sample applications in Acre. I just started learning it last week and I found it really easy to pick up.
-
-
-
looking for a way to query freebase through vbs or VB.
I want to get the results as a stringthnx,
Jur
-
I'm not too familiar with VBS or VB, but you'll need an API that can communicate using HTTP. A quick Google search turned up at least 1 such API. You can then use the freebase /api/service/mqlread API to query. The query is returned in JSON format; you can parse the response yourself, or maybe there's a VB JSON API that you can use. Good luck!
-
thanx a lot. I will try that
-
-
-
I've created a type: http://www.freebase.com/type/view/user/mlevison/agile_software_development/functional_test_tools and wish to change the properties that visitors will see in the default case (i.e no image, etc). How can I achieve that?
The whole goal of this is to build a repository of "Functional test tools" that users can quickly scan to figure out which tool they need.
As it stands the default view is of no interest.
Confused in Ottawa
-
Replied to related post in the Computers domain.
-
You can't actually save a view, per se -- you can only save a filter. E.g., if you filtered the view of your type for Domain Specific Language = "yes", you could save that. However, there is currently a work-around (although I doubt this was intentional and I can't promise that it will be around forever) -- if you click the "filter results" button, a field labeled "save view as" will appear; you can enter a name and save the view without actually running a filter. The saved view will then appear on your homepage (I think), and will have a stable URL.
-
For what it's worth, I believe this is the intended functionality, and that you *should* be able to save a view even if you haven't filtered. They just hid the "save as" thing back there because of screen real estate concerns.
-
-
-
Hey,
Simple and possibly stupid question... just wondering about grabbing images from entries in Freebase. I couldn't find any examples in the API documentation, but most articles now tend to have either a user-uploaded thumbnail, or a scrape of the equivalent Wikipedia article's image.
So does anyone have experience pulling images into your own apps and/or have an example of how to do so?
(Sorry if this has been answered before but I couldn't find anything...)
-
Check out the Metaweb Application Reference Guide and follow the link to §4.8, “Fetching Content with trans” in the Metaweb Read Services chapter.
-
I recently did this, and also, just fixed a bug in my program this morning. The bug happened because the code I copied from did not gracefully handle cases of multiple images. (Alas, I'm really just gluing together things without a lot of "understanding" and so these kinds of problems are happening to me a lot!)
Maybe this will help:
var query = { // This is our MQL query
type: "/music/artist", // Find a band
name: bandName, // With the specified name
id: null, // Fetch the ID of the band to link to their Freebase page
album: [{ // We want to know about albums
"/common/topic/image" : [{ // the images list on the album
"id" : null, // each image has an ID
"optional" : true // don't require an image to return a result
}]
};Once your query comes back, you should have a list of 0 or more images in the "/common/topic/image" field. Each image will have an ID. You can then pass that ID to Freebase's thumbnail API to generate a version of that image at any size you like:
http://www.freebase.com/view/guid/9202a8c04000641f8000000006cf560a
I'm not quite sure
-
At first glance, that query looks correct. You can test it out by throwing it into the queryeditor and testing it out.
-
Ooops, the "I'm not quite sure" was an accident, must have been scrolled off the bottom. I'm sure that's the query. :)
What I wasn't exactly sure about was how to get the dimensions of the original image, but I'm sure it's in there somewhere!!
-
/api/trans/image_thumb can return you the image in a specified height/width, but won't tell you anything about the original size. In your query, you can ask for the /common/image/size, which is a CVT that has the x/y sizes.
-
-
-
It's my understanding that every article has a GUID. But how do you find out that GUID if you are browsing and an article has a textual ID?
It would be nice if there was a button you could push to say "give me this article's GUID which will survive any renaming". Perhaps I'm just being daft, but I can't find this button in the interface. I even viewed source of the article to see if it was somewhere in there... but couldn't find anything.
Is there a way to do this?
-
It's not entirely obvious on the website, but you can get it easily through the API (just ask for the guid instead of id) or by using our developer toolbar. Click on the explore link and you should see it there.
-
A couple of further notes. First, don’t confuse the topic with the article. I am not sure if you are, or if it is just a terminological confusion; For example, the topic for Freebase has an article associated, which is a discrete object.
The non-GUID ID, when available, should be more useful in the long term than the GUID is. If two topics merge, either GUID may be the survivor, but IDs for either will still work.
All that said, the Explore view in the dev toolbar that Kirrily describes is pretty much the fastest way to find a GUID for a topic or its article (look for the /common/topic/article property in that view).
-
-
-
Hey all,
I have the following query to pull back 10 movies with the latest release dates:
[
{
"directed_by" : [
{}
],
"id" : null,
"initial_release_date" : null,
"limit" : 10,
"name" : null,
"sort" : "-initial_release_date",
"timestamp" : null,
"type" : "/film/film"
}
]The problem is thatit is pulling back films with null release dates, and on sort, I get those first.
Is there a way that I can specify that only non-null entries be returned; i.e. all films with a non-null release date?
Thanks for the assist
-
Hi mjs, try expanding initial_release_date and using optional:false
[
{
"directed_by" : [
{}
],
"id" : null,
"initial_release_date" : {
"optional" : false,
"value" : null
},
"limit" : 10,
"name" : null,
"sort" : "-initial_release_date.value",
"timestamp" : null,
"type" : "/film/film"
}
] -
That worked a treat; thanks for the help!
-
-
-
I want to have some basic statistics of images, e.g. how many images there are in freebase, how many objects or topics have images. Now my query is like:
{"type":"/common/image",
"id":null,
"limit":10000
}
and then parse result to see how many are returned. Then I change "limit" and see when it breaks. I wonder if there's any more systematic way of doing this? Thanks!
-
The result times out because there is a large amount of /common/image topics. Usually, the way to request counts is:
{
"id" : null,
"return" : "count",
"type" : "/common/image"
}But this will still time out on requests with a large amount of topics. You could query for the instance count which is tallied nightly:
{
"/freebase/type_profile/instance_count" : null,
"id" : "/common/image"
}but that isn't real-time.
Lastly, you could count yourself by using a cursor and counting until the end of the result set:
{
"cursor": true,
"query": [{
"id" : null,
"type" : "/common/image"
}]
}To find topics that have an image, you can query for them like so:
[
{
"id" : null,
"image" : [
{
"id" : null
}
],
"type" : "/common/topic"
}
]Again, the resultset is very large and will time out, so you will need to cursor and count yourself.
-
Thanks, that's really helpful!
Now if i'm not mistaken there're about 700K images and 330K topics with image. Does that imply that on average those topics with images each has 2 images? Thanks.
-
No, not necessarily - a /common/image topic may not be linked to a /common/topic topic (for whatever reason). You could use the last query to find out how many images each /common/topic topic has by counting the ids in the "image" clause.
-
Thank you. Then if a /common/image object is not linked to any /common/topic object, why is it there and how can it be presented to end users? Thanks.
-
You can just break the link between an image and a topic and not have the image deleted. Just for fun, I ran a quick analysis:
Found 716008 /common/topic topics with image links (out of ~4 million topics)
Note that more than one topic can be linked to the same image.
650326 have one img
63058 have two imgs
2296 have three imgs
328 have four or more imgs -
Thank you. It seems I don't know enough of MQL language; let me know if there's reference other than this website for I don't want to bother you like this.
I use the following code embedded in a perl code to count the number of topics with at least one image, and the result is about 438K--much lower than yours. By the way how to get the number of topics with exactly 1, 2, or 3 images? Can this be requested directly in the query?
{
"qname":{
"cursor":"query":[{
"id":null,
"limit":1000,
"type":"/common/topic",
"image":[{
"id":null
}]
}]
}
} -
Some MQL reference material can be found here. I iterated through topics with images and then recorded the number of links there were. Currently, you can't constrain the query to ask it to return topics with exactly n amount of images. I'm not sure why your results differ so greatly that mine - I'll try to investigate a little more.
-
Thanks. I counted the number of iteration for the code above and multiply it by 1000 (since I set the limit 1000) to get approximate image count.
-
Well, I got essentially the same results as reported above using metaweb.py. Are you using your own Perl module, or one from our API library?
-
The following is the code I used. Have a look only if you're free. I print out $count to see number of topics with images and $count~438
Afterwards I grep entire query result and got numbers close to you:
692001 topics with image
626805 topics with 1 image
62827 topics with 2 images
2210 topcis with 3 images
and so on...
#!/usr/bin/perl
use URI::Escape;
# This module provides the uri_escape function used below
# Build the Metaweb query, using string manipulation
# CAUTION: the use of string manipulation here makes this script vulnerable
# to MQL injection attacks when the command-line argument includes JSON.
#$band = $ARGV[0]; # This is the band or musician whose albums are to be listed
my $cursor = 'true';
my $query;
my $pre =
'{
"qname":{
"cursor":';
my $post = ',
"query":[{
"id":null,
"limit":1000,
"type":"/common/topic",
"image":[{
"return":"count",
"id":null
}]
}]
}
}';
my $allresult = '';
my $count = 0;
my $result = '';
until($cursor =~ /error/){
#while($cursor){
$query = $pre . $cursor . $post;
$escaped = uri_escape($query);
$baseurl='http://www.freebase.com/api/service/mqlread'; # Base URL for queries
$url = $baseurl . "?queries=" . $escaped;
$auth = 'metaweb-user=###Enter Your cookie data here###';
#$result = `curl -s --cookie \'$auth\' $url`;
$result = `curl -s $url`;
$result =~ /\/api\/status\/(.*)/;
$status = $1;
$result =~ /cursor\":\s*(\".*\")/;
$cursor = $1;
$count = $count + 1;
print $result . "\n";
}
# Use regular expressions to extract the album list from the HTTP response
#$result =~ s/^.*"album"\s*:\s*\[\s*([^\]]*)\].*$/$1/s;
#$result =~ s/[ \t]*"[ \t,]*//g;
#print $allresult ."\n";
print 'done'."\n";
# Finally, display the list of albums
#print "$result\n";
#
# vim: ts=2 sw=2 -
I suspect /api/service/mqlread is returning a timeout or error. My Perl is rusty, but the until loop doesn't look like it's checking for a 200 OK return response; it just looks like if you don't find a cursor, you assume the counting is complete and exit.
-
Hi parity, minor point: you don't need to send your authentication cookie for doing mqlread (only for mqlwrite).
-
-
-
Hi there...
I'm trying to use a "prettier" URL in my application than to the Freebase GUID-based one. Got my hopes up from what I read at http://www.readwriteweb.com/archives/freebase_overview.php
"Each permanent object in the system has a GUID - a unique identifier, something like this: #9202a8c040000064..... The identifier can be used to refer to the object via URL and via queries. In addition to the GUID, there are other ways to refer to the object, for example, http://www.freebase.com/view/en/leonardo_da_vinci. Beyond that, there are even other aliases, for example, you can refer to a public company by its stock ticker symbol. But regardless of the reference, the key point is that you end up with the same, unique node in the system."
That sounded good, but... how can you do this, besides typing in the stock symbol as an "alias"?
I'd imagine it's very common for a domain to have a property which is generally unique within that space. All things being equal, people would like to see a link with that instead of the GUID. But to have to type it in twice (once as a property and once as an "alias") seems like the wrong answer..
There are a lot of cool things in api/* but I haven't found one that would finesse something like this, any pointers? I'm just trying to get a link that will jump to the Freebase page for the topic...based on, say, the ISBN# of a book.
-
I think freebase has mimicked wikipedia in populating the "/view/en" (i.e. english language) namespace. Clearly, there can be only one leonardo_da_vinci, and that's not a problem in many cases. There are probably many topics in freebase that could be reliably identified by their common name in that space but the freebase staff (who control it) haven't caught up. Perhaps some collaborative feature in this are would be helpful e.g. "suggest a unique name for this topic", "flag this topic as more deserving of 'john_smith' " :)
your idea of creating other url paths that represent namespaces is fantastic e.g. NYSE stock symbols could be /view/nyse/ge. This could go a long way for providing user readable urls to topics.
I think freebase.com should consider this a pretty hot feature request; it's not possible now. At least, the company could start creating url/namespaces, but allowing users to create (or at least nominate them) should be considered as well.
-
Hmmm...
Well, if I could spec this, I'd like to be able to form an inbound link to Freebase by providing a property name and a value, and simply get a page to view the article from that. e.g. ("book/book_edition/isbn", "817525766") If this does not specify a unique article, then come up with a list of all matches.
It would be trivial for Metaweb to add an API that did this, it's just that once you start putting question marks and such in things it starts to confuse users, e.g.http://freebase.com/api/view?property="book/book_edition/isbn"?value="817525766"
So maybe overloading view (or something otherwise prettier) could be good:
http://freebase.com/view/book/book_edition/isbn=817525766
A key goal would be that when you loaded an article this way, you would not be redirected, but rather see that "pretty" URL in the address bar.
This way pretty links would come from properties of the data, without anyone having to do extra work in disambiguation that hadn't already been done.
-
We’ve done this for some properties already, like NAICS industry classification, IMDb IDs for actors and films. You can do it yourself in your own namespace; it might be a bit unwieldy (/user/metaeducation/isbn/0817525766) but it would work. If you come up with a good one we could link it into a shorter place (like /authority/isbn).
-
Really? This sounds good. How would I go about doing this?
As you probably guessed from our discussion in Music, I'm actually trying to link to albums by catalog #. (Imagine a manufacturer who has several releases of the same album, under different numbers, and would like the links to go to the appropriate Freebase article. So that's what we're looking for. A pretty URL with the catalog number in it, instead of GUID, which takes one to the appropriate page to upload cover art or edit the track info.)
It appears, however, that the albums are not correctly organized right now, since multiple releases of the same album are in Freebase as separate "albums". I'm worried about how doing the work of properly sorting releases might interfere with synchronizing the data with MusicBrainz... is it better just to let well enough alone?
-
You can make namespaces, such as /user/metaeducation/labels and /user/metaeducation/labels/capitol, with the query editor. Create an instance of /type/namespace and add a key into the parent namespace.
{
"type":"/type/namespace",
"name":"My Namespace",
"key":{
"value":"sample",
"namespace":"/user/metaeducation"
},
"create":"unless_exists"
}
will create an instance of Namespace addressable as /user/metaeducation/sample. You can add things to that namespace:
{
"id":"/guid/deadbeefcafebabedeadbabecafebeef",
"key":{
"value":"why_dead_beef",
"namespace":"/user/metaeducation/sample",
"connect":"insert"
}
}
As for uniqueness of albums: the problem is that MusicBrainz only models releases, not actual albums. We attempt to identify releases of the same albums, but we inevitably miss some as it is an automated process. Duplicate albums should be marked for merge.
-
Bear in mind also that ids must be unique within a namespace. If catalog numbers are all unique, this isn't a problem. But if they're only unique per label, this might be enormously cumbersome. If I'm reading you right, Chris, I'm seeing a one-namespace-per-label model, which, while theoretically do-able, seems like a vast undertaking.
-
-
-
-
Hi Guys,
I'm trying to do what I think is a basic query but I can't get my head around how to do this using MQL.
Basically I want to get a list of all games on the Xbox 360 - I've managed this so far:
{
"query":{
"games":[],
"name":"Xbox 360",
"type":"/cvg/cvg_platform"
}
}
Now this returns 2 results, nothing like I was expecting. Anyone know what I am doing wrong?
Cheers,
Chris-
Chris, the platform schema shows that the “Games” property is hidden and deprecated; what you want is the “Games On This Platform” property (
games_on_this_platform) instead. Keep in mind that that property points to a compound value type, so you will then need to ask for thegameproperty of that.{
"query":{
"games_on_this_platform":[{
"game":null
}],
"name":"Xbox 360",
"type":"/cvg/cvg_platform"
}
} -
Thanks for the reply. I do have a suggestion/question though for the site in general. Why not show, on the site, the query used to generate the data on the page?
For example, this page: http://www.freebase.com/view/reorder/topic/en/xbox_360?propertyId=%2Fcvg%2Fcvg_platform%2Fgames_on_this_platform&returnUrl=http%3A%2F%2Fwww.freebase.com%2Fview%2Fxbox_360
It would be good to see the query used to generate all of those results and would make it easier for people to get to grips with it.
-
I agree with the last statement. I was wondering exactly the same thing.
"Why not show, on the site, the query used to generate the data on the page?"
-
Actually, you can get the queries for most things! Take a look at this page: http://tinyurl.com/6h28kt -- that's a list of computer games where I've added the "platform" column then filtered on "Xbox 360".
Then click on "Use Results" and then "See the query".
That gives you a MQL query you can use in your own apps or wherever.
-
-
-
Is there a way to see my entire activty history? I added some stuff yesterday with the plan to go back and fill in data, but now I'm not sure if I remembered all that I added :) And the history in my user account doesn't go back far enough (not even the expanded view).
Is there a way to see this kind of info?
-
Hmmm, seems like you may have stumbled on to a regression. I'll file an internal bug, but in the meantime, you can try this URL: http://dev.mqlx.com/~nick/reports/userdetail.html?user=%2Fuser%2Fevening
Thanks for reporting this! -
I've been told that this has been fixed in the upcoming release.
-
Thanks!
-
FYI, looks like there is an error on the userdetail report
-
Is this a different error than the one you reported earlier? If so, could you provide more details?
-
This is a different one. When I go to the link you provided above (http://dev.mqlx.com/~nick/reports/userdetail.html?user=%2Fuser%2Fevening), I get a warning and error. I've copied it below.
warning
mjt.json_from_js: undefined value is illegal in JSONerror
errorevaluating codeblock #top{"lineNumber":null,"name":"SyntaxError","message":"Expected identifier, string or number","prev_lines":[],"the_line":[[[ERROR: undefined value]]],"next_lines":[]}
SyntaxError: Expected identifier, string or number
---NaN--> -
oops, that didn't paste quite right. let me try again.
warning
mjt.json_from_js: undefined value is illegal in JSON
error
error
evaluating codeblock #top
{"lineNumber":null,"name":"SyntaxError","message":"Expected identifier, string or number","prev_lines":[],"the_line":[[[ERROR: undefined value]]],"next_lines":[]}
SyntaxError: Expected identifier, string or number
---NaN--> -
It looks like the client team has already fixed this in our upcoming release - thanks for reporting this, though.
-
http://dev.mqlx.com/~nick/reports/userdetail.html?user=/user/evening
Try it without the escaped "/" as "%2F"
(Its possible this might be a site only accessible internally at Freebase Headquarters?)
Here's a very useful page of tools:
http://www.freebase.com/view/guid/9202a8c04000641f8000000005bbe084
-
-
-
Hi I'm sure this exists somewhere in all the docs available but I haven't been able to find it; I am building an app which treats freebase as a graph and therefore needs a query which treats records as nodes with arbitrary properties. This is more or less the functionality of the freebase search function. If I select the /common/topic "norway", I need a query which will return all its properties, and somehow give me the ids of all its related objects (location, country, governmental jurisdiction etc) so that I can do the same thing on them.
All of the MQL examples focus on getting defined, very restricted sets of data so I'm not really sure how to go about this.
-
Ok i found it!
[
{
"/type/reflect/any_master" : [
{
"id" : null,
"link" : null,
"name" : null,
"type" : []
}
],
"/type/reflect/any_reverse" : [
{
"id" : null,
"link" : null,
"name" : null,
"type" : []
}
],
"/type/reflect/any_value" : [
{
"link" : null,
"type" : null,
"value" : null
}
],
"id" : whatever
}
]
awesome! -
ok but here's a new problem with that approach:
"/type/reflect/any_master" : [
{
"*" : null,
"link" : null,
"name" : null,
"type" : []
}
]
will for instance give me lots of records I don't want. I need to filter it by type, but I can't seem to find any syntax for that. exclusion operators don't work on ids so I can't say "type": [ "id~=":"/type/permission" ] or whatever it would be. Any way to do this in the query? -
Hi zwit, have you read the latest version of the MQL tutorial? I think it should cover what you're trying to do. If not, ask for more help.
-
-
-
Hi I'm sure this exists somewhere in all the docs available but I haven't been able to find it; I am building an app which treats freebase as a graph and therefore needs a query which treats records as nodes with arbitrary properties. This is more or less the functionality of the freebase search function. If I select the /common/topic "norway", I need a query which will return all its properties, and somehow give me the ids of all its related objects (location, country, governmental jurisdiction etc) so that I can do the same thing on them.
All of the MQL examples focus on getting defined, very restricted sets of data so I'm not really sure how to go about this.
-
-
-
Is it possible to perform multiple search request, i.e. doing several http://www.freebase.com/api/service/search?limit=1&query=Embassy with just one mqlread? Something along the lines of:
http://www.freebase.com/api/service/mqlread?queries={"q0":{"query": {
"domain": null,
"surrounds_strict": "any",
"type_strict": "all",
"surrounds": [],
"mql_filter": null,
"explain": false,
"error_inside": ".",
"blacklist": [],
"start": 0,
"prefix": "",
"limit": 1,
"escape": "html",
"query": "Dutch",
"type": [],
"strict": "all"
}},
"q1":{"query": {
"domain": null,
"surrounds_strict": "any",
"type_strict": "all",
"surrounds": [],
"mql_filter": null,
"explain": false,
"error_inside": ".",
"blacklist": [],
"start": 0,
"prefix": "",
"limit": 1,
"escape": "html",
"query": "Embassy",
"type": [],
"strict": "all"
}}}
?
-
-
-
I'm trying to retried the guid for the "article" key on /cvg/computer_videogame. This seems like it should be pretty simple.
Something along the lines of :
[
{
"article" : {
"guid" : null
},
"cvg_genre" : [],
"developer" : [],
"id" : null,
"limit" : 1,
"name" : null,
"type" : "/cvg/computer_videogame",
"versions" : [
{
"platform" : {
"id" : "/en/xbox_360"
}
}
]
}
]Yet I always get an error ""message" : "Type /cvg/computer_videogame does not have property article","
I don't get it. I'm looking at the schema and it says there's a key "article" right there. Am I misunderstanding how this works? How else would I possibly get the guid for an article?
-
Type /cvg/computer_videogame includes type /common/topic , and article is a property of the /common/topic schema. You can modify your query to ask for the article using the fully qualified property id, i.e. /common/topic/article:
[
{
"/common/topic/article" : {
"guid" : null
},
"cvg_genre" : [],
"developer" : [],
"id" : null,
"limit" : 1,
"name" : null,
"type" : "/cvg/computer_videogame",
"versions" : [
{
"platform" : {
"id" : "/en/xbox_360"
}
}
]
}
] -
Thanks for your help, that worked perfectly. Can you explain how you knew to use /common/topic/article instead of article? I tried with /common/document since that is the type that article is, which did not work.
-
I can see where it's possibly unclear - even though the properties are marked as such, they still belong to another type schema.
If you look at the examples in the queryeditor for "Vietnamese restaurants in Aspen, Colorado'", you'll see that this example also uses fully qualified properties.
I guess the takeaway is that if you are pivoting off of a certain type and also want information from properties of other types that the topic is cotyped as, you'll have to ask for those values using the fully qualified property name. -
Hi jimmyking, I find the explore view very helpful when trying to figure out fully qualified property names. (Press F8 when on a Freebase topic to show the 'dev bar')
-
-
-
I moved a type between domains, and now I'm getting a server error: http://www.freebase.com/view/user/frankieroberto/cultural_heritage/exhibition
-
Hmm, I found your exhibition type in your 'trash' domain. Can you describe what you were doing when you moved the type? Any browser crashes or anything?
-
The one in the 'trash' bin was a duplicate - I moved it to a new 'trash' domain as I can't figure out a way of deleting it!
http://www.freebase.com/view/user/frankieroberto/cultural_heritage/exhibition is working now.
I created the Exhibition type in my personal domain, and then moved it to a new 'Cultural Heritage' domain. Then when clicking through to that domain, I got an error, although the Exhibition type could be viewed within the new domain okay. -
To delete a type, go into the schema editor for that type then click the little down-arrow next to the type's name. There's an option there to delete.
-
Thanks, found it now!
-
-
-
I am trying to get get return all of the awards that steven spielberg has been nominated for. In addition to that i am wanting to return the other nominees that were nominated for the same award. Here is my query so far:
{
"award_nominations" : [
{
"award" : [
{
"id" : null,
"name" : null,
"nominees" : [
{
"award_nominee" : null,
"nominated_for" : null,
"optional" : true,
"year" : null
}
],
"optional" : true
}
],
"id" : null,
"optional" : true,
"year" : null
}
],
"id" : "/en/steven_spielberg",
"name" : null,
"type" : "/award/award_nominee"
}The main problem is that i cannot compare the years. Is there anyway that i can do this??
Thanks
-
Not in a single query. You'd have to run this query (or one just aimed at finding Spielberg's nominations alone), and then run a separate query for each award category and year that Spielberg was nominated. Since he conveniently has only been nominated under one category, you can combine all the years into a single query:
[
{
"award_nominations" : [
{
"award" : "Academy Award for Best Director",
"nominated_for" : null,
"year|=" : [
"1977",
"1981",
"1982"
]
}
],
"name" : null,
"type" : "/award/award_nominee"
}
] -
thanks for the help
-
-
-
It didn't look like the first post went through as my browser crashed during the posting for some reaosn.
Biosopher
-
Hi,
I'm curious about the browser crash you mentioned. Has it happened again? What's your OS and browser version (for example, Mac 10.3 Firefox 2.0)?
When you restart your browser, one way to verify if your discussion post went through is to refresh your cache, or else you may not get the latest data (i.e. you may not see your most recent post). The way to do it is this:
If you don't see a blue "Dev Tools" bar at the bottom of your browser in Freebase, hit F8. Then, from the menu that appears, click on "Refresh cache". Then refresh the discussion page. If your post went through, you should see it now. While it doesn't address the crash, this should at least help you avoid double posts.
-
Faye, this happens to me often but not always after posting a discussion using FF 2.0 on WinXP. I've filed at least one bug report and have corresponded with Gordon about it too.
-
Thanks Ed. I've logged a bug about it.
-
Hi Faye,
I am also running FF 2.0 and the crash does not always happen. E.g. happened when I posted the question above and one time shortly after. I have now posted 3 additional times without a problem.
I am running Vista Ultimate Edition.Thanks,
Biosopher
-
-
-
Hi again,
I am trying to figure out how to get /common/document (or pictures or wiki links) from a found topic.
For example australia has an id of 9202a8c04000641f8000000000b7b9fd
Works when I use the view page:
http://freebase.com/view/guid/9202a8c04000641f8000000000b7b9fd
But not for the trans service:
http://www.freebase.com/api/trans/raw/%239202a8c04000641f8000000000b7b9fd
The query guide shows us how to get albums from the police but not how to get pictures for it, the only example is digging recent stuff out of /common/document and /common/image directly without any relation to other topics.
My question is: can someone show me how to get the /common/document and /common/image for australia, editing the query below?
[
{
"guid" : [
{
"type" : "/type/id",
"value" : "#9202a8c04000641f8000000000b7b9fd"
}
],
"name" : null
}
]-
The id for the topic is not the same as the id of the image on our blob store. /common/topic has a property image which contains the (potentially multiple) ids to the images located on our blob server.
The query:
{
"id" : "/en/australia",
"image" : [
{
"id" : null
}
],
"type" : "/common/topic"
}Returns 1 result - if you then use that id with the trans service, you get this.
-
Thanks again cheunger, the metaweb read service help is incorrect about fetching documents though.
http://freebase.com/view/guid/9202a8c04000641f800000000544e139
section 4.8 states "The trans service does not support a callback parameter as the mqlread service does", this is outdated since the api states it can and it can:
http://www.freebase.com/view/guid/9202a8c04000641f8000000007628edf
This way I can format the document without using a proxy.
-