GithubHelp home page GithubHelp logo

patento's Introduction

Patento

Patento is a simple gem for scraping Google Patents and formatting the visible data into objects and hashes.

Usage

Patento has two models of operation: local and remote. In local mode, you pass in the .html file saved from Google patents. In remote mode, you simply supply a patent number and Patento will pull the HTML from Google.

Note that pulling remote data will result in one HTTP request per patent requested. Thus, if doing large amounts of downloading, please consider respecting Google's server load. For your convenience, Google's terms of service can be found here: http://www.google.com/intl/en/policies/terms/.

Examples:

Patent.new(6000000) # Retreives patent details remotely

Patent.new(6000000, local_path: "US6000000.html") # Parses  ./US6000000.html and returns the same data as above

Data Retreived

Patento retrieves the following data:

  1. Patent Number (String): patent.number
  2. Title (String): patent.title
  3. Abstract (String): patent.abstract
  4. Serial (String or nil, see note): patent.serial
  • Note: Patento can only return the serial if it is present at Google (compare patent 6000000 with 7114060). If Google doesn't provide it, serial will be nil
  1. Inventors (Array of String objects): patent.inventors
  2. Assignee (String): patent.assignee
  3. U.S. Classifications (Array of String objects): patent.us_classifications
  4. International Classification (String): patent.intl_classifications
  5. Filing Date (Date): patent.filing_date
  6. Issue Date (Date): patent.issue_date
  • Note: Patento does not retrieve the publication date of published applications due to this data not being available at Google
  1. Claims (Array of Claim objects (see below)): patent.claims
  2. Forward Citations (Array of Hash objects): patent.forward_citations
  3. Backward Citations (Array of Hash objects): patent.backward_citations

Citations

Forward and backward citations are just Hash objects with the following keys: number, filing, issue, assignee, and title.

Claim Objects

Patento stores claim data in separate Claim objects. Claim objects have a number, a type (independent or dependent), a preamble, and a body. All attributes are public.

All claims are guaranteed to have a preamble. Shorter claims (one liners) may only have a preamble.

The body element is a nested array of elements corresponding to the indenting of the original claim. For example, the claim:

Preamble
Element 1
    Sub-element 1
    Sub-element 2
Element 2

will have a body represented as a nested array like so:

[
    [
        "Element 1",
        
        [
            "Sub-element 1",
            "Sub-element 2"
        ]
    ],
    
    "Element 2"
]

Contributing to patento

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
  • Fork the project.
  • Start a feature/bugfix branch.
  • Commit and push until you are happy with your contribution.
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright

Copyright (c) 2012 George Zalepa. See LICENSE.txt for further details.

patento's People

Contributors

zalepa avatar

Watchers

James Cloos avatar Justin McNally avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.