catalyst icon indicating copy to clipboard operation
catalyst copied to clipboard

Package FastText Language detection model as nuget package

Open theolivenbaum opened this issue 2 years ago • 6 comments

Since the online model repository has been deprecated, we need to publish a nuget package for this model.

theolivenbaum avatar Oct 07 '21 12:10 theolivenbaum

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 02 '22 08:03 stale[bot]

What is the current recommendation for using the FastTextLanguageDetector? Where would I find the model to store locally? Should I wait for the nuget package? The sample code is not working as it uses Storage.Current = new DiskStorage("catalyst-models");, which (i think) assumes I already have the models in a certain folder.

wis3guy avatar Mar 23 '22 17:03 wis3guy

I'm also interested. It fails when

English.Register();
Storage.Current = new DiskStorage("catalyst-models");
var fastTextLanguageDetector = await FastTextLanguageDetector.FromStoreAsync(Language.Any, Version.Latest, "");

with a

System.IO.FileNotFoundException
Unable to find the specified file.
   at Mosaik.Core.DiskStorage.OpenLockedStreamAsync(String path, FileAccess access)
   at Mosaik.Core.ObjectStore.LoadAsync[T](IStorageTarget storeTarget, Language language, String modelType, Int32 version, String tag, Boolean compress)
   at Mosaik.Core.ObjectStorage.LoadInternal[TData](IStorageTarget target, String name, Language Language, Int32 Version, String Tag, Boolean CompressStoredData)
   at Mosaik.Core.ObjectStorage.LoadAsync[TData](IStorageTarget target, Language language, Int32 version, String tag, Boolean compress)
   at Mosaik.Core.ObjectStorage.LoadAsync[TData](IStorageTarget target, Language language, Int32 version, String tag, Boolean compress)
   at Mosaik.Core.StorableObject`2.LoadDataAsync()
   at Catalyst.Models.FastText.FromStoreAsync_Internal(Language language, Int32 version, String tag)
   at Catalyst.Models.FastTextLanguageDetector.FromStoreAsync(Language language, Int32 version, String tag)

If I have a look at catalyst-models I see a bunch of empty folders. Is it expected to have something there?

UPDATED: I can see the var cld2LanguageDetector = await Catalyst.Models.LanguageDetector.FromStoreAsync(Language.Any, Version.Latest, ""); works well so I'm guessing the problem with fast text language detector is not yet solved.

diegosasw avatar Apr 12 '22 08:04 diegosasw

Bump. I'm experiencing this same error. The samples don't function. Would be helpful to know what files are needed and where they can be downloaded, totally lost...

aggiehorns avatar Jul 26 '22 20:07 aggiehorns

Also totally lost with regards to using the new language packages. Any input on how to get this working as FastTextLanguageDetector cannot pull from storage.

dylanvdmerwe avatar Nov 11 '22 12:11 dylanvdmerwe

Is there a plan to get this working?

gabe4797 avatar Feb 01 '23 19:02 gabe4797