feat: improve patent matching with disambiguation pipeline and caching
LocationBasedServices/smartguide/pipeline/head There was a failure building this commit

This commit is contained in:
2026-06-15 20:27:21 +02:00
parent bc7b7784ea
commit 0dd03e0ae0
15 changed files with 1642 additions and 314 deletions
+47
View File
@@ -32,7 +32,22 @@ export interface PatentEntry {
assignees: string[];
ipc: string[];
country: string | null;
orcid?: string | null;
confidence_score: number;
match_signals?: string[];
}
export interface PatentSearchMeta {
epo_total_hits: number;
uspto_total_hits: number;
epo_returned_hits: number;
uspto_returned_hits: number;
matched_count: number;
epo_truncated: boolean;
uspto_truncated: boolean;
coauthor_signals: number;
publication_keywords: number;
rebuild_failed?: boolean;
}
export interface PatentsByAuthorResponse {
@@ -40,6 +55,9 @@ export interface PatentsByAuthorResponse {
author_name: string | null;
patent_count: number;
patents: PatentEntry[];
from_cache?: boolean;
last_built_at?: string | null;
search_meta?: PatentSearchMeta | null;
}
@Injectable({
@@ -99,6 +117,7 @@ export class PatentsService extends BaseService {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
refresh?: boolean;
},
): Observable<any> {
if (authorId === null || authorId === undefined) {
@@ -147,12 +166,18 @@ export class PatentsService extends BaseService {
dataFormat: undefined,
})}/patents`;
let localVarQueryParameters = new HttpParams({ encoder: new CustomHttpParameterCodec() });
if (options?.refresh) {
localVarQueryParameters = localVarQueryParameters.set('refresh', 'true');
}
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<PatentsByAuthorResponse>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
@@ -164,4 +189,26 @@ export class PatentsService extends BaseService {
},
);
}
public rebuildPatentsByAuthor(authorId: string): Observable<PatentsByAuthorResponse> {
const localVarPath = `/api/inse-service/authors/${this.configuration.encodeParam({
name: 'authorId',
value: authorId,
in: 'path',
style: 'simple',
explode: false,
dataType: 'string',
dataFormat: undefined,
})}/patents/rebuild`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.post<PatentsByAuthorResponse>(
`${basePath}${localVarPath}`,
null,
{
...(withCredentials ? { withCredentials } : {}),
headers: this.defaultHeaders,
},
);
}
}