Function: createVocabularyService()
createVocabularyService(
domainsDir?):VocabularyService
Defined in: src/vocabulary/vocabulary-service.ts:230
Create a new VocabularyService instance.
Parameters​
domainsDir?​
string
Optional override for the domain JSON directory path.
Returns​
A new vocabulary service instance.
Remarks​
Returns a fresh service with no domains loaded. Call VocabularyService.loadDomain before searching.
The domainsDir parameter is optional — by default the service locates
the bundled JSON files relative to this source file. Override it in tests
to point at mock data.
Example​
const svc = createVocabularyService();
await svc.loadDomain('procurement');
const results = await svc.search('vendor');