Interface Reference

The reference is structured by topics. Each topic is subdivided into two sections: types and functions. An alphabetical Index is located at the bottom of the page.

Documents and document references

Types

PatentsBase.AbstractApplicationIDType
abstract type AbstractApplicationID <: AbstractApplicationReference

An abstract type representing an interface for an application reference by jurisdiction, document number, and (optionally) kind. This is the preferred reference type to allow cross-referencing of applications across different data sources and formats.

source

Functions

PatentsBase.date_publishedFunction
date_published(a::AbstractApplication)

Return the Date of publication of an application a.

source
date_published(f::AbstractFamily)

Return the Date of publication of the earliest-published application in a family f.

source
PatentsBase.jurisdictionFunction
jurisdiction(a::AbstractApplication)
jurisdiction(a::AbstractApplicationID)

Return a String with the country code of the filing jurisdiction for the application a.

source
PatentsBase.doc_numberFunction
doc_number(a::AbstractApplication)
doc_number(a::AbstractApplicationID)

Return a String with the jurisdiction-specific document number of the application a.

source
PatentsBase.kindFunction
kind(a::AbstractApplication)
kind(a::AbstractApplicationID)

Return a String with the kind code of the application a.

source
PatentsBase.idFunction
id(a::AbstractApplication)
id(a::AbstractApplicationID)

Return a String with the original application ID, consisting of country code, document number and kind identifier.

source
PatentsBase.sourceidFunction
sourceid(a::AbstractApplication)
sourceid(a::AbstractApplicationID)

Return the id used in the data source, e.g. the lens_id for data obtained from Lens.org.

source
PatentsBase.refers_toFunction
refers_to(ref::AbstractApplicationReference, app::AbstractApplication)

Return true if app is the application referenced by ref, and false otherwise. In cases where identity cannot be checked due to incompatible types, implementations should default to false. The abstract reference implementation always returns false.

Implementation advice: There is no need to implement this for every possible combination of application and reference type. Usually, it will be enough to provide implementations for the application and reference types used by the same implementation package, and a generic implementation for AbstractApplicationID references.

source

Document contents

Types

PatentsBase.AbstractTitleType
abstract type AbstractTitle <: AbstractContent

An abstract type representing an interface for the title(s) of a patent application.

source
PatentsBase.AbstractShortDescriptionType
abstract type AbstractShortDescription <: AbstractContent

An abstract type representing an interface for the abstract or short description of a patent. The type is deliberately not named "AbstractAbstract" to avoid confusion.

source
PatentsBase.AbstractClaimType
abstract type AbstractClaim <: AbstractContent

An abstract type representing an interface for a single claim associated with a patent application.

source
PatentsBase.AbstractFulltextType
abstract type AbstractFulltext <: AbstractContent

An abstract type representing an interface for the full text of a patent application.

source

Functions

PatentsBase.languagesFunction
languages(c::AbstractContent)

Returns a Vector{String} with all languages for which a version of the content field c is available.

source
PatentsBase.textFunction
text(c::AbstractContent, lang::String)

Returns a String with the localized version of the text of content field c for language lang. Concrete implementations should throw a Base.KeyError if there is no title for that locale.

source
PatentsBase.titleMethod
title(a::AbstractApplication, lang::String)

Return a String with the localized title of application a for language lang.

source

Citations

Types

PatentsBase.AbstractPatentCitationType
abstract type AbstractPatentCitation <: AbstractCitation

An abstract type representing an interface for a citation of another patent document (NPL) in a patent application.

source
PatentsBase.AbstractNPLCitationType
abstract type AbstractNPLCitation <: AbstractCitation

An abstract type representing an interface for a citation of non-patent literature (NPL) in a patent application.

source

Functions

PatentsBase.phaseFunction
phase(c::AbstractCitation)

Return a String specifying the phase in the patent process during which the citation c occured.

source
PatentsBase.bibentryFunction
bibentry(c::AbstractNPLCitation)

Returns a String with the bibliography entry of the NPL citation c.

source
PatentsBase.external_idsFunction
external_ids(c::AbstractNPLCitation)

Returns a Vector{String} with the external database IDs recorded for the NPL citation c.

source
PatentsBase.doiFunction
doi(c::AbstractNPLCitation)

Returns a String with the Digital Object Identifier (DOI) for NPL citation c. If multiple IDs matching the DOI format are found, the first is returned. Returns nothing if no ID field matches the DOI format.

source
PatentsBase.forwardcitationsFunction
forwardcitations(a::AbstractApplication)
forwardcitations(f::AbstractFamily)

Return a Vector{<:AbstractPatentCitation} with citations of all patent applications known to cite a patent application or patent family. Note that even though these are represented by the AbstractPatentCitation interface, they are conceptually not citations in a strict sense.

source
PatentsBase.citationgraphFunction
citationgraph(applications::Vector{<:AbstractApplication})
citationgraph(families::Vector{<:AbstractFamily})

Return a SimpleDiGraph representing the network of citations among families or applications.

Node numbers in the graph correspond to indices in the input array. An edge from node i to node j indicates that j cited i and will be included in the output graph if the publication date of j is after that of i.

source

Parties

Types

Functions

PatentsBase.known_namesFunction
known_names(a::AbstractParty)

return a Vector{String} of all names under which party p is known to appear.

source
PatentsBase.countryFunction
country(p::AbstractParty)

return the country code of the country of residence of party p.

source

Document classifications

Types

PatentsBase.IPCLikeSystemType
abstract type IPCLikeSystem <: AbstractClassificationSystem

Abstract type representing a system for technology classification of patents that follows a structure similar to that of the International Patent Classification (IPC) or Cooperative Patent Classification (CPC).

source
PatentsBase.CPCType
struct CPC <: IPCLikeSystem

Dispatch type referring to the Cooperative Patent Classification (CPC) classification system.

source
PatentsBase.IPCType
struct IPC <: IPCLikeSystem

Dispatch type referring to the International Patent Classification (IPC) classification system.

source
PatentsBase.CPCSymbolType
struct CPCSymbol <: IPCLikeSymbol
CPCSymbol(symbol::String)

Struct representing a minimal technology classification entry according to the CPC.

source
PatentsBase.IPCSymbolType
struct IPCSymbol <: IPCLikeSymbol
IPCSymbol(symbol::String)

Struct representing a minimal technology classification entry according to the IPC.

source
PatentsBase.SectionType
struct Section <: AbstractIPCLikeClassificationLevel

Dispatch type referring to the section level of an IPC-like technology classification.

source
PatentsBase.ClassType
struct Class <: AbstractIPCLikeClassificationLevel

Dispatch type referring to the class level of an IPC-like technology classification.

source
PatentsBase.SubclassType
struct Subclass <: AbstractIPCLikeClassificationLevel

Dispatch type referring to the subclass level of an IPC-like technology classification.

source
PatentsBase.MaingroupType
struct Maingroup <: AbstractIPCLikeClassificationLevel

Dispatch type referring to the group level of an IPC-like technology classification.

source
PatentsBase.SubgroupType
struct Subgroup <: AbstractIPCLikeClassificationLevel

Dispatch type referring to the subgroup level of an IPC-like technology classification.

source

Functions

PatentsBase.classificationFunction
classification(a::AbstractApplication)
classification(f::AbstractFamily)
classification(c::AbstractClassificationSystem, a::AbstractApplication)
classification(c::AbstractClassificationSystem, f::AbstractFamily)

Obtain a Vector{<:AbstractClassificationSymbol} with all classifications for application a or family f according to classification system c. Defaults to CPC if no system is specified.

source
PatentsBase.symbolFunction
symbol(c::AbstractClassificationSymbol)
symbol(l::AbstractClassificationLevel, c::AbstractClassificationSymbol)

Return a String representation of a classification symbol c down to a specified level l. If no level is specified, the complete symbol is returned.

source
PatentsBase.titleMethod
title(l::AbstractClassificationLevel, c::AbstractClassificationSymbol)

Return a String containing the full title of a classification c down to a specified level l.

source

Document collections and groups

Types

Functions

PatentsBase.portfolioFunction
portfolio(owner::Union{AbstractParty, String}, ds::Vector{<:AbstractApplication})
portfolio(owner::Union{AbstractParty, String}, ds::Vector{<:AbstractFamily})
portfolio(owner::Union{AbstractParty, String}, ds::AbstractDataSource)

return an AbstractPortfolio of the owner, containing all families or applications filed in that owner's name from a data source ds. If owner is given as a String, it is assumed to be the name of an AbstractApplicant.

source

Data sources and document lookup

Types

PatentsBase.AbstractDataSourceType
abstract type AbstractDataSource

An abstract type representing an interface for a patent data source. Data sources can be in-memory data structures, wrappers around databases or API consumers.

source
PatentsBase.DataLevelType
abstract type DataLevel

Abstract type representing the level of a patent analysis (e.g. patent families, individual applications etc.)

source

Functions

PatentsBase.applicationsMethod
applications(ds::AbstractDataSource[, filter::AbstractFilter], kwargs...)

Return a Vector{<:AbstractApplication} with all applications contained in ds. May take a long time and/or cause memory overflow for large out-of-memory data sources. If a filter is specified, only applications matching the filter are returned.

Optional keyword arguments:

  • ignore_fulltext: If true, full text information will not be retrieved. This may be used to improve runtime and memory footprint for large datasets.
source
PatentsBase.familiesMethod
families(ds::AbstractDataSource[, filter::AbstractFilter], kwargs...)

Return a Vector{<:AbstractFamily} with all patent families contained in ds. May take a long time and/or cause memory overflow for large out-of-memory data sources. If a filter is specified, only families matching the filter are returned.

Optional keyword arguments:

  • ignore_fulltext: If true, full text information will not be retrieved. This may be used to improve runtime and memory footprint for large datasets.
source
PatentsBase.find_applicationFunction
find_application(ref::AbstractApplicationReference, ds::AbstractDataSource)

Return the application referenced by ref if it is contained in the data source ds, otherwise return nothing.

source
find_application(c::AbstractPatentCitation, ds::AbstractDataSource)

Attempt to retrieve the patent application referenced by the citation c from the data source ds and return it, or return nothing if it cannot be found.

source

Database filters

Types

PatentsBase.AbstractFilterType
abstract type AbstractFilter

Abstract type representing a filter that can be applied to an AbstractDataSource. In principle, any predicate that can apply to an application or patent family can be a filter. However, some filter options may not be implemented for all data sources. Filters are composable using the UnionFilter and IntersectionFilter structs and the corresponding | and & infix operators.

source
PatentsBase.AllFilterType
struct AllFilter <: AbstractFilter

Pseudo-filter that matches all applications or families in a database.

source
PatentsBase.IntersectionFilterType
struct IntersectionFilter <: AbstractFilter
IntersectionFilter(a::AbstractFilter, b::AbstractFilter)

Struct representing the intersection or conjunction of two AbstractFilters. As a shorthand syntax for this composition, the '&' operator may be used:

filter3 = filter1 & filter2 # intersection of filter1 and filter2
source
PatentsBase.UnionFilterType
struct UnionFilter <: AbstractFilter
UnionFilter(a::AbstractFilter, b::AbstractFilter)

Struct representing the union or disjunction of two AbstractFilters. As a shorthand syntax for this composition, the '|' operator may be used:

filter3 = filter1 | filter2 # union of filter1 and filter2
source
PatentsBase.ClassificationFilterType
struct ClassificationFilter <: AbstractFilter
ClassificationFilter(
    system::IPCLikeSystem,
    level::AbstractIPCLikeClassificationLevel,
    symbols::Vector{<:IPCLikeSymbol}
)

Struct representing a database filter by IPC-like classification.

Parameters:

source
PatentsBase.ContentFilterType
struct ContentFilter <: AbstractFilter
ContentFilter(
    search_query::String,
    field::Union{SearchableContentField, Vector{<:SearchableContentField}},
    [languages::Vector{String}]
)

Struct representing a database filter using full-text search on various content fields.

Parameters:

  • search_query: The keyword(s), phrase(s) or complex query to be used for the search. Query syntax may vary across data sources, but should be broadly similar to https://www.sqlite.org/fts5.html#fulltextquery_syntax.

  • field: Specifies which SearchableContentField(s) is/are used for the search. Possible values are TitleSearch(), AbstractSearch(), ClaimsSearch(), or FulltextSearch(). A vector can be passed, in which case the constructor actually creates a UnionFilter.

  • languages: Optional. A vector of two-character language codes specifying the languages for which matches are included. If an empty vector is passed (as by default), all available languages are included.

source
PatentsBase.TitleSearchType
struct TitleSearch <: SearchableContentField

Dispatch type referring to a search in the titles of documents.

source
PatentsBase.AbstractSearchType
struct AbstractSearch <: SearchableContentField

Dispatch type referring to a search in the abstract descriptions of documents.

source
PatentsBase.ClaimsSearchType
struct ClaimsSearch <: SearchableContentField

Dispatch type referring to a search in the claims section of documents.

source

Index