Instantly share code, notes, and snippets.

Embed
What would you like to do?
FastText C-style API bindings for Delphi and Free Pascal
const
FastTextLib = 'fasttext.dll';
type
TFastTextNNCallback = function(word: PAnsiChar; score: Single; data: Pointer): LongBool; cdecl;
function fasttext_new(out ft: TFastText): LongBool; cdecl; external FastTextLib;
function fasttext_release(ft: TFastText): LongBool; cdecl; external FastTextLib;
function fasttext_nn2(ft: TFastText; mx: TMatrix; positive, negative: PPAnsiChar; count: Integer;
callback: TFastTextNNCallback; data: Pointer): LongBool; cdecl; external FastTextLib;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment