do-me / SemanticFinder

SemanticFinder - frontend-only live semantic search with transformers.js
https://do-me.github.io/SemanticFinder/
MIT License
210 stars 14 forks source link

Introduce Typescript for semantic search #17

Closed lizozom closed 1 year ago

lizozom commented 1 year ago

Related to https://github.com/do-me/SemanticFinder/issues/3

@do-me I def understand if you prefer sticking with JS. Let me know and I'll close the PR 🖖🏻

do-me commented 1 year ago

Thanks! As mentioned in #16 pinging @VarunNSrivastava whether you'd be fine with TS too. If yes we can merge, if not I'd prefer not to.

lizozom commented 1 year ago

In the meanwhile I'll give JSDoc a try. So hold off with merging for now.

My next step is to offload the embedding to a Worker and try out multithreading as we discussed here. Sounds ok?

varunneal commented 1 year ago

Let me know how JSDoc works. I have no familiarity with TS but happy with learning as I go along. Also, isn't multithreading for serverside code, not possible on browsers? I have no experience here so please correct me

lizozom commented 1 year ago

JSDoc is 🔥 https://github.com/do-me/SemanticFinder/pull/18

Modern browsers support some for of threading using a Web Worker. I already have a working example. I'll benchmark it and make a PR.

do-me commented 1 year ago

Closing as we just merged #18 :)

do-me commented 1 year ago

In the meanwhile I'll give JSDoc a try. So hold off with merging for now.

My next step is to offload the embedding to a Worker and try out multithreading as we discussed here. Sounds ok?

Absolutely, by the way, have a look at my SO answer for a quick comparison between the two methods if you like. Initially, the only way to have everything in one file was with setInterval but now, the right way for sure is webworker!