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.AbstractApplication
— Typeabstract type AbstractApplication
An abstract type representing an interface for a patent application.
PatentsBase.AbstractApplicationReference
— Typeabstract type AbstractApplicationReference
An abstract type representing a reference to a patent application. Implementations should be coupled with an implementation of AbstractDataSource
to allow lookup of the referenced application in the data source, using the find_application
function.
PatentsBase.AbstractApplicationID
— Typeabstract 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.
Functions
PatentsBase.date_published
— Functiondate_published(a::AbstractApplication)
Return the Date
of publication of an application a
.
date_published(f::AbstractFamily)
Return the Date
of publication of the earliest-published application in a family f
.
PatentsBase.jurisdiction
— Functionjurisdiction(a::AbstractApplication)
jurisdiction(a::AbstractApplicationID)
Return a String
with the country code of the filing jurisdiction for the application a
.
PatentsBase.doc_number
— Functiondoc_number(a::AbstractApplication)
doc_number(a::AbstractApplicationID)
Return a String
with the jurisdiction-specific document number of the application a
.
PatentsBase.kind
— Functionkind(a::AbstractApplication)
kind(a::AbstractApplicationID)
Return a String
with the kind code of the application a
.
PatentsBase.id
— Functionid(a::AbstractApplication)
id(a::AbstractApplicationID)
Return a String
with the original application ID, consisting of country code, document number and kind identifier.
PatentsBase.sourceid
— Functionsourceid(a::AbstractApplication)
sourceid(a::AbstractApplicationID)
Return the id used in the data source, e.g. the lens_id for data obtained from Lens.org.
PatentsBase.refers_to
— Functionrefers_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.
Document contents
Types
PatentsBase.AbstractContent
— Typeabstract type AbstractContent
An abstract type representing an interface for content fields of a patent application. There are five abstract content fields that are subtypes of this type: AbstractTitle
, AbstractShortDescription
, AbstractClaim
, and AbstractFulltext
.
PatentsBase.AbstractTitle
— Typeabstract type AbstractTitle <: AbstractContent
An abstract type representing an interface for the title(s) of a patent application.
PatentsBase.AbstractShortDescription
— Typeabstract 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.
PatentsBase.AbstractClaim
— Typeabstract type AbstractClaim <: AbstractContent
An abstract type representing an interface for a single claim associated with a patent application.
PatentsBase.AbstractFulltext
— Typeabstract type AbstractFulltext <: AbstractContent
An abstract type representing an interface for the full text of a patent application.
Functions
PatentsBase.languages
— Functionlanguages(c::AbstractContent)
Returns a Vector{String}
with all languages for which a version of the content field c
is available.
PatentsBase.text
— Functiontext(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.
PatentsBase.title
— Methodtitle(a::AbstractApplication)
Return an AbstractTitle
with information about the title of application a
.
PatentsBase.title
— Methodtitle(a::AbstractApplication, lang::String)
Return a String
with the localized title of application a
for language lang
.
PatentsBase.claims
— Functionclaims(a::AbstractApplication)
Return a Vector{<:
AbstractClaim
}
with information on patent claims contained in application a
.
PatentsBase.abstract
— Functionabstract(a::AbstractApplication)
Return an AbstractShortDescription
with the abstract of application a.
PatentsBase.fulltext
— Functionfulltext(a::AbstractApplication)
Return an AbstractFulltext
with the full text of application a.
Citations
Types
PatentsBase.AbstractCitation
— Typeabstract type AbstractCitation
An abstract type representing an interface for a citation in a patent application.
PatentsBase.AbstractPatentCitation
— Typeabstract type AbstractPatentCitation <: AbstractCitation
An abstract type representing an interface for a citation of another patent document (NPL) in a patent application.
PatentsBase.AbstractNPLCitation
— Typeabstract type AbstractNPLCitation <: AbstractCitation
An abstract type representing an interface for a citation of non-patent literature (NPL) in a patent application.
PatentsBase.AbstractCitationType
— Typeabstract type AbstractCitationType
An abstract type representing a type of citation, e.g. patent or NPL.
PatentsBase.PatentCitation
— Typestruct PatentCitation <: AbstractCitationType
Dispatch type for selecting patent citations.
PatentsBase.NPLCitation
— Typestruct NPLCitation <: AbstractCitationType
Dispatch type for selecting NPL citations.
Functions
PatentsBase.phase
— Functionphase(c::AbstractCitation)
Return a String
specifying the phase in the patent process during which the citation c
occured.
PatentsBase.reference
— Functionreference(c::AbstractPatentCitation)
Return an AbstractApplicationReference
for the application cited in c
.
PatentsBase.bibentry
— Functionbibentry(c::AbstractNPLCitation)
Returns a String
with the bibliography entry of the NPL citation c
.
PatentsBase.external_ids
— Functionexternal_ids(c::AbstractNPLCitation)
Returns a Vector{String}
with the external database IDs recorded for the NPL citation c
.
PatentsBase.doi
— Functiondoi(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.
PatentsBase.citations
— Functioncitations(a::AbstractApplication[, type::AbstractCitationType])
citations(f::AbstractFamily[, type::AbstractCitationType])
Return a Vector{<:
AbstractCitation
}
with all citations of the given type
from a patent application a
or family f
.
type
can either be PatentCitation
()
(default) or NPLCitation
()
.
PatentsBase.forwardcitations
— Functionforwardcitations(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.
PatentsBase.citationgraph
— Functioncitationgraph(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.
Parties
Types
PatentsBase.AbstractParty
— Typeabstract type AbstractParty
An abstract type representing an interface for a patent application party. The two types of parties are applicants and inventors, represented by the types AbstractApplicant
and AbstractInventor
, respectively.
PatentsBase.AbstractInventor
— Typeabstract type AbstractInventor <: AbstractParty
An abstract type representing an interface for an inventor.
PatentsBase.AbstractApplicant
— Typeabstract type AbstractApplicant <: AbstractParty
An abstract type representing an interface for a patent applicant.
Functions
PatentsBase.name
— Functionname(p::AbstractParty)
return the name of the party p
.
PatentsBase.known_names
— Functionknown_names(a::AbstractParty)
return a Vector{String}
of all names under which party p
is known to appear.
PatentsBase.country
— Functioncountry(p::AbstractParty)
return the country code of the country of residence of party p
.
PatentsBase.applicants
— Functionapplicants(a::AbstractApplication)
return a Vector{<:
AbstractApplicant
}
with information about the applicant(s) of application a
.
applicants(f::AbstractFamily)
return a Vector{<:
AbstractApplicant
}
with the unique set of applicants from all the applications in family f
.
PatentsBase.inventors
— Functioninventors(a::AbstractApplication)
return a Vector{<:
AbstractInventor
}
with information about the inventor(s) of application a
.
inventors(f::AbstractFamily)
return a Vector{<:
AbstractInventor
}
with the unique set of inventors from all the applications in family f
.
Document classifications
Types
PatentsBase.AbstractClassificationSystem
— Typeabstract type AbstractClassificationSystem
Abstract type representing a system for technology classification of patents.
PatentsBase.IPCLikeSystem
— Typeabstract 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).
PatentsBase.CPC
— Typestruct CPC <: IPCLikeSystem
Dispatch type referring to the Cooperative Patent Classification (CPC) classification system.
PatentsBase.IPC
— Typestruct IPC <: IPCLikeSystem
Dispatch type referring to the International Patent Classification (IPC) classification system.
PatentsBase.AbstractClassificationSymbol
— Typeabstract type AbstractClassificationSymbol
Abstract type representing a patent classification entry. Specific implementations should at least implement symbol
.
PatentsBase.IPCLikeSymbol
— Typeabstract type IPCLikeSymbol <: AbstractClassificationSymbol
Abstract type representing a patent classification entry following an IPCLikeSystem
. In addition to the interface for any AbstractClassificationSymbol
, implementations should implement symbol(l, c)
and title(l, c)
for all levels of the classification.
PatentsBase.CPCSymbol
— Typestruct CPCSymbol <: IPCLikeSymbol
CPCSymbol(symbol::String)
Struct representing a minimal technology classification entry according to the CPC.
PatentsBase.IPCSymbol
— Typestruct IPCSymbol <: IPCLikeSymbol
IPCSymbol(symbol::String)
Struct representing a minimal technology classification entry according to the IPC.
PatentsBase.AbstractClassificationLevel
— Typeabstract type AbstractClassificationLevel
Abstract type representing a level in a hierarchical technology classification system.
PatentsBase.AbstractIPCLikeClassificationLevel
— Typeabstract type AbstractIPCLikeClassificationLevel <: AbstractClassificationLevel
Abstract type representing a level in an IPC-like technology classification system.
PatentsBase.Section
— Typestruct Section <: AbstractIPCLikeClassificationLevel
Dispatch type referring to the section level of an IPC-like technology classification.
PatentsBase.Class
— Typestruct Class <: AbstractIPCLikeClassificationLevel
Dispatch type referring to the class level of an IPC-like technology classification.
PatentsBase.Subclass
— Typestruct Subclass <: AbstractIPCLikeClassificationLevel
Dispatch type referring to the subclass level of an IPC-like technology classification.
PatentsBase.Maingroup
— Typestruct Maingroup <: AbstractIPCLikeClassificationLevel
Dispatch type referring to the group level of an IPC-like technology classification.
PatentsBase.Subgroup
— Typestruct Subgroup <: AbstractIPCLikeClassificationLevel
Dispatch type referring to the subgroup level of an IPC-like technology classification.
Functions
PatentsBase.classification
— Functionclassification(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.
PatentsBase.symbol
— Functionsymbol(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.
PatentsBase.title
— Methodtitle(l::AbstractClassificationLevel, c::AbstractClassificationSymbol)
Return a String
containing the full title of a classification c
down to a specified level l
.
Document collections and groups
Types
PatentsBase.AbstractFamily
— Typeabstract type AbstractFamily
An abstract type representing an interface for a patent family.
PatentsBase.AbstractPortfolio
— Typeabstract type AbstractPortfolio
An abstract type representing an interface for a party's patent portfolio.
Functions
PatentsBase.aggregate_families
— Functionaggregate_families(apps::Vector{<:AbstractApplication})
Aggregate the applications apps
into an array of patent families.
PatentsBase.applications
— Methodapplications(f::AbstractFamily)
return a Vector{<:
AbstractApplication
}
with all applications in family f
.
PatentsBase.applications
— Methodapplications(p::AbstractPortfolio)
return a Vector{<:
AbstractApplication
}
with all applications in portfolio p
.
PatentsBase.families
— Methodfamilies(p::AbstractPortfolio)
return a Vector{<:
AbstractFamily
}
with all patent families in portfolio p
.
PatentsBase.portfolio
— Functionportfolio(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
.
PatentsBase.siblings
— Functionsiblings(a::AbstractApplicationReference)
return a Vector{<:
AbstractApplicationReference
}
with references to all applications that are in the same family as a
.
siblings(a::AbstractApplication, ds::AbstractDataSource)
return a Vector{<:
AbstractApplication
}
with all applications from the data source ds
that are in the same family as a
.
PatentsBase.owner
— Functionowner(p::AbstractPortfolio)
return an AbstractParty
representing the owner of portfolio p
.
Data sources and document lookup
Types
PatentsBase.AbstractDataSource
— Typeabstract 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.
PatentsBase.DataLevel
— Typeabstract type DataLevel
Abstract type representing the level of a patent analysis (e.g. patent families, individual applications etc.)
PatentsBase.ApplicationLevel
— Typestruct ApplicationLevel <: DataLevel
Dispatch type indicating an analysis at the level of individual patent applications.
PatentsBase.FamilyLevel
— Typestruct FamilyLevel <: DataLevel
Dispatch type indicating an analysis at the level of patent families.
Functions
PatentsBase.applications
— Methodapplications(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.
PatentsBase.families
— Methodfamilies(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.
PatentsBase.find_application
— Functionfind_application(ref::AbstractApplicationReference, ds::AbstractDataSource)
Return the application referenced by ref
if it is contained in the data source ds
, otherwise return nothing.
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.
Database filters
Types
PatentsBase.AbstractFilter
— Typeabstract 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.
PatentsBase.AllFilter
— Typestruct AllFilter <: AbstractFilter
Pseudo-filter that matches all applications or families in a database.
PatentsBase.IntersectionFilter
— Typestruct IntersectionFilter <: AbstractFilter
IntersectionFilter(a::AbstractFilter, b::AbstractFilter)
Struct representing the intersection or conjunction of two AbstractFilter
s. As a shorthand syntax for this composition, the '&' operator may be used:
filter3 = filter1 & filter2 # intersection of filter1 and filter2
PatentsBase.UnionFilter
— Typestruct UnionFilter <: AbstractFilter
UnionFilter(a::AbstractFilter, b::AbstractFilter)
Struct representing the union or disjunction of two AbstractFilter
s. As a shorthand syntax for this composition, the '|' operator may be used:
filter3 = filter1 | filter2 # union of filter1 and filter2
PatentsBase.ClassificationFilter
— Typestruct ClassificationFilter <: AbstractFilter
ClassificationFilter(
system::IPCLikeSystem,
level::AbstractIPCLikeClassificationLevel,
symbols::Vector{<:IPCLikeSymbol}
)
Struct representing a database filter by IPC-like classification.
Parameters:
system
: TheIPCLikeSystem
system used, such asIPC
orCPC
.level
: TheAbstractIPCLikeClassificationLevel
at which to filter (Section
,Class
,Subclass
etc.)symbols
: AVector{<:
IPCLikeSymbol
}
of all classifications included. The filter will match any application classified by at least one of these.
PatentsBase.ContentFilter
— Typestruct 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 whichSearchableContentField
(s) is/are used for the search. Possible values areTitleSearch
()
,AbstractSearch
()
,ClaimsSearch
()
, orFulltextSearch
()
. A vector can be passed, in which case the constructor actually creates aUnionFilter
.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.
PatentsBase.SearchableContentField
— Typeabstract type SearchableContentField
Abstract type representing a fulltext-searchable application content field.
PatentsBase.TitleSearch
— Typestruct TitleSearch <: SearchableContentField
Dispatch type referring to a search in the titles of documents.
PatentsBase.AbstractSearch
— Typestruct AbstractSearch <: SearchableContentField
Dispatch type referring to a search in the abstract descriptions of documents.
PatentsBase.ClaimsSearch
— Typestruct ClaimsSearch <: SearchableContentField
Dispatch type referring to a search in the claims section of documents.
PatentsBase.FulltextSearch
— Typestruct FulltextSearch <: SearchableContentField
Dispatch type referring to a search in the full text of documents.
Index
PatentsBase.AbstractApplicant
PatentsBase.AbstractApplication
PatentsBase.AbstractApplicationID
PatentsBase.AbstractApplicationReference
PatentsBase.AbstractCitation
PatentsBase.AbstractCitationType
PatentsBase.AbstractClaim
PatentsBase.AbstractClassificationLevel
PatentsBase.AbstractClassificationSymbol
PatentsBase.AbstractClassificationSystem
PatentsBase.AbstractContent
PatentsBase.AbstractDataSource
PatentsBase.AbstractFamily
PatentsBase.AbstractFilter
PatentsBase.AbstractFulltext
PatentsBase.AbstractIPCLikeClassificationLevel
PatentsBase.AbstractInventor
PatentsBase.AbstractNPLCitation
PatentsBase.AbstractParty
PatentsBase.AbstractPatentCitation
PatentsBase.AbstractPortfolio
PatentsBase.AbstractSearch
PatentsBase.AbstractShortDescription
PatentsBase.AbstractTitle
PatentsBase.AllFilter
PatentsBase.ApplicationLevel
PatentsBase.CPC
PatentsBase.CPCSymbol
PatentsBase.ClaimsSearch
PatentsBase.Class
PatentsBase.ClassificationFilter
PatentsBase.ContentFilter
PatentsBase.DataLevel
PatentsBase.FamilyLevel
PatentsBase.FulltextSearch
PatentsBase.IPC
PatentsBase.IPCLikeSymbol
PatentsBase.IPCLikeSystem
PatentsBase.IPCSymbol
PatentsBase.IntersectionFilter
PatentsBase.Maingroup
PatentsBase.NPLCitation
PatentsBase.PatentCitation
PatentsBase.SearchableContentField
PatentsBase.Section
PatentsBase.Subclass
PatentsBase.Subgroup
PatentsBase.TitleSearch
PatentsBase.UnionFilter
PatentsBase.abstract
PatentsBase.aggregate_families
PatentsBase.applicants
PatentsBase.applications
PatentsBase.applications
PatentsBase.applications
PatentsBase.bibentry
PatentsBase.citationgraph
PatentsBase.citations
PatentsBase.claims
PatentsBase.classification
PatentsBase.country
PatentsBase.date_published
PatentsBase.doc_number
PatentsBase.doi
PatentsBase.external_ids
PatentsBase.families
PatentsBase.families
PatentsBase.find_application
PatentsBase.forwardcitations
PatentsBase.fulltext
PatentsBase.id
PatentsBase.inventors
PatentsBase.jurisdiction
PatentsBase.kind
PatentsBase.known_names
PatentsBase.languages
PatentsBase.name
PatentsBase.owner
PatentsBase.phase
PatentsBase.portfolio
PatentsBase.reference
PatentsBase.refers_to
PatentsBase.siblings
PatentsBase.sourceid
PatentsBase.symbol
PatentsBase.text
PatentsBase.title
PatentsBase.title
PatentsBase.title