eldr.ai | Natural Language Processing



ELDR AI is capable of Natural Language Processing (NLP) - it is able to extract meaning from words and sentences so you can use language in all your predictions, insights and decision intelligence operations.

There are 3 ways of using language and NLP in ELDR AI - as an input, as an output, or both.

Using NLP on the Input side

Let's start with using NLP as an input. We'll use ELDR AI NLP to spot some Fake Reviews.

Click here to download a small CSV file (1Kb, 26 rows) containing Review data that we want ELDR AI to learn from.

You will see we have 3 inputs - age/ip, country/ipc and the important one for this demo is review/s.

Our Output in this instance is a single binary output where we are training ELDR AI to determine if the review is real or fake.

As with all inputs (ip,ipc) into ELDR AI, you can have as many sentences (s) inputs as you like, in any order and in any combination.

As with all the other examples, go to the Create Data page and upload the file you have just downloaded - call it "NLP".

You should be OK to use the default settings creating a Model here - we're asking quite a lot of this learning process using words.

As in previous examples, click the training icon from the View Models page.

ELDR AI Insights when using Sentences/Words/NLP are fascinating. They will tell you all the interactions, influences and importance of all words in relation to the output (in this case - how each word or input contributes to the review being predicted as real or fake.)

Let's have a look at a few of the insights:

ELDR AI NLP Insights

And some of the similarities of words:

ELDR AI NLP Cosine Similarities

Here we are using ELDR AI's Chart functionality to predict that this particular review is fake. ELDR AI NLP Predictions

Using NLP on the Output side

Above we were able to use NLP, words, sentences, paragraphs etc on the input side to predict an outcome.

ELDR AI can also use NLP on the output side - e.g. to predict what words will be produced in what order (a sentence) after it has learnt the inputs. To explain this better let's delve into an example.

We're going to use ELDR AI to predict the review from above that someone might write.

Click here to download a small CSV file (1Kb, 10 rows) containing Questionnaire data that we want ELDR AI to learn from.

You will notice a key difference here. The review itself is now an Output/op.

To make this AI-friendly, we need to carry out an additional step which is to encode the Output so that AI can process each of the output words. This will become clear in the next steps.

Navigate to Multi-Output Converter (ranked) and upload the CSV file you have just downloaded.

Convert that then click the blue Download button to see and download the converted file - save it.

It should look something like this.

You can see how ELDR AI has given a rank to each occurrence of a word provided to it in the output sentence/review. This means ELDR AI can learn the order of words in an output and link it to the input.

As before use ELDR AI to Create Data using this converted CSV file.

The reason for the red warning label at this step is we're going to do something a bit different when creating this AI Model.

We're using ranked data; not simply binary, 0s and 1s and not a single target number.

To get ELDR AI to use ranked output data, we need to use something called Softmax.

Softmax ensures that all values it sees total 1, so gives weight accordingly to each output value - e.g. if we had outputs of 2,3,5 -> Softmax would convert them to 0.2, 0.3. 0.5. This is really useful if you have tens, hundreds or thousands of ranked outputs.

It's easy to use Softmax in ELDR AI:

When creating your Model, use these settings in the Activation and Loss sections:

ELDR AI NLP Softmax

As in previous examples, click the training icon from the View Models page.

Looking at AI insights when using NLP as an output is useful as it shows how each of your inputs influences each word within the NLP output.

Let's have a look at the insights and recommendations generated from our NLP Output model:

ELDR AI NLP Output Insights and Recommendations

Here we are using ELDR AI's Form functionality to predict the order of words after NLP is applied. Let's keep in mind that we have only trained ELDR on 10 rows of data, with minimal inputs - in the real world this would be 1000s.

ELDR AI NLP Output Predictions

Using NLP on both Input and Output sides of an Artificial Neural Network

Above we have seen how ELDR AI can process words, sentences, paragraphs and text using Natural Language Processing independently on the input and output sides of an Artificial Neural Network.

Let's take it one step further and use NLP on both sides of an ANN - this means we can link and predict Questions/Inputs to Answers/Outputs - a Chat Bot in simplistic terms - but a powerful Natural Language Processing tool in may other scenarios.

Here, we are training ELDR AI to link input sentences with output sentences.

Click here to download a small CSV file (1Kb, 5 rows) containing NLP data that we want ELDR AI to learn from.

Navigate to Multi-Output Converter (ranked) and upload the CSV file you have just downloaded.

Convert that then click the blue Download button to see and download the converted file - save it.

It should look something like this.

As before use ELDR AI to Create Data using this converted CSV file.

As a reminder, we're using a Ranked Output here so we need to create a Softmax Model.

When creating your Model, use these settings in the Activation and Loss sections:

ELDR AI NLP Softmax

As in previous examples, click the training icon from the View Models page.

Let's see if ELDR AI has learnt using NLP how to respond to a question after being trained.

ELDR AI NLP Input Output Chat Bot Chart ELDR AI NLP Input Output Chat Bot Form