Skip to main content

Interface: ICategoryMatcher

Defined in: src/types/interfaces/ranking.interface.ts:65

Category/field matching strategy interface.

Remarks​

Abstracts category matching to support different taxonomies and cross-source category mappings.

Methods​

categoriesOverlap()​

categoriesOverlap(cat1, cat2): boolean

Defined in: src/types/interfaces/ranking.interface.ts:98

Checks if two categories are related.

Parameters​

cat1​

string

First category

cat2​

string

Second category

Returns​

boolean

True if categories overlap or are related


computeFieldScore()​

computeFieldScore(itemCategories, userFields): number

Defined in: src/types/interfaces/ranking.interface.ts:73

Computes overlap between item categories and user fields.

Parameters​

itemCategories​

readonly string[]

Categories from the eprint

userFields​

readonly string[]

User's research fields/interests

Returns​

number

Match score from 0 (no overlap) to 1 (full match)


getRelatedCategories()​

getRelatedCategories(category): readonly string[]

Defined in: src/types/interfaces/ranking.interface.ts:89

Gets related categories for query expansion.

Parameters​

category​

string

Source category

Returns​

readonly string[]

Related categories (parent, siblings, aliases)


normalizeCategory()​

normalizeCategory(category): string

Defined in: src/types/interfaces/ranking.interface.ts:81

Normalizes a category to canonical form.

Parameters​

category​

string

Raw category string

Returns​

string

Normalized category identifier