Loading the model can be time-consuming because it may need to be downloaded from the network.
It would be beneficial to make modelOperations.loadModel public. This would allow developers to preload the model as needed, even though we can also load the model by executing modelOperations.runModel('').
Loading the model can be time-consuming because it may need to be downloaded from the network.
It would be beneficial to make
modelOperations.loadModel
public. This would allow developers to preload the model as needed, even though we can also load the model by executingmodelOperations.runModel('')
.https://github.com/microsoft/vscode-languagedetection/blob/100acd12e5035fed1806b69a77faccc6432a81f3/lib/index.ts#L152-L170
Furthermore, a new
isReady
method is very helpful for developers.By the way, this package is awesome! I deployed it in guesslang-worker and tried to use it in blocksuite and its performance was excellent.