Text Topics Where do I start?

Hi: I’m not new to javascript but virtually clueless about NLP.
I’m trying come up with something, web based that can determine the
topic
sub-topic if it exists and the
sentiment
of a word or phrase from a sample of text, usually a few words but occasionally as much as a few paragraphs.
The sample text is answers to survey questions. I can combine all the answers into 1 large sample if that helps.

If I have a sample of text I need to find all the topics in the sample based on words, phrases or sentences. From there I need to know the words, quantity per topic and the sentiment per topic.

Can I do this?
I’d really prefer it in a server based web technology, PHP, but I can’t us Python because my site is on a shared server running PHP/MySql with hostgator and they will not allow me to install anything that is python.

So, it looks like I’m stuck with javascript.
Not that I don’t like javascript but this looks job intensive and I’d like to be able to do it without making users wait or worry about users closing the browser before the job is completed.

I’ve looked through some of the docs and NLP can do all kinds of things.
It looks like I need a pre-trained model as well as tfjs.
Also, I’m looking at the version: v3.11.0
Is that what I need?
I could head in a lot of different directions.

Where do I start?

There is example on Sentiment analysis using Tensorflow JS.
[TensorFlow.js Example: Sentiment Analysis](https://TensorFlow.js Example: Sentiment Analysis)

Alternate option.
Convert any text classification model into Tensorflow.js compatible using Tensorflowjs converter.


tensorflowjs_converter --input_format keras \                       
                                            path/to/my_model.h5 \                       
                                            path/to/tfjs_target_dir

Follow the steps mentioned Importing a Keras model into TensorFlow.js

1 Like