Creating a Neural Network That Can Tell if a Name Is Male or Female, in JavaScript
Ashraff Hathibelagal

Hey! Nice article. There’s a problem with case

if(name.length > INPUT_LENGTH)
name = name.substring(INPUT_LENGTH);

I believe it must be

if(name.length > INPUT_LENGTH)
name = name.substr(-INPUT_LENGTH);

Otherwise, you just get the string tail, starting from INPUT_LENGTH. For example, for “beatrice” it will be “e”.

Show your support

Clapping shows how much you appreciated Aleksandr Telegin’s story.