wn-ts-node
Version:
Wordnet interface library - TypeScript port
126 lines • 4.33 kB
TypeScript
import { WordNetWithPlugins } from 'wn-ts-core';
import { similarity, translation } from 'wn-ts-core/plugins';
import { NodeWordNetCore } from './wordnet-core.js';
import { NodeWordnetConfig } from './kysely-wordnet.js';
/**
* Kernel-based WordNet for Node.js
* Provides the new plugin system with full type safety
*/
export declare class NodeWordNetKernel {
private wordnet;
private core;
constructor(lexicon?: string | string[], options?: Partial<NodeWordnetConfig>);
initialize(): Promise<void>;
close(): Promise<void>;
words(query?: any): Promise<any[]>;
word(wordId: string): Promise<any>;
synsets(query?: any): Promise<any[]>;
synset(synsetId: string): Promise<any>;
senses(query?: any): Promise<any[]>;
sense(senseId: string): Promise<any>;
ili(iliId: string): Promise<any>;
ilis(status?: string): Promise<any[]>;
synsetsByILI(iliId: string): Promise<any[]>;
getHypernyms(synsetId: string): Promise<Array<{
id: string;
lemma: string;
pos: string;
language: string;
}>>;
getHyponyms(synsetId: string): Promise<Array<{
id: string;
lemma: string;
pos: string;
language: string;
}>>;
getMeronyms(synsetId: string): Promise<Array<{
id: string;
lemma: string;
pos: string;
language: string;
}>>;
getHolonyms(synsetId: string): Promise<Array<{
id: string;
lemma: string;
pos: string;
language: string;
}>>;
getEntailments(synsetId: string): Promise<Array<{
id: string;
lemma: string;
pos: string;
language: string;
}>>;
getSimilarTos(synsetId: string): Promise<Array<{
id: string;
lemma: string;
pos: string;
language: string;
}>>;
getRelationsByType(synsetId: string, relationType: string): Promise<Array<{
id: string;
lemma: string;
pos: string;
language: string;
type: string;
}>>;
getAllRelations(synsetId: string): Promise<Array<{
id: string;
source_id: string;
target_id: string;
type: string;
source_lemma: string;
target_lemma: string;
direction: 'incoming' | 'outgoing';
}>>;
getPathSimilarity(synset1: string | any, synset2: string | any): Promise<number>;
getWuPalmerSimilarity(synset1: string | any, synset2: string | any): Promise<number>;
getLeacockChodorowSimilarity(synset1: string | any, synset2: string | any): Promise<number>;
getJaccardSimilarity(synset1: string | any, synset2: string | any): Promise<number>;
getBestSimilarity(synset1: string | any, synset2: string | any): Promise<number>;
findMostSimilar(synsetId: string, limit?: number): Promise<Array<{
id: string;
similarity: number;
}>>;
getCrossLingualSimilarity(synset1: string | any, synset2: string | any): Promise<number>;
getTranslations(synsetId: string, targetLanguage?: string): Promise<Array<{
id: string;
language: string;
lexicon: string;
lemma: string;
pos: string;
}>>;
getTranslationsByWord(wordForm: string, sourceLanguage: string, targetLanguage: string): Promise<Array<{
sourceSynset: string;
ili: string;
translations: Array<{
lemma: string;
pos: string;
lexicon: string;
}>;
}>>;
getAvailableLanguages(synsetId: string): Promise<Array<{
language: string;
word_count: number;
}>>;
getSynsetsByIli(ili: string): Promise<Array<{
id: string;
language: string;
lexicon: string;
pos: string;
words: string;
}>>;
getTranslationConfidence(synset1: string, synset2: string): Promise<number>;
getTranslationSuggestions(wordForm: string, sourceLanguage: string, targetLanguage: string): Promise<Array<{
sourceSynset: string;
ili: string;
confidence: number;
targetWords: string[];
}>>;
get schemaManager(): any;
getPlugins(): string[];
has(pluginName: string): boolean;
getCore(): NodeWordNetCore;
getWordnet(): WordNetWithPlugins<readonly [typeof similarity, typeof translation]>;
}
//# sourceMappingURL=wordnet-kernel.d.ts.map