A Javascript Refresher

Building the prediction part of the POS tagger has shown me that I need to brush up on my javascript. The list of resources given by Facebook on the React getting started page are very good. 

MDN is always my go to, but I had not come across The Modern JavaScript Tutorial which also looks excellent. So worth a little time over the next few days to tidy this up so that I am not getting tangled in basic JS concepts when I should be getting the model working in the browser. 

At the moment I am writing the JS code to convert a set of input words into an appropriate form for the model to predict the part of speech. 

This is roughly how it works for now

Given a set of words, split them and convert to a windowed dataset of length 5. This covers all of the input features that I used to build the model, so for each word I just need the 2 before and the 2 after. 

Seems straightforward, but the tricky bit is getting started. Once the user has input 5 words I am ready to convert to features and predict the POS for word 3. However this means that I don't have the POS for the preceding words. They are among the input features for the model. 

So once I get the rest of the code working I will find a way to do this using something like the most common tag where I have none. 

Comments

Popular posts from this blog

Execute Jupyter notebooks line by line in VS Code

Using TensorFlow Serving

Text Summarisation with BERT