Freebase
Start typing to get some suggestions
  • Explore
  • Use
  • Build
  • Developers

        Discussions on Freebase Applications

        Freebase Applications » Discuss

        Start a New Discussion

        Discussion will be posted in:

        • Freebase Applications

        Think this discussion also relates to something else? Cross-post it by adding a new discussion area:

        • General Support,
        • Developer Support
        1.  

          Metaweb Perl Module

          also posted to
          • hds
          6 posts, latest post: hds, Nov 9, 2008
          Link to discussion
          1. hds
            Jul 21, 2007
            hds says:

            I've started work on writing a Perl module to provide an interface to Metaweb - heavily based around using Freebase at this point obviously.

            I just wanted to check that no one else was working on a similar undertaking. If no one else is, I'm proposing the Net::Metaweb name space and will publish it on CPAN. I'm working on a structure that will allow queries to be given as either perl objects (a la the example in the Freebase developer documentation) or as a JSON string, and to receive either for the response too.

            If anyone is interested in working on this, please let me know.

            1. Jul 24, 2007
              jdeperi says:

              I'd be interested, hds. I currently do quite a bit of work in Perl, both professionally and free time. Your idea sounds great. JdP

            2. hds
              Jul 27, 2007
              hds says:

              Good to hear it. Current version is available from subversion:



              svn co http://caffeineconcepts.com/net-metaweb



              Having said that, give it about 2 hours and I'll be finished a re-hash of my implementation - it will make a bit of a difference as to the methods you call to get a query.

            3. Oct 13, 2008
              mohsen_basirat says:

              hi hds,

              I'm interested too, actually there is two other module in cpan and none of them working becasue of latest version of JSON and JSON::XS module.

              if you need someone to contribute let me know.

            4. Oct 13, 2008
              mohsen_basirat says:

              you svn address also dosen't work, would you create free repository in one of these websites like github.com, www.assembla.com, google code or sourceforge?

            5. hds
              Nov 9, 2008
              hds says:

              I know it may be a little late, but I have now moved my repository to google code.

              http://code.google.com/p/www-metaweb/ 

              I'm also planning on releasing a new version to CPAN next week as a new version of JSON::XS has caused compatibility issues. 

          Discussion is posted in:

          • close Freebase Applications
          • close hds

          Think this discussion also relates to something else? Cross-post it by adding a new discussion area:

          • General Support,
          • Developer Support
        2.  

          "limit" : 0 change in semantics?

          5 posts, latest post: somazx, Jul 10, 2008
          Link to discussion
          1. wf
            May 5, 2008
            wf says:

            It appears that setting limit to 0 now limits the number of results to 0, rather than be unlimited, as stated in the online documentation. Is this a recent change? Can you change the documentation if so?

             The tutorial says:

             Note that we use a limit of one in the above. Specifying a limit of zero means "don't limit the results: return everything you've got".  
            1. crism Metaweb Staff
              May 5, 2008
              crism says:

              The doc is being revised right now, and that change is on the list. Thanks for asking about it.

            2. May 19, 2008
              augusto says:

              if limit:0 now means return zero returns, how do you ask to return all results?

            3. crism Metaweb Staff
              May 19, 2008
              crism says:

              Set a large number as the limit. But if you truly want all results, you are much better off using a cursor; if you don’t know the reasonable upper bound, then you really can’t have confidence that you’ll get all the results without a timeout.

            4. Jul 10, 2008
              somazx says:

              The docs are still incorrectly stating zero returns all.

          Discussion is posted in:

          • close Freebase Applications

          Think this discussion also relates to something else? Cross-post it by adding a new discussion area:

          • General Support,
          • Developer Support
        3.  

          What's the difference between /people/person/place_of_birth and /people/person/places_lived

          2 posts, latest post: crism, Jun 7, 2008
          Link to discussion
          1. Jun 7, 2008
            ianloic says:

            I don't mean semantically of course, I mean why can't I use the same MQL to get them both. For example:

            {
              "name" : "Kurt Cobain",
              "place_of_birth" : [],
              "places_lived" : [],
              "type" : "/people/person"
            }

             Gives me:

            {
              "name" : "Kurt Cobain",
              "place_of_birth" : [
                "Aberdeen"
              ],
              "places_lived" : [
                null
              ],
              "type" : "/people/person"
            }

            Even though http://www.freebase.com/view/en/kurt_cobain clearly lists Aberdeen for both values. Why can't I query them the same way?

            1. crism Metaweb Staff
              Jun 7, 2008
              crism says:

              The Explore view is invaluable for this kind of question. If you don’t see a blue tool bar at the bottom of your screen, hit F8; I’ll wait.

              OK, now check out the Explore link from Kurt Cobain. It should take you here. You can also just change view to tools/explore in just about any Freebase URL.

              In that Explore view, you should see that the outbound /people/person/place_of_birth connects Kurt directly with Aberdeen. However, the inbound /people/place_lived/person link connects Kurt with some weird GUID-named thing. If you click on it, you will see that it is an instance of Place lived, connecting Kurt with Aberdeen. Why is that? Because we also might want to associate start and end dates with his residence there, which we can’t do on a simple, direct link.

              This design pattern is called a Compound Value Type, or CVT, and there is more information about them here.

          Discussion is posted in:

          • close Freebase Applications

          Think this discussion also relates to something else? Cross-post it by adding a new discussion area:

          • General Support,
          • Developer Support
        4.  

          How to query types in user's domains?

          2 posts, latest post: cheunger, May 28, 2008
          Link to discussion
          1. May 28, 2008
            amanshakya says:

            Helo all,

             I was trying to analyze user defined types - types that are in user's default domain or user defined domain, but not yet promoted to the standard freebase domains. Any idea how to obtain a list of all such types? I was trying some MQL but it doesn't seem to be easy as we cannot use pattern matching for 'id'.

            1. cheunger Metaweb Staff
              May 28, 2008
              cheunger says:

              Good question.  You can construct a query against the type /type/domain for all domains and its types that are hidden; however, user domains that are not their default domains can be "published", or unhidden, so those won't appear in your result set.  The full result set may not be possible in one MQL query.

          Discussion is posted in:

          • close Freebase Applications

          Think this discussion also relates to something else? Cross-post it by adding a new discussion area:

          • General Support,
          • Developer Support
        5.  

          A reminder about the Freebase blog...

          1 post, latest post: alecf, Oct 31, 2007
          Link to discussion
          1. alecf Metaweb Staff
            Oct 31, 2007
            alecf says:

            In case you aren't already subscribed to the RSS feed, I've just posted a new entry to the freebase blog called "The Significance of Significance":

            http://blog.freebase.com/

            Don't worry I'm not going to spam the list with this stuff every time someone posts, but until we get the blog, mailing lists, and discuss system in sync, I'm hoping it's helpful to cross-post reminders periodically..

          Discussion is posted in:

          • close Freebase Applications

          Think this discussion also relates to something else? Cross-post it by adding a new discussion area:

          • General Support,
          • Developer Support
        6.  

          Query troubles

          2 posts, latest post: alecf, Sep 10, 2007
          Link to discussion
          1. Sep 8, 2007
            ericsesssions says:

            I am having a lot of trouble with a query (I am running it in the query editor.) It runs great for the first three tries then fails at the fourth try. I am using cursors and taking the cursor from the previous result and using it at the next query. I am really lost as to what I am doing wrong.

            The query I am trying to run is
            {
            "cursor":true,
            "query":[{
            "*":[],
            "/business/retail_location/address":{
            "citytown":[],
            "postal_code":[],
            "street_address":[],
            "street_address_2":[]
            },
            "name":[],
            "type":"/dining/restaurant"
            }]
            }
            The error message I get is
            "message":"Unique query may have at most one result. Got 56". It seems like on the fourth attempt, it is losing the outside data like restaurant id etc and only returning the address information. What am I doing wrong?

            Thanks in advance!

            1. alecf Metaweb Staff
              Sep 10, 2007
              alecf says:

              Hey, this is probably running into a topic that has multiple /business/retail_location/address entries. Note how that is the only "unique" clause in your query. So what's happening is the first few pages of results have a single address, and then all the sudden it hits one entry that has 56 addresses! Maybe starbucks? :)

          Discussion is posted in:

          • close Freebase Applications

          Think this discussion also relates to something else? Cross-post it by adding a new discussion area:

          • General Support,
          • Developer Support
        7.  

          Rate limit?

          4 posts, latest post: jg, Aug 28, 2007
          Link to discussion
          1. Aug 28, 2007
            tom_gordon1000 says:

            I didn't see an answer to this in the documentation or email archives... If I want to build a Metaweb app, are there any rate limits on the number of queries or writes I can perform?

            Thanks,
            Tom

            1. jdouglas Metaweb Staff
              Aug 28, 2007
              jdouglas says:

              For the time being, there are no limits on reads. We'd like to see how that goes.

              As for writes, there is a limit of 10,000 new "primitives" (topics, values, etc.) per day. If you'd like to do more than that, please contact us. See the perform a bulk upload topic for more.

            2. Aug 28, 2007
              mikeveytsel says:

              I had the same question and just saw this, incidentally. No read limits is very generous, but I have to ask, can you recommend best practices or guidelines? I'm designing an app where having the most current information would be valuable and can expect to make queries on behalf of a lot of users, but I don't want to abuse the system. Not sure whether, how much, and how long to cache queried data for.

            3. jg Metaweb Staff
              Aug 28, 2007
              jg says:

              Mike,
              Our service is designed to be queried in real time. We cache the database answers at our end, so if you make the same MQL request over and over from different clients, the cost is relatively low. If you explicitly ask for an uncached response, or if you are trying to crawl the whole database, we request that you try it out on sandbox.freebase.com first.

              As for caching on your end, the data is all open, so you can cache it for as long as you wish, or decant it into other forms if that works well for your application.

          Discussion is posted in:

          • close Freebase Applications

          Think this discussion also relates to something else? Cross-post it by adding a new discussion area:

          • General Support,
          • Developer Support
        8.  

          Difficulty getting musical group members

          3 posts, latest post: squeegy, Aug 22, 2007
          Link to discussion
          1. Aug 21, 2007
            squeegy says:

            I am trying to create a query that can search for music artists, and return the members of the group (if they are a group), or ignore them if they are just a single person artist. The problem is:

            * Any query that looks up a "/music/artist", the "member" attribute isn't there.
            * Any query that looks up a "/music/musical_group" has access to "member", but will not return any results for non-group artists.
            * Any query that tries to load both types via "a:type" and "b:type" will give me an error "Type /type/object does not have property member"

            So is it correct to assume that I can also only access a single type/id combination at a time? So to do what I want there, I have to send two queries (one for artist, one for group), then merge the artist and group results together if there is a group result on my end?

            Seems a little messy. Surely there is a better way?

            1. crism Metaweb Staff
              Aug 21, 2007
              crism says:

              Alex, when looking at any type, you can always access properties of other types by using the full property name. Try this query out:
              { "query" : [ { "/music/musical_group/member" : [ { "member" : null, "optional" : true } ], "id" : null, "name" : null, "type" : "/music/artist" } ] }

            2. Aug 22, 2007
              squeegy says:

              Nice, thank you.

              I tried that, but I couldn't figure out the right property name. I see now its the domain/type/property. Very cool.

          Discussion is posted in:

          • close Freebase Applications

          Think this discussion also relates to something else? Cross-post it by adding a new discussion area:

          • General Support,
          • Developer Support
        9.  

          Linq for metaweb (dotnet 3.5)

          5 posts, latest post: andynogueira, Aug 12, 2007
          Link to discussion
          1. Aug 7, 2007
            ploufs says:

            Any people interest by linq for metaweb ?

            1. andynogueira
              Aug 9, 2007
              andynogueira says:

              I have. What do you have in mind ?

            2. Aug 10, 2007
              ploufs says:

              Centralize developments for linq to metaweb on one website (codeplex projet).
              Do you have start code ?

            3. Aug 10, 2007
              ploufs says:

              Projet url :
              http://www.codeplex.com/metawebToLinQ

            4. andynogueira
              Aug 12, 2007
              andynogueira says:

              I'd like to help as a developer. Would you add my name to the project ? My id in Codeplex is anoguei

              Thanks.

          Discussion is posted in:

          • close Freebase Applications

          Think this discussion also relates to something else? Cross-post it by adding a new discussion area:

          • General Support,
          • Developer Support
        10.  

          Deleting a Single Type of a Multiple Type Instance

          3 posts, latest post: szaijan, Aug 9, 2007
          Link to discussion
          1. Aug 8, 2007
            szaijan says:

            I have not verified this directly with a public type because I don't want to delete someone else's data.

            However, I've created a user type which includes a public type. User type '/user/szaijan/fantasy_football/player', is also of type '/american_football/football_player'. 'LaDainian Tomlinson' was an existing instance of type '/american_football/football_player' to which I added type '/user/szaijan/fantasy_football/player'. Now I'd like to delete the type '/user/szaijan/fantasy_football/player' from the instance, along with all it's uniquely associated objects, without deleting the instance itself.

            How is this best done? Do I simply delete the unwanted type from the instance's set of types? If so, do I need to manually delete uniquely associated linked records (i.e. those linked record that uniquely point to the '/user/szaijan/fantasy_football/player' fields on the instance) or will the deletion of the type 'cascade' to associated records?

            1. brendan Metaweb Staff
              Aug 8, 2007
              brendan says:

              you've got it: just click on the dropdown next to the type you want to remove and do it. Technically, the links will still exist but they won't be displayed in the freebase UI and people querying that topic through MQL won't see them unless they explicitly look for them, That doesn't sound very tidy, I know, but we can clean up orphan links like that, after the fact.

            2. Aug 9, 2007
              szaijan says:

              Thanks Brendan. The fascist in me was hoping for a cleaner solution, but that'll do. ;^)

          Discussion is posted in:

          • close Freebase Applications

          Think this discussion also relates to something else? Cross-post it by adding a new discussion area:

          • General Support,
          • Developer Support
        11.  

          Feature Requests

          2 posts, latest post: szaijan, Aug 9, 2007
          Link to discussion
          1. Aug 9, 2007
            szaijan says:

            Having been programming in MQL and using Freebase for about 10 days now, there are some items I'd like to see going forward. I'd love to hear what other users think before going forward with a formal RFE (Request for Enhancement.) What follows is the beginnings of my wishlist. Please forgive the constant references to sports leagues and fantasy football... it's been a long off-season and I chose a fantasy football tool as my test case for MQL and Freebase.

            Virtual Types: A type which can be added to other types, but which cannot be instantiated itself.
            - In the database I'm setting up, I have two types of record that have exactly the same fields. One is the Statistic, which is a record of an NFL player's performance in a given season, and the other is the Projection, which is a guess as to a player's performance in a given year, usually prior to the season actually beginning. Rather than entering the common attribute definitions into each type, I created a type called StatLine, which includes all of the shared fields, and included that type in the type definitions of Projection and Statistic. I'd like to be able to mark the StatLine type as virtual, so it cannot be instantiated,

            Cascading Deletes/Updates: I'd like to be able to mark unique reciprocal links such that when the parent instance in the relationship is deleted, all instances uniquely linked to that instance get deleted as well. Similarly, if the parent field by which the instances are linked is updated, all of the child instances' fields should be updated as well.

            Attribute Constraints: While the object attributes in Freebase can already be limited by type, it would be very helpful to be able to limit their values as well. For instance, A sports league was created in 1933. Many associated objects would reference a specific season of that league, and it would be helpful to be able to limit the input values. Ideally, I'd like to limit input values to dates which only include the year designation, and only allow values >=1932.

            It is possible that some or all of these functions are already available in MQL, but I could find no reference to them in the available documentation on the Freebase site. If so, pointers to the appropriate reference materials would be greatly appreciated.

            Please add to the discussion with your opinions of the above and add your own RFE thoughts.

            MJ

            1. Aug 9, 2007
              szaijan says:

              I missed one:

              Unique Constraints: The ability to create a set of attributes, the values of which define a unique instance. i.e. for a Projection, the Season, Player, League attributes should uniquely define an instance. Trying to create a new instance with the same values in those fields should fail, or update the existing instance if the appropriate command is used. In the UI of Freebase, this could be implemented by creating a named instance of type /type/constraint/unqiue, then associating the appropriate attributes to the constraint through the standard look-up menu. No sure how or if MQL could handle this sort of constraint.

              P.S. I'm still not clear on how to structure a single query to create a new instance if the fields specified do not indicate that one exists, and instead to update the instance, if a unique instance is found. I know to use create:unless exists to create and connect:update to update, but I'm not sure how to do one or the other, as appropriate, in a single query. I'm thinking a create:unless_exists command at the top level, then a connect:update command in each field, but this seems inefficient. Still experimenting.

          Discussion is posted in:

          • close Freebase Applications

          Think this discussion also relates to something else? Cross-post it by adding a new discussion area:

          • General Support,
          • Developer Support

        Search Discussions

        Related Discussions

        • hds
        ©2009  Metaweb
        • Page History
        • RDF
        • Feedback
        • Attribution Policy
        • Terms of Service
        • About Us
        • Jobs
        • Freebase Blog
        Freebase contains information on:
        • Arts & Entertainment
        • Products & Services
        • Science & Technology
        • Society
        • Special Interests
        • Sports
        • Time & Space
        Dev Tools
        Refresh cache | Query Editor | Normal view | Explore | Explore2 | Admin view | View transaction log | Suggest transaction log | Client transaction log | hide (F8) | debug-level
        TID(s):
        Controller: 1.314s
        Template: 0.193s
        Cost: br=35.0, cc=1.296, ch=0.0, cm=0.0, cm+h=0.0, cr=0.0, cs=44.0, cw=41.0, dr=10314.0, dt=2.149, dw=0.0, gqr=0.0, in=6627.0, ir=93.0, iw=0.0, lh=0.0, lm=1.0, lr=1.0, mcs=0.004, mcu=0.248, mr=41.0, nivcsw=136.0, nreqs=47.0, nvcsw=119.0, pf=0.0, pr=0.0, stime=0.028, te=0.385, tf=0.75, tg=0.721, tm=0.973, tr=0.064, ts=0.0, tu=0.056, utime=1.268, va=28892.0