diff options
| -rwxr-xr-x | freebase/api/mqlkey.py | 27 | ||||
| -rwxr-xr-x | freebase/rison.py | 25 |
2 files changed, 40 insertions, 12 deletions
diff --git a/freebase/api/mqlkey.py b/freebase/api/mqlkey.py index 0458693..98b7d83 100755 --- a/freebase/api/mqlkey.py +++ b/freebase/api/mqlkey.py @@ -1,3 +1,30 @@ +# ======================================================================== +# Copyright (c) 2007, Metaweb Technologies, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY METAWEB TECHNOLOGIES AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL METAWEB +# TECHNOLOGIES OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# ======================================================================== import string import re diff --git a/freebase/rison.py b/freebase/rison.py index 468d505..c75dc8e 100755 --- a/freebase/rison.py +++ b/freebase/rison.py @@ -1,25 +1,26 @@ - # -# based on javascript openlaszlo-json +# rison for python (parser only so far) +# see http://mjtemplate.org/examples/rison.html for more info +# + +###################################################################### # -# Author: Oliver Steele -# Copyright: Copyright 2006 Oliver Steele. All rights reserved. -# Homepage: http:#osteele.com/sources/openlaszlo/json -# License: MIT License. -# Version: 1.0 +# the rison parser is based on javascript openlaszlo-json: +# Author: Oliver Steele +# Copyright: Copyright 2006 Oliver Steele. All rights reserved. +# Homepage: http:#osteele.com/sources/openlaszlo/json +# License: MIT License. +# Version: 1.0 # # hacked by nix for use in uris # ported to python by nix # - - - -# # TODO # # switch to unicode -# fall through to simplejson if first char is not in '!(' +# fall through to simplejson if first char is not in '!(' - +# this allows code to use just one parser # |
