Git Product home page Git Product logo

Comments (14)

jesus-seijas-sp avatar jesus-seijas-sp commented on May 22, 2024 4

Hello!
The answer is yes, is one of the ideas for the 3.0. In fact, the debate about using lerna and split in a monorepo, is with the objective of having small pieces that can be imported independently, and this will allow to target browser without having a huge impact in the size (all the dictionaries for sentiment analysis, and so on).

from nlp.js.

jesus-seijas-sp avatar jesus-seijas-sp commented on May 22, 2024 2

Hi @revolunet, yes, but is not needed in this case, we have already the tokenizers/stemmers.
I've it working in the browser in the branch https://github.com/axa-group/nlp.js/tree/feature/without_natural
The bundle is 3.8MB.
The CON: No chinese due to tokenize using novel-segment, and novel-segment is not browser compatible at all. this branch is WIP, I will look for a way of doing novel-segment browser compatible, and also organize the code.
But right now... it's working!!!!
At the root you'll find bundle.js and an example index.html

from nlp.js.

jesus-seijas-sp avatar jesus-seijas-sp commented on May 22, 2024 1

Hi @revolunet and welcome! I'm working on having Natural out of the equation, implementing the tokenizers and stemmers. As soon as I finish, we can try again, and I expect that it will be possible to generate a frontend ready version.

from nlp.js.

jseijas avatar jseijas commented on May 22, 2024 1

Hi, that's because is merged!
https://github.com/axa-group/nlp.js/tree/master/dist
There you have the dist (I detected that is not fully minimified... I have to know wht) and an index.html with an example.
And is published also so you can import it from node modules.

from nlp.js.

jesus-seijas-sp avatar jesus-seijas-sp commented on May 22, 2024 1

Well, I installed browserify and uglify-es globally: https://www.npmjs.com/package/uglify-es
then
browserify ./lib | uglifyjs > ./dist/bundle.js

from nlp.js.

linonetwo avatar linonetwo commented on May 22, 2024 1

The CON: No chinese due to tokenize using novel-segment, and novel-segment is not browser compatible at all. this branch is WIP, I will look for a way of doing novel-segment browser compatible, and also organize the code.

We are discussing how to make it browser compatible:
bluelovers/node-segment-dict#1

from nlp.js.

calebeaires avatar calebeaires commented on May 22, 2024

Thats great.

To some cases when dev with SPA apps made with with angular/react/vue, size is not such a problem!

from nlp.js.

revolunet avatar revolunet commented on May 22, 2024

tried to compile with browserify or webpack but there is still an issue with natural + memory-fs.

the bundle size is around 3.5Mb

NaturalNode/natural#25

from nlp.js.

revolunet avatar revolunet commented on May 22, 2024

have you heard of https://github.com/Yomguithereal/talisman maybe ?

from nlp.js.

revolunet avatar revolunet commented on May 22, 2024

Hi,
Looks like the experimental branch is gone; is there a way to check it out to understand how far we are from browser support ?

from nlp.js.

revolunet avatar revolunet commented on May 22, 2024

Ho 😻, that's pretty awesome, thanks a lot !
How did you build this file ?

from nlp.js.

revolunet avatar revolunet commented on May 22, 2024

Would it be possible to "compute" the model on the server then just "consume" it on the client ?

from nlp.js.

jseijas avatar jseijas commented on May 22, 2024

Yes of course

from nlp.js.

jesus-seijas-sp avatar jesus-seijas-sp commented on May 22, 2024

Closing as it was solved

from nlp.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.